Bcd and the pic 8
Maybe I’ve misunderstood the pin-out on the pic 8, but I find the naming very confusing.
I simply wanted to connect a bcd dot segment 0-F led to a pic 8 and have it count from 0 to F as a test
According to the pin-out diagrams, pin 3 is only an input, however it is still bit 4 internally (for counting purposes)
In order to get the higher order bits (digits 8-F) it is necessary to have a loop count from 0 to 23, as in the code below;
main: b1=0
let dirs = %11111111
for b1 = 0 to 23
let pins = b1
pause 500
next b1
goto main
With the above code, I don’t get a delay as pin 3 (bit 4) is dropped, when counting between 8 and 15, so I assume that something is happening internally to bit 4. Is it getting dropped and ignored?
I suppose my question is; what is happening to bit 4 (pin 3) and it there a better way of doing this, other than use a pic18?
Maybe I’ve misunderstood the pin-out on the pic 8, but I find the naming very confusing.
I simply wanted to connect a bcd dot segment 0-F led to a pic 8 and have it count from 0 to F as a test
According to the pin-out diagrams, pin 3 is only an input, however it is still bit 4 internally (for counting purposes)
In order to get the higher order bits (digits 8-F) it is necessary to have a loop count from 0 to 23, as in the code below;
main: b1=0
let dirs = %11111111
for b1 = 0 to 23
let pins = b1
pause 500
next b1
goto main
With the above code, I don’t get a delay as pin 3 (bit 4) is dropped, when counting between 8 and 15, so I assume that something is happening internally to bit 4. Is it getting dropped and ignored?
I suppose my question is; what is happening to bit 4 (pin 3) and it there a better way of doing this, other than use a pic18?