Breaking down 32 output's into 4 separate ports
Brian_B
Posts: 842
Hi,
·I've been playing around with a keyboard scan routine for some time now . Say you break up the 32 outputs into 4 separate sections , say 0..7 port one,· 8..15 port two, ect . I'm trying to make out0 high then shift left to out1 , I don't want to go any further than out7 and I want to start over again.
·I have experimented with using TEST , CMP and MAX·but It's seems like I end up with alot of extra code. Is there a simple way to JMP back to out0 after shift left reaches out7 ?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank's Brian
·"Imagination is more important than knowledge..." ·· Albert Einstein
www.PropelX.com
www.NorthStarMachining.com
·I've been playing around with a keyboard scan routine for some time now . Say you break up the 32 outputs into 4 separate sections , say 0..7 port one,· 8..15 port two, ect . I'm trying to make out0 high then shift left to out1 , I don't want to go any further than out7 and I want to start over again.
·I have experimented with using TEST , CMP and MAX·but It's seems like I end up with alot of extra code. Is there a simple way to JMP back to out0 after shift left reaches out7 ?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank's Brian
·"Imagination is more important than knowledge..." ·· Albert Einstein
www.PropelX.com
www.NorthStarMachining.com
Comments
Shawn
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank's Brian
·"Imagination is more important than knowledge..." ·· Albert Einstein
www.PropelX.com
www.NorthStarMachining.com
Post Edited (Brian Beckius) : 7/29/2008 2:30:18 AM GMT
I just·tested this with the demo board LED's, and it appears to do what I think you want it to do.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Now that opens the door up to having cog1 shifting 0..7 cog2 shifting 8..15 ,cog3 shifting 16..23 and cog4 shifting 24..31 ( I don't need the code for that, now that you have me over the hump).
Is adding delay to the time just to be safe ? I see in a lot of sample programs that only add $FF to the time.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank's Brian
·"Imagination is more important than knowledge..." ·· Albert Einstein
www.PropelX.com
www.NorthStarMachining.com