PDA

View Full Version : Missing a bit



l_gaminde
- 31st August 2009, 17:44
I need a fresh set of eyes on this. Im trying to send 5c which is 01011100
it is not sending correctly. It is sending 0111010 looking at the scope which is almost correct but it is missing the second 0 on the left. And yes I know it is inverted and this is correct. I need this 0, so it should look like 00111010 on the scope I have this working using bit banging and have compaired the two pattern's the bit bang works great this missing 0 does not.


For Bits = 0 to 7
Command_bit = value.0[Bits]
if command_bit = 1 then
low portb.2
else
input portb.2 'if command_bit = 0 then input portb.2
endif
pauseus 104
next

l_gaminde
- 31st August 2009, 18:54
I have it working now I changed the pauseus time to a lower setting as the program overhead was giving me too long a pauseus time and putting my bits out of range