Yr. absolutely right... I happened to reverse the calculations and the bitshifting and ended up with the wrong order for the bits...:mad:
This Tut was mainly for those who are not familiar with bitfiddling in a byte. I think it is specially useful for those who want to take fully control of the PIC:s different 8-bits registers.
Do You find my other Tut:s about AND,OR,XOR satisfactorly? Anyway, thank You for being observant...
Remarks and suggestion appreciable
P.S. I have here in Sweden a quite simple RTOS application regarding a coffe vending machine. Unfortunately, it contains the concept of "State Machines" which some of You may be not familiar with. I'll try to avoid this without compromising understanding.
If You are interested, tell me so. The processor is a PIC628.