Connecting a PICAXE 18M2 to a serial OLED module

peterjames

New Member
Hi Im new to ths forum so please excuse if this post is in the wrong place.

I am attempting to create a countdown timer using an OLED screen and picaxe.
I have bought the following:

PICAXE-18 Starter Pack
Serial OLED Module (20x4)

I have assembled the components. I have run a test program with an LED on my picaxe board to see if it work, which it does.

My question is how do I connect my OLED screen to the picaxe board.

http://www.picaxe.com/docs/axe134.pdf

The instructions say to connect the positive and the ground. for which there are several port on the picaxe board. I used the positive and the negative ports on H0 next to where the battery pack is connected. As for connecting B.7 to INT. The B.7 output port is comprised of a negative and positive port. which one do I use?

I connected the negative of B.7 to the INT of the OLED module. When I turned it all on with this code.

init: pause 500 ; wait for display to initialise
main: serout B.7,N2400,(254,128) ; move to start of first line
serout B.7,N2400,(“Hello!123”) ; output text
end

The OLED didnt light up or seem to be on. Have I connected this up properly? I have looked for an actual picture of the serial OLED and picaxe board wired together but cannot find one.

What do you all advise / suggest?

Many thanks,

Pete
 
Last edited by a moderator:

BeanieBots

Moderator
Hi and welcome to the forum.
Your description of how you have wired it sounds OK but obviously not.
Even if you cannot 'talk' to the display, I'm sure it should show a welcome message at power up.
Double check that the two power wires for the display really are connected to the power supply lines going to your project board.
Check here for details.
http://www.picaxe.com/docs/chi035a.pdf

Also, make sure that serial in to the display is connect DIRECTLY to the PICAXE output pin and NOT via the transistor array.
 

peterjames

New Member
Hi, Thank you for your welcome and reply.

I have since wired the positive and negative of the OLED module directly to the Positive and negative of my 3x AA power supply (4.5v)
and then wired the INT of the OLED module directly onto pin 13 (B.7) shown here http://www.bristolwatch.com/picaxe/images/pinout18m2.jpg

and run the same test program before still no response or any signs of powering up.
What am I doing wrong?

The attached picture shows the positive (white) and the negative (orange) connected to my power supply. The black wire goes from pin 13 (B.7) to INT
The two wires in the corner of the pic are to an LED on pin B.1 that I used to test my connection to my picaxe.
picaxe2.jpg
 
Last edited:

nick12ab

Senior Member
It looks like the PICAXE on the AXE134 is inserted backwards - can you check this please. The notch should be at the same end as the download socket as shown in the datasheet but to me it looks like it is at the wrong end and the positioning of the laser etchings back that up.

Also try removing the ULN2803 from the project board if that isn't the problem.
 

nick12ab

Senior Member
I had another look at the OP's attachment and I can now clearly see that the 18M2 is in the wrong way round (see attached image) - not sure whether he changed the image in his edit at 17:08 (the rest of the image still looks the same) or glare on the LCD monitor from sunlight making it hard to see but anyway it is now clear which way round it is.

Let's hope that the 18M2 hasn't been fried by having reverse power connected.

The way those wires have been connected to the AXE134 also need to be checked - they look messy and could be shorting out. There's no point in fitting the three-way header to those pads if you're just going to solder wires to those pins - it would be better to just solder the wires directly or use some form of socket soldered to the end of the wires.
 

Attachments

peterjames

New Member
Thank you all for your responses

Particularly nick12ab for posting that picture. Yes it seems I had it the chip wrong way even though I swear I read it had to be the other way. Schoolboy error on my part. I have since reinserted it correctly and it powers up the welcome message.
My wiring is messy yes. originally it was all female and male connectors but in soldering and unsoldering I chose messy to save time but being sure cannot touch.
The edits to the post was me trying to figure out how to change my picture to a nice viewing size.

Thank you all. Please continue to follow this post as I will no doubt wish to pick your brains on other issues as I continue this project. What a helpful comunity
 

pleiser

Senior Member
I think the axe 134 manual should be more specific as to the required orientation as I recently spent 30mins+ trying to figure out the correct orientation. when I decided, it did work but I could have just as easily done it backwards.

EDIT:
I was referring to the orientation of the module to the oled display, not the picaxe to the module.
 
Last edited:

srnet

