Vishay APD-128g032 Display
edge87
Posts: 24
I'm trying to display solid 1's on a Vishay APD-128g032 Display. It is controlled with basic TTL logic and i have the data sheet here:
http://www.vishay.com/docs/37006/apd128g.pdf
Here is my code so far:
The display shows all lights ON, but it is slow to refresh. You can tell it is flickering. I'm almost sure that the processor is fast enough to send out this kind of logic. Perhaps it is too slow or too fast? I had delays in there (now commented out) to try and control the speed but it seemed to work better without them. If anybody can take a look at the Data Sheet and the code and see if there is anything that I am making a mistake on that would be greatly appreciated.
Post Edited (edge87) : 5/22/2010 1:04:34 AM GMT
http://www.vishay.com/docs/37006/apd128g.pdf
Here is my code so far:
''Display.spin ''This is the object that will run our display. ''Version ALPHA 2.0 CON _xinfreq = 5_000_000 ' Use 5 MHz Crystal _clkmode = xtal1 + pll16x ' Set Clcok to 80 MHz VAR byte DisplayEnable, SerialDataPin, DotClock, ColumnLatch, RowData, RowClock long t1, t6t7, Tickfor128, Tickfor32 PUB display ''Set Pins for each function of display. Easier to track words than pins DisplayEnable := 0 RowData := 1 RowClock := 2 ColumnLatch := 3 DotClock := 4 SerialDataPin := 5 'Tickfor128 := 0 'Tick is used for timeing of DOTCLOCK 'Tickfor32 := 0 'Tick is used for timeing of ROWCLOCK 't1 := ((clkfreq / 1_000_000) * 100) 'Sets var to a 100ns pause 't1 := 800 't6t7 := ((clkfreq / 1_000_000) * 75) 'Sets var to a 75ns pause 't6t7 := 600 ''Turn the pins used to out and off (cheated here didn't use names use numbers.) If you change numbers this code breaks!!! (((FIX THIS)) dira[noparse][[/noparse]0..6]~~ outa[noparse][[/noparse]0..6]~ outa[noparse][[/noparse]SerialDataPin] := 1 repeat outa[noparse][[/noparse]RowData] := 1 repeat 32 outa[noparse][[/noparse]RowClock] := 1 ' Start row clock outa[noparse][[/noparse]DisplayEnable] := 1 repeat 128 'Repeat loop 128 times to fill rows 'Tickfor128 := (t6t7 + cnt) outa[noparse][[/noparse]DotClock] := 0 'set to low 'outa[noparse][[/noparse]SerialDataPin] := 1 'Alternate between 1 and 0 until loop ends ' waitcnt(Tickfor128) ' Amount of time the DotClock Should be DOWN 'Tickfor128 := (t6t7 + cnt) outa[noparse][[/noparse]DotClock] := 1 'set to high ' waitcnt(Tickfor128) ' Amount of time the DotClock Should be UP outa[noparse][[/noparse]ColumnLatch] := 1 outa[noparse][[/noparse]ColumnLatch] := 0 outa[noparse][[/noparse]DisplayEnable] := 0 outa[noparse][[/noparse]RowClock] := 0 outa[noparse][[/noparse]RowData] := 0
The display shows all lights ON, but it is slow to refresh. You can tell it is flickering. I'm almost sure that the processor is fast enough to send out this kind of logic. Perhaps it is too slow or too fast? I had delays in there (now commented out) to try and control the speed but it seemed to work better without them. If anybody can take a look at the Data Sheet and the code and see if there is anything that I am making a mistake on that would be greatly appreciated.
Post Edited (edge87) : 5/22/2010 1:04:34 AM GMT