Scrolling 7 seg. Display
Brian_B
Posts: 842
Hi,
·I wrote this code to scroll a 7 seg led display. Pin 15 is vss and 16 through 23 lights the segments. It seems to work ok , but there is a pause in the reset loop.·Any clue why it's pausing for more than the waitcnt ?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank's Brian
http://tech.groups.yahoo.com/group/lunarX/
·"Imagination is more important than knowledge..." ·· Albert Einstein
http://www.diycalculator.com/subroutines.shtml· My favorite website ( Bet you can't guess why)
Post Edited (Brian Beckius) : 12/7/2007 7:54:24 PM GMT
·I wrote this code to scroll a 7 seg led display. Pin 15 is vss and 16 through 23 lights the segments. It seems to work ok , but there is a pause in the reset loop.·Any clue why it's pausing for more than the waitcnt ?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank's Brian
http://tech.groups.yahoo.com/group/lunarX/
·"Imagination is more important than knowledge..." ·· Albert Einstein
http://www.diycalculator.com/subroutines.shtml· My favorite website ( Bet you can't guess why)
Post Edited (Brian Beckius) : 12/7/2007 7:54:24 PM GMT
spin
670B
Comments
shpuld read
Note that it is not a good idea to connect the common cathode to a I/O pin. It will have to suck the curent of all segments wihct can go up to 70 mA... It will not of course, rather it will look dim...
I started out with the test1 deal , It will only makes the loop once. If I use the version I posted , theres a delay in every loop (not the waitcnt delay).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank's Brian
http://tech.groups.yahoo.com/group/lunarX/
·"Imagination is more important than knowledge..." ·· Albert Einstein
http://www.diycalculator.com/subroutines.shtml· My favorite website ( Bet you can't guess why)
And yes, of course it will only work again after bit 23 has been shifted out of the 32 bit register again.
Best you reconsiderthe algorithm you plan to use again.
Post Edited (deSilva) : 12/8/2007 12:02:38 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank's Brian
http://tech.groups.yahoo.com/group/lunarX/
·"Imagination is more important than knowledge..." ·· Albert Einstein
http://www.diycalculator.com/subroutines.shtml· My favorite website ( Bet you can't guess why)
What I wanted to say is that there is no "bug" to catch...
You have to rewrite it.
·Does this look any better ?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank's Brian
http://tech.groups.yahoo.com/group/lunarX/
·"Imagination is more important than knowledge..." ·· Albert Einstein
http://www.diycalculator.com/subroutines.shtml· My favorite website ( Bet you can't guess why)
But I think it will
As long as you are shining just one segment this is fine, but notice the load to I/O 15 I pointed to in my first posting.
And I noticed you are also enabling I/O 14 for output - for any reason?
Ps . The 14 pin was me just getting ahead of myself
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank's Brian
http://tech.groups.yahoo.com/group/lunarX/
·"Imagination is more important than knowledge..." ·· Albert Einstein
http://www.diycalculator.com/subroutines.shtml· My favorite website ( Bet you can't guess why)