Shop OBEX P1 Docs P2 Docs Learn Events
newbie - SX and OLED display — Parallax Forums

newbie - SX and OLED display

AttemptAttempt Posts: 3
edited 2009-02-21 20:07 in General Discussion
I have been fighting with my first project.
Running Parallax's oled display from the sx chip on a development board.

I hooked the oled up to power and the splash screen comes up.
I then took the tx of the oled put in at ra.3
and the rx of the oled and placed it at ra.2

but with the attached code I never get a good response from the device.
When I used a oscilloscope I do see a response but the sx does not pick it up.

Any help would be appreciated.

'
' Device Settings
'

DEVICE SX28, OSCXT2, TURBO, STACKX, OPTIONX
FREQ 4_000_000
ID "Display"

' values
RstLine VAR RA.1 ' I/O pin for RCTIME
Sout VAR RA.2 ' output to SEETRON 2x16
Sin VAR RA.3
LED var rc.7
Baud CON "T9600"


tRead var byte
tSample var byte
' Program
Program start

Start:
high LED
SEROUT Sout, baud, "U" ' send the baud character
serin sin, baud, tRead,5000,start ' Get the response
if tRead = $06 then goto ok
pause 5000
goto start
ok:
low LED
serout Sout, baud, $42
serout Sout, baud, $ff
serout Sout, baud, $ff
SERIN Sin, baud, tRead
goto ok
Sign In or Register to comment.