16x2 LCD showing two lines of Boxes

ojd233

New Member
I am trying to make an temperature sensor, that displays the temperature on a LCD. To run the LCD I am using a PICAXE Serial LCD Firmware chip (FRM010) and a PICAXE 20M2 to run the serial outputs to the Firmware chip, then to the LCD. I tried to get it to work on a breadboard and it did, but when I try to put it on a PCB it shows me two lines of boxes, one is slightly fainter than the other. I have tried replacing the Contrast resistor, trying both a 10K and a 4K7 one. I am currently using the 10K one. I am using a MIKROE-55 Character LCD 2x16 LCD that I bought from RS online.

Does anyone know what the problem I am having is and/or how to to fix it.
 

techElder

Well-known member
Come on, ojd233. You can at least post the code that you are using for the 20M2. Photos would help to see if your layout has some problems. Oh, and don't forget a schematic. How did you plan your wiring to the LCD?

Welcome to the forum, but more info, please! :D
 

hippy

Technical Support
Staff member
Seeing one row of blocks usually indicates an LCD is powered but has never been initialised. This suggests that there is more to it than that. It could be that the signals between the FRM010 and LCD are mixed up or missing.

If it worked on breadboard then it should work on a PCB. That it doesn't suggests there is some difference between the breadboard circuit and that of the PCB.
 

westaust55

Moderator
The Mouser website suggests by datasheet that the Mikroe-55 is in fact a Winstar LCD:
http://www.mouser.com/ds/2/272/-364177.pdf

The character set includes some “boxes” for higher data values.
So are the boxes being seen:
1. Solid boxes, or
2. Outline boxes with or without a few inner pixels also on ?

As already mentioned, providing schematics and clear photos of the PCB may help folks here identify the problem.

Is the PICAXE code the same as used for your initial breadboard tests ?
 

inglewoodpete

Senior Member
I have tried replacing the Contrast resistor, trying both a 10K and a 4K7 one. I am currently using the 10K one. I am using a MIKROE-55 Character LCD 2x16 LCD that I bought from RS online.
When you say "resistor", do you mean a trimpot (potentiometer) shown in the datasheet for your device that westaust55 has posted? I have found that, while you can get by with a fixed resistor in many cases, contrast is best controlled with a adjustable pot. If the contrast is set too high, even if the characters are transferred correctly to the module, they appear as blocks ("boxes").
 

newplumber

Senior Member
I second inglewoodpete's quote
contrast is best controlled with a adjustable pot
this might not be close to the problem...but once I had a lcd on a bread board working perfect
then after i soldered everything to the PCB...my lcd went blank because of the different voltages I used like 5vdc on bread board/ 4.85vdc on pcb
lucky I did add a pot on the lcd so it was easy to adjust to clear view ... but it was surprising to me just a little voltage diff can change the contrast of the lcd
 

ojd233

New Member
Board1.PNGLCD Board.PNG

Here are the pictures of the board itself labelled. I will also attach the code.

The code is as followed:
low C.2
pause 500
main: readtemp C.7, w1
bintoascii w1,b0,b1,b2
serout C.2, T2400, ( 254, $80 )
serout C.2, T2400, ( "Temperature" )
serout C.2, T2400, ( 254, $C0 )
serout C.2, T2400, (b1,b2,"C")
pause 1000
goto main

In reply to the other questions:

-I am using a 10K potentiometer
-They are solid boxes, but one of the rows is slightly faded
-I used circuit wizrd to plan my wiring, and the circuit from the FRM010 leaflet.

Sorry for the lack of detail in my earlier post. I will try to get my schematic to you later on today or tomorrow.
 
Last edited:

ojd233

New Member
Schematic.PNG

There is the schematic, not sure if this completely complies with the PCB, I think I made some changes during breadboarding form
 

hippy

Technical Support
Staff member
A schematic will be useful. Can you confirm in the left hand picture that the components at the bottom near teh red wire are a diode, a voltage regulator, and the "9V" silk-screening is an error, should be, and is, "5V".

The boards appears to be home made so it may be worth checking voltages are as expected and there is track continuity on both boards.
 

ojd233

New Member
The component near the red wire is a toggle switch, followed by a voltage regulator, and that annotation is incorrect, it does mean 5V. When checking the readings I get 5.01V after the voltage regulator. When I check the LCD voltage it reads 4.91.
 

Jeremy Harris

Senior Member
I found that some LCDs do not like having the unused data pins connected when they are used in 4 bit mode. Not sure why, but I have one project where the display didn't work on the finished PCB and I eventually traced it to the unused data pins being tied to ground. A craft knife slice though the tracks on the finished PCB fixed that! When testing it on the breadboard I'd not bothered to tie the unused data pins down, so the thing worked, but when making the PCB I thought it would be good practice if they were just tied low. IIRC, the data sheet for that LCD said that the state of the unused data pins in 4 bit mode was "don't care", which was misleading.
 

