7 segment display problems
Dr. Vetter
Posts: 34
hi my name is craig and i bought a kit to learn Pbasic code it came with a BS2 IC
in the book that comes with it there is a 7 segment display activity driving the 7 segment display to run from 0 - 9
Ok I have typed the code from the learning book EXACTLY AND SEVERAL times.
·
When I run the program it will just flash the first instruction infinitely but when I shorten the code to only 1-3 out puts on at a time it will work fine.
I’m confused if I'm doing something wrong or is my program IC bad.
·
Here is the code from the book
‘{STAMP BS2}
‘{PBASIC 2.5}
DEBUG “Program running.”
OUTH = %00000000
DIRH = %11111111
‘·············· BAFG.CDE
OUTH = %11100111
PAUSE 1000
OUTH = % 10000100
PAUSE 1000
OUTH = %11010011
PAUSE 1000
DITH = % 00000000
END
·
Here is the code that I can get to work but only 3 outputs at a time
‘{STAMP BS2}
‘{PBASIC 2.5}
DEBUG “Program running.”
OUTH = %00000000
DIRH = %11111111
‘·············· BAFG.CDE
OUTH = %11100000
PAUSE 1000
OUTH = % 11000100
PAUSE 1000
OUTH = %11010000
PAUSE 1000
DITH = % 00000000
END
The circuit is set up so I have a 1K ohm resistor in series with one input to seven segment and vss is my ground
Any input would be greatly appreciated
Thank you
Craig
in the book that comes with it there is a 7 segment display activity driving the 7 segment display to run from 0 - 9
Ok I have typed the code from the learning book EXACTLY AND SEVERAL times.
·
When I run the program it will just flash the first instruction infinitely but when I shorten the code to only 1-3 out puts on at a time it will work fine.
I’m confused if I'm doing something wrong or is my program IC bad.
·
Here is the code from the book
‘{STAMP BS2}
‘{PBASIC 2.5}
DEBUG “Program running.”
OUTH = %00000000
DIRH = %11111111
‘·············· BAFG.CDE
OUTH = %11100111
PAUSE 1000
OUTH = % 10000100
PAUSE 1000
OUTH = %11010011
PAUSE 1000
DITH = % 00000000
END
·
Here is the code that I can get to work but only 3 outputs at a time
‘{STAMP BS2}
‘{PBASIC 2.5}
DEBUG “Program running.”
OUTH = %00000000
DIRH = %11111111
‘·············· BAFG.CDE
OUTH = %11100000
PAUSE 1000
OUTH = % 11000100
PAUSE 1000
OUTH = %11010000
PAUSE 1000
DITH = % 00000000
END
The circuit is set up so I have a 1K ohm resistor in series with one input to seven segment and vss is my ground
Any input would be greatly appreciated
Thank you
Craig
Comments
What's a Microcontroller book is·this one that you are using
It a lot·better if you go to http://www.parallax.com/Portals/0/Downloads/docs/books/edu/Wamv2_2.pdf·and copy and
paste·the example Demo Code into the Basic Stamp Editor·Saying that
Make sure·you have hook up the 7- Segment LED Display right way·did you use the· Figure 6-10 for your hook up
Did you get the 7- Segment LED Display· from Parallax or did you get it from some where else
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 3/1/2008 1:32:48 AM GMT
i have got the same results
but when i changed my power supply to a 9v battery it works fine
i think my power supply dose not provide enough current
thanks again