Senior Member
"Insert the PICAXE-18M2 microntroller into the socket, ensuring pin 1 is furthest from the capacitor"

Marked on the PCB too.
 

nick12ab

Senior Member
I'm not sure what the confusion is - this picture shows that the rectangle silk screened on to the PCB under the chip has a notch in it on the left hand side to indicate which end the notch in the IC is supposed to go in and as stated by srnet, the instructions say which way too and the picture in the datasheet shows which way round it goes too.

Particularly nick12ab for posting that picture. Yes it seems I had it the chip wrong way even though I swear I read it had to be the other way. Schoolboy error on my part. I have since reinserted it correctly and it powers up the welcome message.
Pleased to see that the PICAXE has survived!
 

Falconunknown

New Member
Hi.
I have the same issue.
Recently I bought this:
Axe401 + Axe408 (Instant robot shield)
Axe133

I still believe that my connection it's ok, but the LCD doesn't show anything, even doesn't turn on.
What can I do? or
How can I test it?

Axe408 Connectors (wires color):
+ pink
- blue
Signal gray


Axe133 Connectors (wires color):
V+ pink
0V blue
In gray

I attached 2 pictures to explain better.

2013-02-19 23.39.44.jpg2013-02-19 23.06.17.jpg
 

nick12ab

Senior Member
Have you made sure to solder it with all 16 pins on the LCD in like with all 16 pins on the AXE133 PCB? I see green through the two spare holes on the AXE133 PCB however it might just be that the angle you took the picture at just happens to be the angle required for the bits between the pads to be showing through the holes so can you check that it is like this:

axe133.PNG

Also as Svejk says, try adjusting the contrast.
 

Falconunknown

New Member
You might need to adjust the contrast on the lcd. Use that 10 k pot.

Hi.
Mmmm... I'll be honest... How can I do that?...
I mean... adjust the contrast?

I know what is 10K preset resistor.
 
Last edited:

Falconunknown

New Member
Have you made sure to solder it with all 16 pins on the LCD in like with all 16 pins on the AXE133 PCB? I see green through the two spare holes on the AXE133 PCB however it might just be that the angle you took the picture at just happens to be the angle required for the bits between the pads to be showing through the holes so can you check that it is like this:

View attachment 13602

Also as Svejk says, try adjusting the contrast.
Hi.
I just soldered 14 pins on section H1.
Without use the 2 pins bellow of 10K preset resistor
 

Falconunknown

New Member
Use a small screwdriver and turn it in the slot.

e

2013-02-20 10.28.52.jpg

Thks. :rolleyes:
Finally, I could see a message on the LCD.
But never changed the initializing message.
The Lcd never showed my code.

What could it be? :confused:

Code:
init: pause 500
; wait for display to initialise
main: serout B.7,N2400,(254,128)
; move to start of first line
serout B.7,N2400,("hello!123")
; output text
end
 
Last edited:

hippy

Technical Support
Staff member
The Lcd never showed my code.

What could it be? :confused:
Try a longer PAUSE at the beginning to give the LCD more time to start-up.

B.7 would seems to be correct so check the wire is connected to the right place, hasn't fallen off.
 

Falconunknown

New Member
Add - serout B.7, N2400,(254,1) at the start to clear the screen.
I have been waiting about 2 minutes and nothing changed on LCD.
Just showed: "Serial LCD" "www.picaxe.com"

My new code was:

Code:
pause 500 							' wait for display to initialise
main: 
serout B.7,N2400,(254,128) 		'move to start of first line
serout B.7,N2400,(254,1) 		'clear display
pause 300
serout B.7,N2400,("hello!123") 	 ' output text
end

About wires:

Axe408 Connectors (wires color):
+ pink
- blue
Signal gray


Axe133 Connectors (wires color):
V+ pink
0V blue
In gray

Somebody have any idea?
The IC (Picaxe 18M2) it's working... because AXEPAD recognized this IC yesterday.
 
Last edited:

nick12ab

Senior Member
Use 254,128 after
Code:
pause 500 							' wait for display to initialise
main: 
serout B.7,N2400,(254,1) 		'clear display
pause 300
serout B.7,N2400,(254,128,"hello!123") 	 ' output text
end
EDIT...
Hold on a minute! You're now using a PICAXE-18M2? I thought you were using the 28X2 on the PICAXE Shield Base + AXE408. Have you programmed this code on to the 18M2 on the serial controller? That 18M2 is supposed to have the AXE133 code on it and you put the code containing the serout commands on the 28X2.
 

