A little 'Techie' help please

Lez T

Member
I have an Axe033 unit running fine on the breadboard, code doing all it should. For the project I am making I required an LCD screen with a backlight, so I bought a couple of these, which, me being a technical dum-dum, beleived would work with a FRM010 serial Firmware Chip. I have wired this the same as described in the datasheet for the FRM 010 wiring diagram. I have racked my brains as to why it will not work, running at 5v from a reasonable PSU, (Thandar TS3022S) so I would appreciate it if someone in the clever dept would correct the error of my ways.
Best Regards.
Lez.
 
Last edited:

Andrew Cowan

Senior Member
Can you post a link to your LCD's datasheet? The one you posted is just for the control chip in the LCD - not the whole unit.

A
 

BeanieBots

Moderator
Um.. the datasheet is for a controller (not an LCD) and the other link doesn't work!

EDIT:
Image now working, all we need now is the datasheet for your LCD.
 

russbow

Senior Member
Lez, seems pretty standard pinouts to me.

I struggled with my first display / firmware chip. Eventually ended up leaving legs 11, 12 & 13 open and earthing leg 10. This should run at 2400 baud. If you use serout 7, T2400 then you must preceed with high7 ( or whatever pin you are using.) I am using the circuit in the chip leaflet with the above settings and all works nicely.

Russ
 

Lez T

Member
Russ,
is it a requirement/ best to use the high7 before the serout 7, I am using n2400, does this make a difference.
example of my code
Code:
main1:		

	pause 30							'small pause
	serout 7, n2400, (254,128)				'goto line1 pos1
	pause 30							'small pause
	serout 7,n2400,(1)					'display mess#1
	pause 100							'small pause
	serout 7, n2400, (254,192)				'goto line2 pos1
	serout 7, n2400, ("Press any button")		'display mess
	if btn1 = 1 or btn2 = 1 then				'btn 1 & 2 pressed
	goto act1:
	else
	goto main1:
Thanks.
Lez.
 

drjeseuss

Member
To be sure I'm on the right page... You have and AXE033. You're current goal is to replace the LCD screen with one that has backlight. So you have removed the existing display (Elec & Eltek) from the "backpack". Now, on connecting the new display it doesn't work correctly. Am I following so far?

First, check the obvious. Look for any bad solder joints, bridges, etc. Next, locate a datasheet for the Axe033's original display. I remember it being an Elec & Eltek, but not sure of the specific model. When I located it once, I remember it being a hard find as the page was in Japanese. If you can't locate it I can dig through a few folders as I may still have it around. Once you have it, compare the pin assignments to the new unit. Most of these are "standard" in the respect that they require 8 (or 4) data lines, a R/W input, Enable, etc. The Axe033 does the gruntwork for you to convert a SEROUT message into the necessary binary data inputs for the display. Most that I've worked with use the same control structure (for the basic functions) and should be compatable, though not all have the pins in the same connector locations.

In summary, check the connections. Then compare the two display pinouts.

EDIT: I located a copy of the original display's datasheet. The pinouts for each are the same.
 
Last edited:

Pfrogs

Member
Lez,

try joining serout for line position and message.
e.g. instead of doing
Code:
serout 7, n2400, (254,192)
serout 7, n2400, ("Press any button")
use

Code:
serout 7, n2400, (254,192,"Press any button")
Also, don't forget to use a transistor if you are connecting the Backlight power to your picaxe as it seem to draw 140 mA (Picaxe only handles 20 mA).
 

BeanieBots

Moderator
Is this replacing AXE033 display or being used with FRM010?
Wiring is different and serial comms are different between the two.

If it's AXE033 replacement, then follow drjeseuss's advice.
If it's FRM010, then follow the manual and double check you have the jumpers correctly for the way you are trying to communicate with it.
You MUST have an initial "high pin" IF you are using T***** baud rates.
 

Lez T

