18x and 4d OLED-96-g1

juve021

Member
Hey all, I'm a newbie poster but I have been a lurker for alittle while. I am having problems communicating with a 4d systems, oled display. When powered up, the oled display just scrolls the splash screen and does nothing else. I have output pin 2 connected to the RX of the OLED with a 100 ohm resistor in series. My code is as follows:

Code:
main:
pause 2000
serout 2,T2400,("U") 'autodetect baud rate for oled display
pause 2000
serout 2,T2400,("E") 'erase screen
pause 2000
serout 2,T2400,("B",$00,$00) 'set background color black
pause 2000
serout 2,T2400,("F",$46,$01) 'set larger (8x8) font size
pause 2000
serout 2,T2400,("T",$41,$00,$00,$ff,$ff) 'put letter A in color white at col,row 0,0
pause 10000
serout 2,T2400,("E") 'erase screen
pause 2000
serout 2,T2400,("s",$00,$00,$01,$86,$AF,$43,$61,$73,$63,$68,$79,$73,$20,$54,$65,$73,$74,$69,$6e,$67,$00) 'send "Caschys Testing" to the string in a green color
pause 10000
serout 2,T2400,("Y",$03,$00) 'OLED power down
end
Can someone help me out with this?
 

juve021

Member
I''ve been racking my brain over this for the past few hours. I've tried pullup resistors on the the picaxe Tx line and still nothing. I put an LED on the output of the 18x and it seems to be working correctly, flashing here and there for byte codes output. The display just doesn't want to take anything at all! ARGGHHGHG
 

SD2100

New Member
Hi

I've never used one of these displays but have you tried changing the baud mode from T2400 to N2400 ???.

Also good to post a diagram of your circuit or a good photo in case there's something funny going on there.
 
Last edited:

jmumby

Senior Member
Should'nt you get an acknowledge back after you send the U? I would be checking to see if your getting that back before trying to send anything else. I have used these and they are a bit.....tempremental. But once you get them going they are alright.
 

moxhamj

New Member
I wonder if it is similar to the udrive. If so
high 2 ' must start with a high
pause 2000 ' wait for module to boot (300-400ms)
serout 2,T2400,("U") ' sets baud rate to whatever send U at
serin 1,T2400,b13 ' read back ack or nak

Then try the E.

Two things here. First is to start with the pin high (then ?? do a reset to the oled once it is high). If it starts low, that first byte won't go through right, then it won't set the baud rate, and then nothing else will ever work. I think picaxe boots up with pins low.

Then on the serin, see if you get a NAK or ACK back. At least that will see if the board is communicating.
 

hippy

Ex-Staff (retired)
Try with Nxxxx baud rate though I suspect it wants Txxxx baud rate, in which case, as Dr_Acula suggests, setting the line high and a PAUSE before the first SEROUT may be essential. I would try Dr_A's suggestion first.

Also note what the oLED manual says about "U" only working after power-up. If the oLED has received some 'noise' which it has misinterpreted as a baud rate setting command you will have to power-cycle the oLED and PICAXE after every PICAXE download until you get it synchronised to the baud rate being used.

Also try setting the background colour other than black or its turn-on colour so you can see when the command has had an effect.
 
Last edited:

juve021

Member
Great help! Thanks, I will try these suggestions but I could have swore I tried the 'high 2' already. I know I've tried the inverted Nxxxx instead of T and that did nothing. I don't have the Tx from the oled connected at all but I guess I will have to, to at least do some troubleshooting. For now tho, here is a crude schematic of my current connections. Note, I have removed the resistor from the Tx line of the Picaxe

 
Last edited:

juve021

Member
Hey all I just realized, do I need to program this oled via the PC first to accept serial commands?!?!? OMG, if this is true, I haven't done this.
 

hippy

Ex-Staff (retired)
I don't know; what does the manual or datasheet say ?

But how are you going to program it via the PC to accept serial commands without using serial ?
 

juve021

Member
It mentions that the screen can be operated in two modes 1) 4DGL and 2) serial. But I think it says that you have to program the oled with a pmmc file to put it in serial mode?!?! I don't know the manual is just full of the commands.

here, http://www.4dsystems.com.au/prod.php?id=9

