In SX Microcontrollers, SX/B Compiler and SX-Key Tool, skynugget wrote: Hey all, im working on a clock project, that is based on three 74HC595 registers shifting out BCD data to 6 BCD to 7 segment driver chips. I'm trying to do a basic scroll right animation, and its turning out really lousy. if you send $f to the decoder, it will blank the digit. so basically i need to shift the following pattern out the 595 array. Time var byte(3) is my byte array storing the time value time = $00, $12, $13 for this example time is 13:12:00 $0F,$FF,$FF $00,$FF,$FF $20,$0F,$FF $12,$00,$FF $31,$20,$0F $13,$12,$00 i have something put together, but its like 52 lines of code, and doesn't quite animate right. [code] BLANK_DIS 'send out $FF,$FF,$FF 'example secs = 22 tmpb1 = secs & $0F 'make secs 02 SWAP tmpb1 'make secs 20 tmpb1 = tmpb1 + $0F 'make secs 2f SHIFTOUT DataIO, Clk, MSBFIRST, tmpb1 ' shift out 2f PULSOUT HC595, 5 pause scrollspeed BLANK_DIS ' blank display SHIFTOUT DataIO, Clk, MSBFIRST, SECS 'shift out 22 PULSOUT HC595, 5 pause scrollspeed BLANK_DIS tmpb1 = mins & $0F SWAP tmpb1 tmpb1 = tmpb1 + $0F SHIFTOUT DataIO, Clk, MSBFIRST, SECS SHIFTOUT DataIO, Clk, MSBFIRST, tmpb1 PULSOUT HC595, 5 pause scrollspeed BLANK_DIS SHIFTOUT DataIO, Clk, MSBFIRST, SECS SHIFTOUT DataIO, Clk, MSBFIRST, mins PULSOUT HC595, 5 pause scrollspeed BLANK_DIS tmpb1 = HRS & $0F SWAP tmpb1 tmpb1 = tmpb1 + $0F SHIFTOUT DataIO, Clk, MSBFIRST, SECS SHIFTOUT DataIO, Clk, MSBFIRST, mins SHIFTOUT DataIO, Clk, MSBFIRST, tmpb1 PULSOUT HC595, 5 pause scrollspeed BLANK_DIS SHIFTOUT DataIO, Clk, MSBFIRST, SECS SHIFTOUT DataIO, Clk, MSBFIRST, mins SHIFTOUT DataIO, Clk, MSBFIRST, hrs PULSOUT HC595, 5 pause scrollspeed [/code] thanks in advance! ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=408151 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)