Dear Pickaxes,
I ‘m looking for the most efficient, (fast!) shift register algorithm for my nixie clock project.
I ‘m using 28X1 and HV5812 20-bit shift register to multiplex 6 nixies.
I need to shift 16 bits within 2 ms, 125us/bithift to avoid nixies flickering.
The best what I've got so far is 1.2 ms/bitshift which is 10 times slower then needed.
And this is with 16MHz AXE28X1 clocking! Most likely part of the problem is just my clumsy test program (below). However I‘ve done similar (C program) testing with AVR Atmega 8 (8 MHz) and 125us/bit shift speed is no problem there. Is it possible to achieve the same results with AXE28X1?
Any help, advise/suggestions would be highly appreciated,
Here is my test program:
symbol dgt1=b1
symbol dgt2=b2
symbol outbyte=b3
symbol bitcount=b4
symbol temp=b5
setfreq em16
main:
dgt1=80
for dgt2=0 to 5 '6 bytes buffer, 80-85'
peek dgt1,outbyte 'shift buffer'
for bitcount=0 to 7
temp=outbyte & 1 'bit prep'
if temp=1 then outhi
low 3 'HV5812 data in
goto clockout
outhi: high 3
clockout:
pulsout 1,1 'HV5812 shift clock
outbyte = outbyte/2 'next bit prep
next bitcount
dgt1=dgt1+1 'next byte prep
bit0=bit0^1
if bit0=0 then '16 bits shift complete flag
pulsout 2,1 'HV5812 latch control
end if
next dgt2
goto main
Thank you for your help!
olegb
I ‘m looking for the most efficient, (fast!) shift register algorithm for my nixie clock project.
I ‘m using 28X1 and HV5812 20-bit shift register to multiplex 6 nixies.
I need to shift 16 bits within 2 ms, 125us/bithift to avoid nixies flickering.
The best what I've got so far is 1.2 ms/bitshift which is 10 times slower then needed.
And this is with 16MHz AXE28X1 clocking! Most likely part of the problem is just my clumsy test program (below). However I‘ve done similar (C program) testing with AVR Atmega 8 (8 MHz) and 125us/bit shift speed is no problem there. Is it possible to achieve the same results with AXE28X1?
Any help, advise/suggestions would be highly appreciated,
Here is my test program:
symbol dgt1=b1
symbol dgt2=b2
symbol outbyte=b3
symbol bitcount=b4
symbol temp=b5
setfreq em16
main:
dgt1=80
for dgt2=0 to 5 '6 bytes buffer, 80-85'
peek dgt1,outbyte 'shift buffer'
for bitcount=0 to 7
temp=outbyte & 1 'bit prep'
if temp=1 then outhi
low 3 'HV5812 data in
goto clockout
outhi: high 3
clockout:
pulsout 1,1 'HV5812 shift clock
outbyte = outbyte/2 'next bit prep
next bitcount
dgt1=dgt1+1 'next byte prep
bit0=bit0^1
if bit0=0 then '16 bits shift complete flag
pulsout 2,1 'HV5812 latch control
end if
next dgt2
goto main
Thank you for your help!
olegb