under "System requirements":
"µUSB-MB5 or the µUSB-CE5. These USB to Serial converter modules are essential hardware tools for programming the GOLDELOX-GFX processor, with 4DGL or Serial platform PmmC firmware files, via its serial port. These modules are also used for downloading 4DGL user application code from the PC into the GOLDELOX-GFX. You will need to install the the appropriate drivers onto your system. The drivers can be found in the µUSB-MB5 or the µUSB-CE5 product pages."

then under "Downloads"

"Serial Platform Downloads:

PmmC-File: To develop applications using your host controller to send Serial Commands to the µOLED-96-G1, the module must be programmed with the latest Serial platform PmmC file. Download the latest: uOLED-96-G1-Serial_rev1.pmmc "
 
Last edited:

MurrayJ

Senior Member
Your program looks very close to my working example on the Dontronics forum from 2007.

Code:
main:
wait 4
serout 2,T2400,("U")
wait 2
serout 2,T2400,("E")
wait 2
serout 2,T2400,("B",$00,$00)
wait 2
serout 2,T2400,("T",$41,$00,$00,$ff,$ff)
wait 5
serout 2,T2400,("Y",$03,$00)
end
This worked for me, but I was using a very old version of their screens, and they have changed a few times since I bought the screen, I think in 2006.

You dont have to program the screens first to get them to work, as long as the screen itself supports serial in, which your screen does, and you send the "U" character so the screen can work out the baud rate you are sending.

My long wait times at the start of the program were for the slower to boot up old screens, the new ones need only half a second or so I believe. I would try a smaller pause at the start, because maybe the screen locks on to a different baud rate before you send the "U". After that happens it will not accept any commands until you power down and start again.

Also I see you have a resistor in series, which is needed, but not in the diagram, I assume that is just an oversight? One is needed to lower the voltage to 3.3, even though the screen is powered from 5v. I think this is right, I havent used my screen in quite a while.

Another post from Dontronics mentions a problem with a particular output on the picaxe. If the above doesnt sort it out maybe you could switch outputs, and change your program accordingly to try that.
 
Last edited:

juve021

Member
Thanks Murray. I've ordered the uUSB-CE5 so I can at least communicate with the OLED through the PC and attempt to upload the latest serial pmmc firmware. I'm hoping that will solve my issues. I'm thinking the newer oled's have the ability to function in either 4DGL or serial mode and one must program the OLED into the desired mode via the firmware.

About your suggestions of timing, I've tried all different amounts of delay from 0ms-4 seconds before sending the "U" with zero results.

Yes the resistor was in series and then I was desperate to find a solution so I started to modify the circuitry. I will definitely add it back in there if it is necessary though, thanks!

Hmmm interesting about changing output pins, I will have to try that one as well. Thanks for the suggestions
 

hippy

Ex-Staff (retired)
I've tried all different amounts of delay from 0ms-4 seconds before sending the "U" with zero results.
Did you power-cycle the oLED between tests ?

Yes the resistor was in series and then I was desperate to find a solution so I started to modify the circuitry. I will definitely add it back in there if it is necessary though, thanks!
It is definitely necessary, you can permanently damage the oLED without it.
 

jmumby

Senior Member
I have used a MAX232 rather than a uUSB-CE5 with succses so if you have one of these or a FTDI serial to USB adapter you could use that also.
 

juve021

Member
Did you power-cycle the oLED between tests ?
Yes I did. The real reason I think I need to upload the serial platform firmware, besides from what the website says, is because the display doesn't even wait 5 seconds (as per the manual) to receive the "U" command on power up. It goes straight to the slideshow and then won't accept anymore commands.

It is definitely necessary, you can permanently damage the oLED without it.
OK, I will definitely put one back in there, 100 ohms correct?
 

MurrayJ

Senior Member
It says in the manual that a jumper shunt is located on the rear that will play the slideshow if a memory card is inserted. Have you removed this jumper?
 

juve021

Member
It says in the manual that a jumper shunt is located on the rear that will play the slideshow if a memory card is inserted. Have you removed this jumper?
yes, mine hasn't even come with one installed. In other words the pins are open, non connected

I will hopefully be getting the uUSB-CE5 today so I can get this thing up and running...cross fingers!
 
Last edited:

juve021

Member
FYI....SUCCESS!

My program was fine, I needed to program the OLED for the serial platform. I am now able to control this display from an 18x! Thanks to all for your help!
 
Top