Shop OBEX P1 Docs P2 Docs Learn Events
7 segment display problems — Parallax Forums

7 segment display problems

Dr. VetterDr. Vetter Posts: 34
edited 2008-03-03 18:10 in Learn with BlocklyProp
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

Comments

Sign In or Register to comment.