Member
@Pfrogs,
didn't know you could do that with the serout lines for the LCD, thanks for that, you could have achieved far more than you realise, I had run out of code space in my 18x and had to slim it down a bit. I can now possibly add back the things I wanted to put in.
The backlight will be driven through a pair of parallel channels in a ULN2803A darlington.
Thanks for the advise, it's appreciated.
Regards.
Lez.
@beaniebots,
I am replacing the whole AXE033 with a FRM010 and the new LCD. My code for the AXE033 used n2400, am I using the wrong commands?

@drjeseuss,
I have not explained fully and I apologise for that, please see above. All jumpers on the FRM010 are set to open, which should be :

Welcome message on
Baud rate 2400
Serial protocol not inverted
Line configuration set to 2 lines
I beleive that this is right.
Regards.
Lez.

Went back and checked the Serout command, am I right in saying that as I am using the serout7, n2400 command,
Pin specifies the output pin to be used. Baud mode specifies the baud rate and
polarity of the signal. When using simple resistor interface, use N (inverted)
signals. When using a MAX232 type interface use T (true) signals. The protocol is
fixed at N,8,1 (no parity, 8 data bits, 1 stop bit).
I am doing this correctly?
Regards.
Lez.
 
Last edited:

russbow

Senior Member
Lez, no you don't need the high 7

is it a requirement/ best to use the high7 before the serout 7, I am using n2400, does this make a difference.
example of my code
For some reason I have a hangup to always use Txxxx, so high first is needed. Use of Nxxxx doesnt.
 

Pfrogs

Member
Lez, glad it symplify things for you.
Also, have in mind that when doing
Code:
	serout 7, n2400, (254,128)				'goto line1 pos1
	pause 30							'small pause
	serout 7,n2400,(1)					'display mess#1
you will in fact clear the character at line1 pos1 and not display mess#1. If you wish to display ASCII decimal numbers of a variable use #’s (e.g. use #b1, not just b1).
 

eclectic

Moderator
@Lez

First off, looking at your diagram in post #1.

I think that you should add a switch / wire
to FRM010 leg 4.
(As in the Datasheet circuit)

I own three FRM010 and a few different LCD displays.

Occasionally, one or another display plays silly beggars.

Grounding/reset normally cures it.

And, it's just belt and braces.

e
 

Lez T