inglewoodpete

Senior Member
Just checking your circuit diagram. Possibly not the cause of your immediate problems but you need to put a 100nF (0.1uF) capacitor close to the PICAXE's power pins. Also, the DS18B20 needs a pull-up resistor on the data line.
 

ojd233

New Member
On my circuit itself, the DS18B20 does have a 4k7 pull-up resistor on the data lines. I just remembered that when I breadboarded the design, the Potentiometer had fallen out and was not present when the circuit began to run. There was no fixed resistor in its place, just a variable power pack that I was using instead of batteries at the time.
 

darb1972

Senior Member
Not near a computer at the moment, but one issue I see with the schematic is that the output from the 20M2 to the lcd firmware has a serial 1k resistor, with yet another 1k resistor from that connection location to ground. Fairly certain that will cause only around half rail signals to the firmware IC. Fairly certain that the firmware IC won't like that arrangement unless it can work at lower logic levels than the 5V supply. Given it's working off the 5V rail, I doubt that is going to work reliably.

Try removing the 1k to ground. If one is specified for the LCD, one would expect at least a 10k resistor. To avoid a potentially (significant) voltage divider, reduce the series resistor from the 20M2 to the firmware IC to around 100 ohms (protects against a total dead short) and, if needed, make the pulldown resistor around 10k.

Not sure how it ever worked reliably with a half rail/logic divider???

Hope that helps.
 

hippy

Technical Support
Staff member
one issue I see with the schematic is that the output from the 20M2 to the lcd firmware has a serial 1k resistor, with yet another 1k resistor from that connection location to ground.
Good catch. The FRM010 datasheet shows how the circuit should be -

Code:
                   __
PICAXE |------.---|__|--->| FRM010
             .|.
         10K |_|   1K
             _|_
That's the same configuration as the PICAXE download interface. The 1K for current limiting, the 10K to keep the input signal low when nothing connected. It is not a voltage divider.
 

darb1972

Senior Member
Good catch. The FRM010 datasheet shows how the circuit should be -

Code:
                   __
PICAXE |------.---|__|--->| FRM010
             .|.
         10K |_|   1K
             _|_
That's the same configuration as the PICaxe download interface. The 1K for current limiting, the 10K to keep the input signal low when nothing connected. It is not a voltage divider.
True Hippy. If the 10k pulldown is placed before the 1k then it won't act as a voltage divider as the PICaxe is the source. But, if the 10k was placed after the 1k (closest to the FRM10) then it would act as a (somewhat minor) voltage divider.

Thanks for clarifying the correct position/configuration of the resistors.
 
Last edited:

ojd233

New Member
True Hippy. If the 10k pulldown is placed before the 1k then it won't act as a voltage divider as the PICaxe is the source. But, if the 10k was placed after the 1k (closest to the FRM10) then it would act as a (somewhat minor) voltage divider.

