PDA

View Full Version : Vishay APD-128g032 Display



edge87
05-22-2010, 07:54 AM
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
(http://<br>http://www.vishay.com/docs/37006/apd128g.pdf<br>)

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[0..6]~~
outa[0..6]~

outa[SerialDataPin] := 1

repeat
outa[RowData] := 1

repeat 32
outa[RowClock] := 1 ' Start row clock
outa[DisplayEnable] := 1

repeat 128 'Repeat loop 128 times to fill rows
'Tickfor128 := (t6t7 + cnt)
outa[DotClock] := 0 'set to low
'outa[SerialDataPin] := 1 'Alternate between 1 and 0 until loop ends
' waitcnt(Tickfor128) ' Amount of time the DotClock Should be DOWN
'Tickfor128 := (t6t7 + cnt)
outa[DotClock] := 1 'set to high
' waitcnt(Tickfor128) ' Amount of time the DotClock Should be UP

outa[ColumnLatch] := 1
outa[ColumnLatch] := 0
outa[DisplayEnable] := 0
outa[RowClock] := 0
outa[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