Member
@E,
I have used the pull up res' on pin 4 but didn't fit a rest switch, would fitting one be adviseable, I have done a reset manually, short pin 4 to 0v, it made no difference. As far as I can tell, I am doing the same with my FRM010 and LCD as there was with the AXE033, i.e. serout via FRM010 chip to the LCD, I cannot see why my code should now be wrong. I have inverted the signal ( polarity jumper, no change. I have changed the code to T2400 from N2400 and tested with the polarity inverted and non inverted, still I get no text on the screen. Checked the FRM010 in the AXE033, all OK.
I have remade the circuit twice in case I had done something stupid ( apart from starting this ) no change and never found anything wrong.
Starting to think, faulty LCD.
Regards.
Lez.
 

russbow

Senior Member
Have you twiddled with the contrast pot Lez?

Also a LED & resistor on the frm chip pin 17 gives a good indication of receiving data.
 

eclectic

Moderator
Just re-read your post #10
"The backlight will be driven through a pair of parallel channels in a ULN2803A darlington."

1. Have a look at the LCD Datasheet
Pin15 = +5v Pin 16 = 0v (gnd)

Remember that the Darlington "inverts"
ie. it "lets current in".

2. And, you will need a resistor.

e
 

Lez T

Member
@E,
I have fitted a R390 in there already, I've got bundles of R390 so I use them instead of R330. I am going to try a new LCD tomorrow and I will fit a reset switch and a switch to jumper3 so I can invert the polarity easily.

@Russ,
I have 'scoped the input to the FRM010 and can see the data ( wish I could read it!!) , but I will also fit the Led to pin 17 as well to assist in trouble shooting. Tried the contrast pot first as that was what caught me out on the AXE033 when I first fired that up.

Thanks to you both.
Lez.
 
Last edited:

russbow

Senior Member
Lez, just worked through the complete thread again. All your circuits and codes seem OK.

I recall having serious problems with my first LCD and the FRM chip. Was convinced I had a duff chip and eventually bought another - no change !

Have a look at the thread

http://www.picaxeforum.co.uk/showthread.php?t=12385&page=2

I think problems were sorted from about post 17 onwards. Since then have always used the same configuration for new projects.

R.
 

westaust55

Moderator
All jumpers on the FRM010 are set to open, which should be :

Welcome message on
Baud rate 2400
Serial protocol not inverted
Line configuration set to 2 lines
Lez,

To take a step back, since you have the Welcome Message set to on (jumper is open), are you seeing that welcome message when you first power up?

No Welcome message and the problem is most likely betweeen the FRM010 and the LCD.



@Pfrogs,
didn't know you could do that with the serout lines for the LCD, thanks for that, I had run out of code space in my 18x and had to slim it down a bit. I can now possibly add back the things I wanted to put in.
The FRM010 datasheet gives examples at the bottom of the last page with the SEROUT using control and text data in the same BASIC instruction.
serout 7,T2400,(254,128,"Top Line")​
 
Last edited:

Grogster

Senior Member
Why do you have to have high on the serout pin when using Txxxx but not Nxxxx?
Does this only apply to the Picaxe LCD, or should this be standard on all Txxxx comms?

Just curious - I have not been using a high on the serout pin with Txxxx comms, and generally speaking, it seems to still work.
 

BeanieBots

Moderator
@Grogster,
Technically you should always initiate any T baud rates with a high.
This is so that the transmissions starts at the correct logic idle level.
Sometimes you can get away without it (or might not notice a problem) but more often than not you will lose the first character sent.

@Lez T
Please be careful when using value abreviations.
R390 = 0.39 ohms
390R = 390 ohms.

The "R" (or other abbreviation) is used to replace the decimal point.
eg 4k7 = 4700 ohms.
Did you really mean 0.39 ohms?
 

Lez T

Member
Russ,
had a read through the thread and it has given me some good pointers, I am going to make a breadboard-able LCd with 16 jumper leads to play with, I will keep you posted on what I find.


Westy,
I do not see the welcome message and should have noted this, thanks. After Pfrogs pointed out that I was writing the code wrongly I went and checked through all of it, about halfway through I was already using the format that Pfrogs suggested. It was my first 'major' code write and I got better as I went along.

@Lez T
Please be careful when using value abreviations.
R390 = 0.39 ohms
390R = 390 ohms.

The "R" (or other abbreviation) is used to replace the decimal point.
eg 4k7 = 4700 ohms.
Did you really mean 0.39 ohms?
BB my mistake, I believed that I was stating the value as 390 ohms, thank you for correcting me.


Regards All.
Lez.
 
Last edited:

Lez T

Member
I have 'bread boarded' the FRM010 and the LCD, with a reset switch, polarity jumper switch and a data LED
I run the code below
Code:
main:
high 7
pause 250
serout 7,t2400,("Hello")
pause 1000
goto main
with either the signal inverted or not
I get a pulsing LED which gets faster if I 'REM' out the pause 1000 line.
Not a Sausage on the LCD, no welcome message, no Hello, not even any squiggles which would indicate that I have made contact.
If I change the serout command to n2400 then the data LED stays on and pulses off for the pause 1000.
Is there anything I can do to check that these LCDs are working as I have now tried 3 of 5 and am just about to file them in the great LCD bin in the corner. I have no worries about feeding data pins if required, to get some form of reaction.
My last attempt at getting these working will be to just replace the AXE033 LCD screen with one of mine and see what happens.
Thank you all for your assistance in my dilemma.
Regards.
Lez.
 

Pfrogs

Member
Hi Lez,

I would suggest you post some pics (with good detail) of your breadboard as it is. Maybe someone can spot something wrong with it.
 

russbow

Senior Member
Lez, I can't accept that 3 out of 5 are faulty.

Is there anything I can do to check that these LCDs are working as I have now tried 3 of 5 and am just about to file them in the great LCD bin in the corner.
The flashing LED on pin 17 suggests data transmision OK.

Your circuit diagram in the earlier post looks good too.

Checked with mine :-

LCD pins 1, 5, 7, 8, 9 & 10 all taken to earth.

Lcd 2 to FRM 18

Lcd 3 to wiper of pot

lcd 4 to frm 1

lcd 6 to frm 2

lcd 7,8,9,10 data line to frm 6,7,8,9.

Forget lcd 15 & 16 'til later

Other FRM pins

pin 3 data in from axe via 1k resistor

pin 4 4.7k to supply

pin 5 earth

pin 18 as above

pin 17 data led via resistor

pins 16 & 15 resonator, centre pin earthed

pin 14 supply

pins 13, 12, 11 not connected

pin 10 earthed
This works for mine and seems to tally with your circuit.

Code ;

Code:
main:
serout 7,t2400,(254,1)     'clear screen
pause 50
serout 7,t2400,(254,1)     'clear screen
pause 100  
serout 7,t2400,(254,128,"line one")      'print line one
pause 1000
serout 7,t2400,(254,192,"line two")      'print line two
pause 2000
goto main
Yes, I know there are two clear screens. I have found this needed sometimes, but I think it's a timing function

Russ
 

westaust55

Moderator
@russbow,

noting your comment that you need two clear screen commands at the start of your program,

try adding a pause 500 followed by a single clear screen command.
The LCD's do take a finite time to initialise and it could be that your first clear screen command is sent before the LCD module is ready.
 

BeanieBots

Moderator
Also, make sure you still have the line "high 7" at the start of your code.
That is common reason for missing the very first command sent when using "T" baud rates.
 

Lez T

Member
Russ,
just for good measure I re-did the breadboard from a new download of the FRM010 datasheet, still no info on the display. So I ran your code, still no display. Plugged back in my AXE033 and ran your code, just got clock display, changed to n2400 and got "line one" on line one and "line two" on line two just as it should be.
Tried my last resort as per my last post at 22:11 yesterday ( would have put the post number but you can't see them in reply mode), and replaced the LCD screen on my AXE033 with one of the new screens (number4) and guess what, it works like a dream sending n2400, just as the original AXE033 screen did.
I am completely lost and have lost a week trying to fathom this out.
If anyone has a reason why these won't work ( or fancies playing with them ), please let me know.
I am trying to get my head round what happens within the AXE033 to the serial signal, that doesn't happen with just the FRM010 and it's relative hardware as I think this may be a clue as to why I'm clueless:rolleyes:

Regards.
Lez.

pssst!! anyone know of a good LCD display ( with a backlight ) 16 x 2 ( given up on choosing a colour ) and I've got to the point that I don't even care if they are cheap or not. The only criteria that I must stipulate is that they work with the FRM010. Please!
 

Pfrogs

Member
If you got your new LCD working in AXE033, there is no reason why it would not work with the FRM010. So the problem is not in your LCD.

Can you upload a picture of your breadboard? Maybe we can spot something wrong with it...
 

BeanieBots

Moderator
I agree with Pfrogs that the LCD MUST be OK if it works with the AXE033 board.
The fact that it doesn't work with the FRM010 means either it's wired wrong, the FRM010 chip is damaged or the build-up of tollerances on internal clock speeds is too much.
You could check for the last option by playing with CALIBFREQ.
 

Lez T

Member
@Pfrogs,
I have taken about 10 pictures and they are all very bad, very low lights in the workshop room, flash just glares everything. I will see if I can get anything better in the daylight tomorrow.
Regards.
Lez.
 

Lez T

Member
Technical,
to help me in finding out where I have gone wrong here, as I cannot find it, is there any chance of getting the schematic for the AXE033 ( or just the LCD and FRM010 part of it) so that I can compere the two. I have built this three times now and cannot get it to work but as it has been pointed out, it must be what I have done as the LCD works on the AXE033 PCB.
Regards.
Lez.
 

hippy

Ex-Staff (retired)
Not sure a schematic of AXE033 will help as it may not be the same as it is for the FRM010. The important thing is that the right LCD pins go to the right PIC controller legs ( which may vary between products - AXE033 does not use the FRM010 chip ).

Your original schematic wiring to FRM010 looked okay to me and seems to match the FRM010 datasheet.

I also agree that if the LCD works with AXE033 there's nothing wrong with the LCD itself, and pinout is 'as standard'.

As using an LCD with FRM010 does not appear to damage it ( it subsequently works with he AXE033 ), you could take the risk and consider trying the LCD which originally came with the AXE033 with the FRM010. My prediction is that it won't work with the FRM010 either though will again work fine back on the AXE033.

This leads to a conclusion that possibly -

1) FRM010 to LCD wiring is wrong
2) LCD power connections are wrong
3) Contrast connection or setting is wrong
4) SEROUT polarity and baud rate are not right
5) FRM010 configuration jumpers are not right
6) Sending unsupported commands to FRM010
7) FRM010 is damaged

