Hello again. I want to display numbers from the picaxe onto a bank of five 7-seg LED digits. I have the LEDs wired to an M5451 driver chip, which requires a clock signal and a data pulse signal. I wrote this code...
<BLOCKQUOTE><font size=1 face=arial>quote:<hr height=1 noshade>
main:
symbol clock=1
symbol data_out = 2
pause 500
high clock
pause 1
low clock
pause 1
for b0 = 1 to 36
high clock
high data_out
pause 1
low data_out
low clock
pause 1
next b0
pause 500
goto main
[/QUOTE]
Which I think should light all 7 segments of all five digits, but what actually happens is that the segments flash on and off apparently randomly.
Here.... http://www.ortodoxism.ro/datasheets2/e/0zqj6og5wcoq8y1zyxt7r79056py.pdf is a link to the datasheet for the driver chip, that shows the data sequence the chip needs.
I've tried changing the value of the "b0 = 1 to 36" to 35 and 37 in case it needs a gap bit or I'm misreading it, but it makes no difference.
Can anyone tell me what I'm doing wrong ?
Thanks in advance,
Richard <hr height=1 noshade></BLOCKQUOTE></font><font face='Verdana, Arial, Helvetica' size=2>
<BLOCKQUOTE><font size=1 face=arial>quote:<hr height=1 noshade>
main:
symbol clock=1
symbol data_out = 2
pause 500
high clock
pause 1
low clock
pause 1
for b0 = 1 to 36
high clock
high data_out
pause 1
low data_out
low clock
pause 1
next b0
pause 500
goto main
[/QUOTE]
Which I think should light all 7 segments of all five digits, but what actually happens is that the segments flash on and off apparently randomly.
Here.... http://www.ortodoxism.ro/datasheets2/e/0zqj6og5wcoq8y1zyxt7r79056py.pdf is a link to the datasheet for the driver chip, that shows the data sequence the chip needs.
I've tried changing the value of the "b0 = 1 to 36" to 35 and 37 in case it needs a gap bit or I'm misreading it, but it makes no difference.
Can anyone tell me what I'm doing wrong ?
Thanks in advance,
Richard <hr height=1 noshade></BLOCKQUOTE></font><font face='Verdana, Arial, Helvetica' size=2>