Using uOLED-128 with Basic Stamp 2
Mr Ted
Posts: 4
Hello there,
Is anybody know how to display a word on the uOLED-128 with a BS2 ?
I already connected the uOLED to the BS2 but I didn't find a .bs2 code on the parallax website.
Here are my connections :
+5V --> VDD
RX --> PIN 2
TX --> PIN 3
GND --> VSS
RESET --> RES
Kind regards
Is anybody know how to display a word on the uOLED-128 with a BS2 ?
I already connected the uOLED to the BS2 but I didn't find a .bs2 code on the parallax website.
Here are my connections :
+5V --> VDD
RX --> PIN 2
TX --> PIN 3
GND --> VSS
RESET --> RES
Kind regards
Comments
TX CON 4 ' Transmit to the uOLED-128, connect to uOLED-128 RX
RX CON 5 ' Receive from the uOLED-128, connect to uOLED-128 TX
BAUD CON 84 ' 9600 Baud, 8 bits, no parity, 1 stop bit
HIGH TX ' Make sure transmit line is high (see datasheet page 9)
PAUSE 500 ' Wait for uOLED-128 to finish initializing
SEROUT TX,BAUD,["U"] ' Send autobaud command (see datasheet)
SERIN RX,BAUD,[wait(6)] ' Wait for ACK character
' This is an example of the "S" command from the User's Manual.
' Draw/Display String ‘Hello’ at x = 20, y = 20 in WHITE (FFFFhex) colour.
SEROUT TX,BAUD,["S",20,20,1,$FF,$FF,1,1,"Hello",0]
SERIN RX,BAUD,[wait(6)] ' Wait for ACK character
Kind regards
The example I gave is based on the examples in the User's Manual. I don't have one of these displays, so I can't test the example. Make sure you have the display connected properly. The above example was written (as it says) to have the uOLED-128 RX pin connected to Stamp I/O pin 4 and the TX pin connected to Stamp I/O pin 5. You can change the constant definitions if you have different connections.
The 4D documents say that erratic operation can be expected if the device returns anything other than $06 when acknowledging each command. As you can see by the photo of my debug terminal, the display "doesn't like" about half my commands, but it seems to run without any problems (I've not yet let it run for several hours, but plan on doing that tonight). I'd still like to look into why so many of my acks are bad. The bad ones come back with "F0".
Thanks,
John
The video link below still applies to this display....
http://www.youtube.com/watch?v=ZIlAoABmQ0w