Assuming power is okay ( LCD's can be sensitive to requiring 5V ) and it's not a configuration error then my gut feeling is mis-wiring; mis-counting pin numbers while wiring up, connecting DB7 to LCD4 etc ( nibble wiring reversed ), connecting DB7 to LCD0 ( byte wiring reversed ), connecting DB7 to LCD3 etc ( wrong nibble wiring ), having RS and E swapped. These are all mistakes I've made at times.

A photograph of the setup would allow others to check what you have but I can appreciate the difficulties with getting that. If you have a scanner, laying the boards on that can often work.

Another thing you could try is setting a PICAXE up to control the LCD directly using parallel control. This should be able to control the LCD off the AXE033 and the new ones you have.

Don't go buying any additional LCD's just to try and solve the problem as I would expect them to behave the same way; will work on AXE033 but not with FRM010 as it currently is. The problem seems to be with the FRM010 circuit not the LCD's. It may make some sense to buy another FRM010 though if a wiring error it will perform no better, though it would reveal a damaged FRM010 if the new one works and the old doesn't.
 

russbow

Senior Member
Lez, this is getting so frustrating for you. Hippy's "10 point plan" sums it up well.

Do you have header pins on your LCDs?

If so, and working on the theory that Basildon aint quite the wilds of Essex and St Albans aint quite the wilds of Herts, I can mail you my little working FRM board.

It will prove your bucket of LCDs good or bad.

Mail me with your details and phone. I think somewhere to top right of page where it tells you when you last signed on.

Russ

No, seems just click on my user name
 
Last edited:

Lez T

Member
@H,
I have gone over this time and time again, but, I am doing something wrong, I am making a well spread out vero board PCB that I can easily photograph and that will be easy to 'read'. once I am done with this I will put up some pictures and let all have a look to spot the undeliberate mistake. I will go through you list and see if I can come up with something. I already heve several FRM010's in stock as I needed to make 4 of these anyway.

Russ, thanks, I will contact you shortly by PM and set something up. I'll try and get this board done and the pic's up first.

Regards.
Lez.
 
Last edited:

hippy

Ex-Staff (retired)
When not seeing the wood for the trees it can help to get someone ( friend, family, colleague ) to look over what you have. Even if they don't understand anything, having to explain everything in painful detail and answer 'stupid questions' can reveal the problem. That's another possible approach to try.
 

russbow

Senior Member
"stupid question, and maybe somewhat impertinent........

...........we keep using serout 7,T2400,(blah)............

are we sure we are using output pin 7 on the picaxe and not connecting to a different output pin?
 
Top