BillyGreen1973
Senior Member
Hi everyone,
I have read the manuals and the axe401 pdf, but can't seem to find the answer to my problem.
I am attempting to use the ArduiNIX Nixie driver shield. (http://arduinix.com/) with the Axe401 Shield Base.
The Arduinix requires the following code to drive it's 2 BCD converter chips, bit0-3 being one chip and bit4-7 being the other.
My question is this, is there an easier way of mapping 'b0' onto the pin S.2 to S.9?
Pins S.2 to Pin S.9 span port B and port C and are not in the logical order.
The code above does work but seems a bit 'brute force' and a bit wasteful.
Thanks
I have read the manuals and the axe401 pdf, but can't seem to find the answer to my problem.
I am attempting to use the ArduiNIX Nixie driver shield. (http://arduinix.com/) with the Axe401 Shield Base.
The Arduinix requires the following code to drive it's 2 BCD converter chips, bit0-3 being one chip and bit4-7 being the other.
Code:
#picaxe 28x2
#sim shield
dirsb=%11111111
dirsc=%11111111
main:
for b1= 0 to 99
let b0=bintobcd b1
pinS.2=bit0
pinS.3=bit1
pinS.4=bit2
pinS.5=bit3
pinS.6=bit4
pinS.7=bit5
pinS.8=bit6
pinS.9=bit7
pause 500
next b1
goto main
Pins S.2 to Pin S.9 span port B and port C and are not in the logical order.
The code above does work but seems a bit 'brute force' and a bit wasteful.
Thanks