Falconunknown

New Member
Use 254,128 after
Code:
pause 500 							' wait for display to initialise
main: 
serout B.7,N2400,(254,1) 		'clear display
pause 300
serout B.7,N2400,(254,128,"hello!123") 	 ' output text
end
EDIT...
Hold on a minute! You're now using a PICAXE-18M2? I thought you were using the 28X2 on the PICAXE Shield Base + AXE408. Have you programmed this code on to the 18M2 on the serial controller? That 18M2 is supposed to have the AXE133 code on it and you put the code containing the serout commands on the 28X2.
Yeah.
I have this:
Axe401 (Shield Base + Picaxe 28X2)
+
Axe408 (Instant robot shield).

I connected the serial Lcd (Axe133 + Picaxe 18M2) on B.7 (Axe408).

If you mean about Axe133 firmware:
http://www.picaxe.com/downloads/axe133.bas.txt

I can tell you, I don't touch or changed this firmware...
I put my code in "28X2 IC".
 

Falconunknown

New Member
Use 254,128 after
Code:
pause 500 							' wait for display to initialise
main: 
serout B.7,N2400,(254,1) 		'clear display
pause 300
serout B.7,N2400,(254,128,"hello!123") 	 ' output text
end
EDIT...
Hold on a minute! You're now using a PICAXE-18M2? I thought you were using the 28X2 on the PICAXE Shield Base + AXE408. Have you programmed this code on to the 18M2 on the serial controller? That 18M2 is supposed to have the AXE133 code on it and you put the code containing the serout commands on the 28X2.
Finally!!! :eek:
It's working.
I don't know why?...
But, I just update the firmware on (AXE133)
Then I used the code you gave me and that's all!! :rolleyes:
 

westaust55

Moderator
I have been waiting about 2 minutes and nothing changed on LCD.
Just showed: "Serial LCD" "www.picaxe.com"
Here could be the answer.

Your thread heading is stating:
"Serial OLED"

The initial screen you are seeing states:
"Serial LCD"

There are two program lines at the start of the AXE133 program code. One is REM'ed out and the other active.
;#define use_OLED
#define use_LCD
You must select which is needed to suit the display type.

Likely you have now downloaded the AXE133 program code to match the display.
 

hippy

Technical Support
Staff member
Your thread heading is stating:
"Serial OLED"
This part of the thread is not the original, only runs from post #14.

One of the dangers of adding to an existing post when it's not an exactly the same issue is sowing the seeds of later confusion.

Likely you have now downloaded the AXE133 program code to match the display.
Though post #22 shows an LCD and the message says "LCD" whereas it should show "OLED" if the 18M2 AXE133 driver is programmed for an OLED and probably would not show anything if there were a mismatch due to different initialisations.

I think we'll have to put it down as a mystery as to why it's now working when it did not before. Obviously something has changed or is different but it's impossible to tell what.
 

peterjames

New Member
Yes it seems this thread has changed topic. Though I am pleased this thread is helping others with such issues.
Please note that the Original post topic by myself has been solved with the forums help.

I would however like advice with my project as it continues. Now that I am able to communicate with OLED module I am planning on building a defuse-able bomb prop for use in air-soft gaming.
I wish to replicate the following ardunio model:

http://www.youtube.com/watch?v=FUSX__HDQ94

Specifications:

Menu options.
1. set a game time, that will count down.
2. set an activation time for arming or disarming the bomb
3. set a countdown time for when the bomb is armed.

game begins..

1. game time counts down and is interrupted only when the bomb is armed.
2. arm button must be held for set time to activate bomb countdown
3. holding disarm for set time will exit bomb countdown and return to game time count down
4. should bomb be activated OLED will countdown from set time and the display BOOM message.

so mostly its menu and countdown features. Any advice on where to start? Perhaps I should also set this as a separate thread to avoid confusion.

Many Thanks,

Pete
 

hippy

Technical Support
Staff member
so mostly its menu and countdown features. Any advice on where to start? Perhaps I should also set this as a separate thread to avoid confusion.
Probably best to start a new thread, and best way to go about it is to break it down into parts; menu, button handling, timing etc. I'd get the basic prop and its timing working first with pre-programmed settings then layer the menu handling over the top.
 
Top