Shop OBEX P1 Docs P2 Docs Learn Events
NEED help (modifying) Programing NX-1000 Board (7 segments) — Parallax Forums

NEED help (modifying) Programing NX-1000 Board (7 segments)

vensvens Posts: 6
edited 2005-05-04 00:54 in BASIC Stamp
can somebody help me with this program...
I need this program to·display the word full on the 7 segment display using the NX-1000 board...
can anybody modify this program so it would do that. Im not geting any output when i run it..
im using BS2.......



'{$STAMP BS2}
'{$PBASIC 2.5}
'****************************************************************
'Displaying the word 'FULL' to the 7 segment display
'****************************************************************
'Pin assignments
'
EN····· PIN 0······ ' Connect enable pin
CLK···· PIN 2······ ' Connect clock pin
DOUT··· PIN 3······ ' Connect to data

'Variables
'
X······ VAR Word··· ' GP var
Y······ VAR Byte··· ' GP var
D1····· VAR Byte··· ' digit 1 (right)
D2····· VAR Byte··· ' digit 2
D3····· VAR Byte··· ' digit 3
D4····· VAR Byte··· ' digit 4 (left)
CFG···· VAR Byte··· ' Holds display configuration value
'Initialization
'
DIRL = 255
CFGN··· CON %11000001
'Main program
'
Main:
··· GOSUB Full······· ' Display FULL
··· GOTO· Main
Full:·· ' Display FULL
··· CFG = %11101111··· ' Digits 4,3,2,1 special decode, 4 HEX decode
··· GOSUB Config······ ' Configure display
··· ' Now write Full
··· Y = %00001111····· ' Setup bit 3 for toggling display brightness
··· FOR X = 0 TO 4···· ' and all DP's ON
····· EN = 0·········· ' Enable data input
····· SHIFTOUT DOUT, CLK, MSBFIRST, [noparse][[/noparse]Y\4, $2\4, $E\4, $5\4, $8\4, $0\4]
····· EN = 1·········· ' Transfer data into display registers
····· PAUSE 200
··· NEXT
··· PAUSE 500
··· RETURN
··· 'Configuration routine
··· '
Config:
··· EN = 0························· ' Enable data input
··· SHIFTOUT DOUT, CLK, MSBFIRST, [noparse][[/noparse]CFG] ' Write to display config register
··· EN = 1························· ' Transfer data into display registers
··· RETURN
··· END
·

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-04-29 01:28
    Hello,

    ·· Do you have a MAX7219 connected to the Stamp as required by the code?


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • vensvens Posts: 6
    edited 2005-05-03 20:54
    Hi...

    Actually i dont have the MAX7219...but is there anyway i can make this program run without the MAX7219
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-05-03 21:19
    It looks like the code you're copying is actually the MC14489 multiplexer (my version from StampWorks update·attached).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • vensvens Posts: 6
    edited 2005-05-03 23:33
    I appreciate you guys in trying to help me....
    but this is not what i attend for my program to do.....I just want to write the word FULL in the Display...
    I am not using MAX7219 or MC14489...
    Can you all help? ans is it possible to write the word FULL withought using the other devices....
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-05-04 00:54
    The attached program shows how to manually multiplex the displays.· Modify it to your requirements.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
Sign In or Register to comment.