NEED help (modifying) Programing NX-1000 Board (7 segments)
vens
Posts: 6
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
·
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
·· Do you have a MAX7219 connected to the Stamp as required by the code?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Actually i dont have the MAX7219...but is there anyway i can make this program run without the MAX7219
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
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 Williams
Applications Engineer, Parallax
Dallas, TX· USA