Thanks for clarifying the correct position/configuration of the resistors.
I checked this with a 10K resistor but still no change. When you said it is the same as the download layout, I tried a 22k(that's what I am using from download socket to the 20m2) to see if that did anything, but still not working.
 

hippy

Technical Support
Staff member
Did you move the 10K/22K resistor to before the 1K, to be on the PICAXE output rather than the FRM010 input ?

The resistor may be the issue but it's not the only possibility. That everything worked on breadboard but not on the PCB indicates there's been some change in turning what worked into the circuit which is on the PCB.

In your earlier post you said you weren't sure the circuit you posted matched with what you had on the breadboard.

Could it be you never made the changes to the circuit which you made to the breadboard to get it to work, created the PCB from the originally drawn circuit, not the breadboard circuit ?

You have two boards but only one circuit. It's not clear exactly what is on each board.

I think it's just a matter of comparing board tracking to what it should be but that's not easy to do without clear photos showing the tracking and the boards you have seem to have had a number of mods applied which makes it harder to tell what you have.

You may have to resort to checking every solder point on the board, checking they do go to every other solder point they should go to, do not go to any others.
 

Flenser

Senior Member
odj233,

I checked this with a 10K resistor but still no change
I've spotted a second item that looks wrong in your schematic.

As hippy has already pointed out, the section of circuit for the serial input to the FRM010 is given in the FRM010 datasheet like this:
Code:
PICAXE |------.---|__|--->| FRM010
             .|.
         10K |_|   1K
             _|_
and this is the serial input section of the circuit taken from the schematic that you posted :
Code:
PICAXE |---|__|-----.---->| FRM010
                   .|.
         R8 1K     |_| 1K R9
                   _|_
Your serial input circuit has two differences:
- as hippy pointed out, you have the R9 resistor to ground as 1K, where the frm010 manual specifies this as a 10k resistor
- I've just noticed that you also have put the R8 1K resistor on the "PICAXE" side of your circuit where the FRM010 manual has this 1K resistor on the "FRM010" side of the circuit.

I tried a 22k
This is the circuit for the serial input to pin 3 of the FRM010. It is not a serial download circuit so the resistor values from the FRM010 manual are the ones that will apply.
 

darb1972

Senior Member
odj233,



I've spotted a second item that looks wrong in your schematic.

As hippy has already pointed out, the section of circuit for the serial input to the FRM010 is given in the FRM010 datasheet like this:
Code:
PICAXE |------.---|__|--->| FRM010
             .|.
         10K |_|   1K
             _|_
and this is the serial input section of the circuit taken from the schematic that you posted :
Code:
PICAXE |---|__|-----.---->| FRM010
                   .|.
         R8 1K     |_| 1K R9
                   _|_
Your serial input circuit has two differences:
- as hippy pointed out, you have the R9 resistor to ground as 1K, where the frm010 manual specifies this as a 10k resistor
- I've just noticed that you also have put the R8 1K resistor on the "PICAXE" side of your circuit where the FRM010 manual has this 1K resistor on the "FRM010" side of the circuit.


This is the circuit for the serial input to pin 3 of the FRM010. It is not a serial download circuit so the resistor values from the FRM010 manual are the ones that will apply.
I pointed out your second example in post 14, stating that as it stood, this (incorrect) configuration would act as a half "rail" voltage divider, or, in the case of an output to input, it would effectively halve the logic levels from the PICaxe to the FRM10. Hippy correctly pointed out that the datasheet states that your first example is the best configuration.
 
Last edited:

darb1972

Senior Member
I checked this with a 10K resistor but still no change. When you said it is the same as the download layout, I tried a 22k(that's what I am using from download socket to the 20m2) to see if that did anything, but still not working.
Actually, I don't recall having said exactly that, but, as Hippy pointed out the 10k pulldown resistor needs to be on the PICaxe side of the 1k inline resistor. So technically speaking the resistor layout is the same as the download circuit, but the values are not. I would NOT suggest using a 22k resistor between the two ICs as it's too high in value. You really need to try the 10k to ground (on the PICaxe side of the 1k resistor) and leave the 1k between the ICs as per Hippy's example. Did you try that? If so, then as Hippy pointed out, to help further, the folks here are going to need some decent photos of the top and bottom of your PCB to see if we can spot any additional issues. The fault could be anywhere.

A really good place to start is, with the power off/disconnected, put your multimeter into a low ohm range, connect one multimeter probe to the input ground (negative) connection, and then use the other probe to check ALL of the component pins/leads that should be connected to ground. All of these should read dead short. Then, connect one probe to the Vcc (power/positive) input and use the other probe to check it correctly feeds the 5V regulator. Then repeat this process but use the 5V output of the regulator as the new reference and ensure correct connection for the applicable components to the supply rail. That's probably the simplest way to check rail and ground integrity. You can then test the individual signal/data connections.
 
Last edited:

ojd233

New Member
I haven't yet tried the 10k on the PICAXE side of the boards. If this was the case, would it be creating a voltage divider? If so I think that may be a cause of the problem as I have both resistors on either side the FRM010 chips input pin. If this doesn't work Ill use the multimeter and get some pictures.

Thanks for the hep so far! I will try this out tomorrow and see if there is any progress :)
 
Last edited:

ojd233

New Member
Looking at the voltages of the pins on the LCD, only 2(Power), 4(RS) and 11(DB4) are high, all the rest are low. Does this make any difference. I tried the 10K to ground and the 1k inline, but that still doesn't work. The voltage on the power is reading 4.95V. Then the other two are reading 5.05V.
 
Last edited:

ojd233

New Member
[Update] After looking at the connections to LCD, I saw a pin that looked unproperly soldered. I redoldered it and it turns out that was the problem. It displayed what was needed on the screen. Thanks for all the help
 

darb1972

Senior Member
Great news! Well done. Often it's the simplest things that cause the problems. All too often we can (including myself) look past these things and think the problem is the result of something more complicated. This then makes finding the original cause of the issue even more difficult (because everyone assumes that the simple stuff has been checked and eliminated).

When things don't work as expected or a fault arises (either on something I've created or something I have to repair/troubleshoot), I'll start from scratch, checking ALL the basics first. After nearly 30 years of technical work involving all manor of electronics, on the odd occasion when I've "dived in" at the deep end and failed to check the basics the result has been time wasted looking past what should have been a simple fix.

Anyway, great result. Glad it's sorted out.
 
Top