& bitwise AND
| bitwise OR
^ bitwise XOR
~ 1’s compliment
>> right shift
<< left shift
Bitwise operators
Reply
& bitwise AND
| bitwise OR
^ bitwise XOR
~ 1’s compliment
>> right shift
<< left shift
Transistors: base resistor selection for saturation state.
Example: 5813
1. Divide the number by 256 : 5813/256 = 22.70703125
The whole number is the High Byte
2. Multiply the whole number * 256 = 22 * 256 = 5632
3. Subtract that number from the origional for the low bit: 5813-5632 = 181 (this is the low bit)
Overflow = 256 for 8 bit, 65536 for 16bit
Delay in seconds:
Delay = ((Overflow – InitTMR)*prescalar) /(Frequency/4)
Value to put in InitTMR – delay is in Seconds
InitTMR = Overflow – ((Delay * Frequency)/(4 * Prescalar))