multiple 7219 and 7 segment displays: trouble
guydb
Posts: 29
this is driving me nuts...
I want to drive three separate dual 7 segment displays using 3 separate 7219 drivers (why? because the displays have to be in different locations but need to be controlled by one common stamp and because the have to be as independent of each other as possible and because the required number combinations would make the program way to long to use a single 7219 to drive 6 displays...and probably because I'm a poor coder).
The problem: for some odd reason only one dual display will light up. I've tested the circuit and separately all 3 drivers and displays work, it's just when I use them all together that 2 out of 3 refuse to function.
Here's the sample program I'm using: it should display figures 39, 17 and 34 on the three separate displays (I'm using a BS2SX). Possible redundancies have been added out of desperation. I hope somebody can tell me what I'm doing wrong (I've used Stamp controlled 7219 drivers and display in the past without any problem, but always in a single configuration.)
' {$STAMP BS2sx}
DATA_n CON 2
CLK CON 1
Load CON 0
DATA_n2 CON 5
CLK2 CON 4
Load2 CON 3
DATA_n3 CON 15
CLK3 CON 14
Load3 CON 13
decode CON 9
brite CON 10
scan CON 11
switch CON 12
temp CON 15
initmax VAR Byte
initmax2 VAR Byte
initmax3 VAR Byte
index VAR Nib
index2 VAR Nib
index3 VAR Nib
odd VAR index.BIT0
DIRS = %1111110000000111 'pins 0,1,2,3,4,5,13,14,15 as outputs
FOR index = 0 TO 7
LOOKUP index,[noparse][[/noparse]scan,1,brite,6,decode,$03,switch,1],initmax
SHIFTOUT DATA_n,CLK,MSBFIRST,[noparse][[/noparse]initmax]
PAUSE 200
IF odd = 0 THEN noLoad
PULSOUT Load,15
NoLoad:
NEXT
FOR index2 = 0 TO 7
LOOKUP index2,[noparse][[/noparse]scan,1,brite,6,decode,$03,switch,1],initmax2
SHIFTOUT DATA_n2,CLK2,MSBFIRST,[noparse][[/noparse]initmax2]
PAUSE 200
IF odd = 0 THEN noLoad2
PULSOUT Load2,15
NoLoad2:
NEXT
FOR index3 = 0 TO 7
LOOKUP index3,[noparse][[/noparse]scan,1,brite,6,decode,$03,switch,1],initmax3
SHIFTOUT DATA_n3,CLK3,MSBFIRST,[noparse][[/noparse]initmax3]
IF odd = 0 THEN noLoad3
PULSOUT Load3,15
NoLoad3:
NEXT
blank1:
SHIFTOUT DATA_n,CLK,MSBFIRST,
SHIFTOUT DATA_n,CLK,MSBFIRST,[noparse][[/noparse]temp]
PULSOUT Load,15
SHIFTOUT DATA_n,CLK,MSBFIRST,
SHIFTOUT DATA_n,CLK,MSBFIRST,[noparse][[/noparse]temp]
PULSOUT Load,15
PAUSE 1000
thirtynine:
SHIFTOUT DATA_n,CLK,MSBFIRST,
SHIFTOUT DATA_n,CLK,MSBFIRST,[noparse][[/noparse]9]
PULSOUT Load,15
SHIFTOUT DATA_n,CLK,MSBFIRST,
SHIFTOUT DATA_n,CLK,MSBFIRST,
PULSOUT Load,15
PAUSE 2000
blank2:
SHIFTOUT DATA_n2,CLK2,MSBFIRST,
SHIFTOUT DATA_n2,CLK2,MSBFIRST,[noparse][[/noparse]temp]
PULSOUT Load2,15
SHIFTOUT DATA_n2,CLK2,MSBFIRST,
SHIFTOUT DATA_n2,CLK2,MSBFIRST,[noparse][[/noparse]temp]
PULSOUT Load2,15
PAUSE 200
seventyone:
SHIFTOUT DATA_n2,CLK2,MSBFIRST,
SHIFTOUT DATA_n2,CLK2,MSBFIRST,[noparse][[/noparse]7]
PULSOUT Load2,15
SHIFTOUT DATA_n2,CLK2,MSBFIRST,
SHIFTOUT DATA_n2,CLK2,MSBFIRST,
PULSOUT Load2,15
PAUSE 2000
blank3:
SHIFTOUT DATA_n3,CLK3,MSBFIRST,
SHIFTOUT DATA_n3,CLK3,MSBFIRST,[noparse][[/noparse]temp]
PULSOUT Load3,15
SHIFTOUT DATA_n3,CLK3,MSBFIRST,
SHIFTOUT DATA_n3,CLK3,MSBFIRST,[noparse][[/noparse]temp]
PULSOUT Load3,15
PAUSE 2000
thirtyfour:
SHIFTOUT DATA_n3,CLK3,MSBFIRST,
SHIFTOUT DATA_n3,CLK3,MSBFIRST,
PULSOUT Load3,15
SHIFTOUT DATA_n3,CLK3,MSBFIRST,
SHIFTOUT DATA_n3,CLK3,MSBFIRST,
PULSOUT Load3,15
PAUSE 2000
END
I want to drive three separate dual 7 segment displays using 3 separate 7219 drivers (why? because the displays have to be in different locations but need to be controlled by one common stamp and because the have to be as independent of each other as possible and because the required number combinations would make the program way to long to use a single 7219 to drive 6 displays...and probably because I'm a poor coder).
The problem: for some odd reason only one dual display will light up. I've tested the circuit and separately all 3 drivers and displays work, it's just when I use them all together that 2 out of 3 refuse to function.
Here's the sample program I'm using: it should display figures 39, 17 and 34 on the three separate displays (I'm using a BS2SX). Possible redundancies have been added out of desperation. I hope somebody can tell me what I'm doing wrong (I've used Stamp controlled 7219 drivers and display in the past without any problem, but always in a single configuration.)
' {$STAMP BS2sx}
DATA_n CON 2
CLK CON 1
Load CON 0
DATA_n2 CON 5
CLK2 CON 4
Load2 CON 3
DATA_n3 CON 15
CLK3 CON 14
Load3 CON 13
decode CON 9
brite CON 10
scan CON 11
switch CON 12
temp CON 15
initmax VAR Byte
initmax2 VAR Byte
initmax3 VAR Byte
index VAR Nib
index2 VAR Nib
index3 VAR Nib
odd VAR index.BIT0
DIRS = %1111110000000111 'pins 0,1,2,3,4,5,13,14,15 as outputs
FOR index = 0 TO 7
LOOKUP index,[noparse][[/noparse]scan,1,brite,6,decode,$03,switch,1],initmax
SHIFTOUT DATA_n,CLK,MSBFIRST,[noparse][[/noparse]initmax]
PAUSE 200
IF odd = 0 THEN noLoad
PULSOUT Load,15
NoLoad:
NEXT
FOR index2 = 0 TO 7
LOOKUP index2,[noparse][[/noparse]scan,1,brite,6,decode,$03,switch,1],initmax2
SHIFTOUT DATA_n2,CLK2,MSBFIRST,[noparse][[/noparse]initmax2]
PAUSE 200
IF odd = 0 THEN noLoad2
PULSOUT Load2,15
NoLoad2:
NEXT
FOR index3 = 0 TO 7
LOOKUP index3,[noparse][[/noparse]scan,1,brite,6,decode,$03,switch,1],initmax3
SHIFTOUT DATA_n3,CLK3,MSBFIRST,[noparse][[/noparse]initmax3]
IF odd = 0 THEN noLoad3
PULSOUT Load3,15
NoLoad3:
NEXT
blank1:
SHIFTOUT DATA_n,CLK,MSBFIRST,
SHIFTOUT DATA_n,CLK,MSBFIRST,[noparse][[/noparse]temp]
PULSOUT Load,15
SHIFTOUT DATA_n,CLK,MSBFIRST,
SHIFTOUT DATA_n,CLK,MSBFIRST,[noparse][[/noparse]temp]
PULSOUT Load,15
PAUSE 1000
thirtynine:
SHIFTOUT DATA_n,CLK,MSBFIRST,
SHIFTOUT DATA_n,CLK,MSBFIRST,[noparse][[/noparse]9]
PULSOUT Load,15
SHIFTOUT DATA_n,CLK,MSBFIRST,
SHIFTOUT DATA_n,CLK,MSBFIRST,
PULSOUT Load,15
PAUSE 2000
blank2:
SHIFTOUT DATA_n2,CLK2,MSBFIRST,
SHIFTOUT DATA_n2,CLK2,MSBFIRST,[noparse][[/noparse]temp]
PULSOUT Load2,15
SHIFTOUT DATA_n2,CLK2,MSBFIRST,
SHIFTOUT DATA_n2,CLK2,MSBFIRST,[noparse][[/noparse]temp]
PULSOUT Load2,15
PAUSE 200
seventyone:
SHIFTOUT DATA_n2,CLK2,MSBFIRST,
SHIFTOUT DATA_n2,CLK2,MSBFIRST,[noparse][[/noparse]7]
PULSOUT Load2,15
SHIFTOUT DATA_n2,CLK2,MSBFIRST,
SHIFTOUT DATA_n2,CLK2,MSBFIRST,
PULSOUT Load2,15
PAUSE 2000
blank3:
SHIFTOUT DATA_n3,CLK3,MSBFIRST,
SHIFTOUT DATA_n3,CLK3,MSBFIRST,[noparse][[/noparse]temp]
PULSOUT Load3,15
SHIFTOUT DATA_n3,CLK3,MSBFIRST,
SHIFTOUT DATA_n3,CLK3,MSBFIRST,[noparse][[/noparse]temp]
PULSOUT Load3,15
PAUSE 2000
thirtyfour:
SHIFTOUT DATA_n3,CLK3,MSBFIRST,
SHIFTOUT DATA_n3,CLK3,MSBFIRST,
PULSOUT Load3,15
SHIFTOUT DATA_n3,CLK3,MSBFIRST,
SHIFTOUT DATA_n3,CLK3,MSBFIRST,
PULSOUT Load3,15
PAUSE 2000
END
Comments
I got 2 maxim samples and bought a 3rd one, so it's OK. the displays are in separate rooms.
thanks
guy