ROBOLYMPIC circuit
T&E Engineer
Posts: 1,396
I have·used 4028 IC's as in the Robolympic circuit and using a PDB with a SX28 and 0.1 caps. I have them going to a custom built LED array going through ULN2003 drivers (20 using 16) and PN200 transistor circuit (7).
I am trying to build the Robolympic circuit to learn how it works and build from it. What I am getting is all 16 x 7 LEDs display all LEDs are on (2-3 seconds) and then "rows" of LED patterns up and down occur. It repeats itself in the same way.
Do I have to do something to the SXB code first?
See this·picture showing what the basic LED display looks like.
I have rechecked all the connections 3 times and see nothing wrong with the wiring.
Ideas on where to go with this?
Post Edited (tdg8934) : 11/24/2005 1:14:40 AM GMT
I am trying to build the Robolympic circuit to learn how it works and build from it. What I am getting is all 16 x 7 LEDs display all LEDs are on (2-3 seconds) and then "rows" of LED patterns up and down occur. It repeats itself in the same way.
Do I have to do something to the SXB code first?
See this·picture showing what the basic LED display looks like.
I have rechecked all the connections 3 times and see nothing wrong with the wiring.
Ideas on where to go with this?
Post Edited (tdg8934) : 11/24/2005 1:14:40 AM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
That explains it. I have the opposite with the 7 Rows LOW (black wires) and the collumns HIGH (red wires).
Is it possible to modify the code to invert the lines?
Thanks,
Timothy Gilmore
On the PDB, I had the 4028 Vcc pins connected to GND and the 4028 GND pins connected to Vcc. (also had 1 7404 inverter wrong too). All those wires...
When I fixed this messages starting going across with inverse lettering (cool all the same). In the SX/B code I changed 1 line of code to get it to work correctly with LOW rows and HIGH columns.
·I changed this:
RC = Display( RA )···· 'LOAD NEW ROW DATA TO RC
to this (begining of the SX/B code)...
RC = NOT Display( RA )···· 'LOAD NEW ROW DATA TO RC
Now I get it to work beautifully.
What I will do next is modify the code (and add another 4028) to add another·5 columns of LEDs (20 x 7 display) and the original Robolympic uses 15 x 7.
Thanks Jon!!
Display VAR Byte (15)
to
Display VAR Byte (20)
I get the error message:
...VARIABLE EXCEED AVAILABLE RAM
All of the other variables used, I don't see a way to reuse them either.
How about adding another SX28 to fix this RAM issue? or is there another way?
Please help...I really like it but can't expand it past "Display VAR Byte (16)"
Ideas???
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
·
INTERRUPT
'
ISR_Start:
RC = 0······ 'CLEAR DISPLAY OUT TO PREVENT GHOSTING
Inc RA······ 'INCREMENT COLUM ADDRESS (RA I/O PINS)
RC = NOT Display( RA )···· 'LOAD NEW ROW DATA TO RC
ISR_Exit:
RETURNINT 63
RA can only go from 0 (%0000)·to 15 (%1111) (actually it goes from 0 to 14 (%1110) for 15·lines out).
I need to go to 20 lines out but RA always is reset back to %0000 after it reaches 15 (%1111). How do I create another array such as:
RC = NOT DisplayExt( RA )
to push data to the remaining·5 lines when RA gets reset back to 0 (%0000) after it reaches 15 ($1111).
I tried modifying the code to use RB as a counter but it did not work correctly.
Please Help if you can.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
I have moved the RA lines over to RB and have the following Interupt code:
'
INTERRUPT
'
ISR_Start:
RC = 0······ 'CLEAR DISPLAY OUT TO PREVENT GHOSTING
·' Inc RA······ 'INCREMENT COLUM ADDRESS (RA I/O PINS)
Inc RB
·' RC = NOT Display( RA )···· 'LOAD NEW ROW DATA TO RC
RC = NOT Display( RB )
IF RB > 15 then
RB = 0
EndIf
ISR_Exit:
RETURNINT 63
SEE ATTACHED MODIFICATION FILE...
colBufLo·· VAR·· ·Byte (16)······· ' define 20-byte array
colBufHi···VAR ·· Byte (4)
I would also define a separate column and buffer index·pointers:
colPntr··· VAR··· RB
bufIdx···· VAR··· Byte
Now the ISR is a can handle the code pretty cleanly:
'
· INTERRUPT
'
ISR_Start:
· LEDs = %00000000················ ' blank outputs to prevent ghosting
· INC colPntr····················· ' update column pointer
· IF colPntr = 20 THEN············ ' roll-over if at end
··· colPntr = 0
· ENDIF
· IF colPntr.4 =·0 THEN············' in low portion of buffer?
··· idx = colPntr & %00001111····· '·calculate buffer index
··· LEDs = ~colBufLo(bufIdx)······ ' output current column data
· ELSE
··· idx = colPntr & %00000011
··· LEDs = ~colBufHi(bufIdx)
· ENDIF
ISR_Exit:
· RETURNINT 63
Note that if you use a 32-byte buffer then you can simplify the buffer pointer manipulation (with roll-over) like this:
· INC colPntr
··colPntr.5 = 0·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Post Edited (Jon Williams (Parallax)) : 11/25/2005 10:00:46 PM GMT
I don't know how it affects (RA or RB)·and RC especially with...
INC RB
RC = NOT Display ( RB ) ??
or
INC RA
RC = NOT Display ( RA ) ??
With the SX28 you can't have an array larger than 16 bytes, so this won't work in your program:
· LEDs = colBuf(colPntr)
The example shows how to use bit 4 of the pointer to detect which portion of the array to grab the current column data from.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Post Edited (Jon Williams (Parallax)) : 11/25/2005 10:02:33 PM GMT