Shop OBEX P1 Docs P2 Docs Learn Events
Display code not working. — Parallax Forums

Display code not working.

MacGeek117MacGeek117 Posts: 747
edited 2006-01-02 00:33 in General Discussion
I just got the SX Tech Tool Kit LITEhop.gif , but I can't seem to get some code for a 7-segment display to work. Could I please have some help?
RoboGeek

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There are·3 kinds of people in the world,

the dreamers, the do-ers, and the "Oh, what's this button do"-ers.
Formerly bugg.
www.parallax.com
www.goldmine-elec.com
www.expresspcb.com
www.startrek.com

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-12-30 02:42
    There is source code for SX/B for driving 7-segment displays right in the SX/B Help file in the editor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • MacGeek117MacGeek117 Posts: 747
    edited 2005-12-31 15:26
    I just wrote a new program from the help files, but again nothing lights up like it should. I have attached the new program.
    RoboGeek

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There are·3 kinds of people in the world,

    the dreamers, the do-ers, and the "Oh, what's this button do"-ers.
    Formerly bugg.
    www.parallax.com
    www.goldmine-elec.com
    www.expresspcb.com
    www.startrek.com
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-12-31 20:35
    Can you get the example from the help files working as posted?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • MacGeek117MacGeek117 Posts: 747
    edited 2006-01-01 00:41
    I downloaded the keypad example and it works, but my code doesn'tmad.gif . I really don't understand. I can't use HIGH/LOW commands because of code space.
    RoboGeek

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There are·3 kinds of people in the world,

    the dreamers, the do-ers, and the "Oh, what's this button do"-ers.
    Formerly bugg.
    www.parallax.com
    www.goldmine-elec.com
    www.expresspcb.com
    www.startrek.com
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-01-01 06:17
    Where in your program do you make the I/O lines for port B outputs?· You can put data into those registers all you want, but it won't apear there on the I/O lines until the direction register is set to output.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-01 14:29
    To Chris's point, change the body of your program like this:

    Start:
    · TRIS_B = %00000000

    Main:
    · FOR idx = 0 TO 9
    ··· READ Digits + idx, RB
    ··· PAUSE 1000
    · NEXT
    · END

    TRIS_B handles the direction of the port B pins (0 = output).·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • MacGeek117MacGeek117 Posts: 747
    edited 2006-01-02 00:33
    blush.gif·blush.gifblush.gifblush.gifblush.gifblush.gifblush.gif· Thank you very much, guys! I didn't know you had to make port B an output. THANK YOU!!!!!!!!!!

    RoboGeek

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There are·3 kinds of people in the world,

    the dreamers, the do-ers, and the "Oh, what's this button do"-ers.
    Formerly bugg.
    www.parallax.com
    www.goldmine-elec.com
    www.expresspcb.com
    www.startrek.com
    ·
Sign In or Register to comment.