Back to square one. SOLVED

Chris6969

New Member
I was successfully using an old 14M chip with LCD117 9600 baud driver chip, to drive a 16x2 display. Worked fine. Then I switched to an 18M2+ chip, because I run out of memory. The LCD display stopped working. Upon power up, it is showing only squares in the first row. I double checked for shorts, open connections etc. So frustrating, I am monkeying with it for two days already. I have run out of ideas. Please help.
Test code:
Code:
#Picaxe 18M2
   #terminal off
   #no_data
setFreq M8
   High c.2        ' Be sure Tx Pin is idle for some time
   Pause 10000        ' wait for PICAXE LCD to boot
   SerOut c.2, T9600_8, ("?G216")
   pause 5000
   main:
   SerOut c.2, T9600_8, ("?f")
   pause 800
SerOut c.2, T9600_8, ("PICAXE LCD117")    ' send text only, first line is automatic
pause 800
   SerOut c.2, T9600_8, ("More Text?n")
   Pause 5000 
goto main
 
Last edited:

hippy

Technical Support
Staff member
I am not familiar with the LCD117 driver but, if it works with the 14M it should work the same with an 18M2.

The odd thing is that a single row of blocks usually indicates the display isn't initialised. I would have thought the LCD117 would do that itself when powered up. It could be there's an issue with the LCD117 itself.

Probably the first thing to do is to test it with a 14M, then using the code you are trying to run on the 18M2 adjusted for the 14M.

If that works, but the 18M2 doesn't, it sounds like there's a hardware issue, miswiring or perhaps the LCD117 is extremely finicky about baud rates. You could try the 18M2 running at SETFREQ M16, T9600_8 adjusted to T9600_16, PAUSE commands adjusted as appropriate.
 

Chris6969

New Member
I re-assembled the old circuit using the same 14M and the LCD117 driver chip (Phanderson). Upon power up, the LCD boots immediately and the code runs fine. Everything seems to be (almost) the same except the serout pin. Even the pause times are less. So where is the fault?
Old code:
Code:
   #Picaxe 14M
   SetFreq M8
   #no_data

   High 0        ' Be sure Tx Pin is idle for some time
   Pause 10000        ' wait for PICAXE LCD to boot
   SerOut 0, T9600_8, ("?G216")
   pause 400
   main:
   SerOut 0, T9600_8, ("?f")

   SerOut 0, T9600_8, ("PICAXE LCD117?n")    ' send text only, first line is automatic
   SerOut 0, T9600_8, ("More Text")
   Pause 5000            ' pause to admire
   SerOut 0, T9600_8, ("?f")
   do
   readadc10 4, w0
w0 = w0 * 44 / 9
bintoascii w0,b2,b3,b4,b5,b6

   SerOut 0, T9600_8, (b3,".",b4,b5,b6,"V,?n")        ' display special characters
pause 5000
loop
b0=0
   goto main                    ' start over
 

inglewoodpete

Senior Member
The following initialisation code, taken directly from a working project, works with a 20X2 running at 8MHz. There may be a few unrelated commands in the code.

Note that my LCD117 uses 4800 baud - I never investigated changing the baud rate.

The 2 x 16 LCD format config appears to be committed to EEPROM whenever it is received by the LCD117 so, once configured, does not need to be downloaded.
Rich (BB code):
' =============== P R O G R A M M E   I N I T I A L I S A T I O N ==============
'
Initialise:Pause 500
         'CalibFreq -6
         SerTxd (CR, LF, "Boot")
         For Temp = 1 to 15            'Bootup: 15 flashes
            Low outLED
            Pause 100
            High outLED
            Pause 100
         Next Temp
         '
         SerTxd (" Temperature Logger Vers ", #Major, "-", #Version, CR, LF)
         hi2cSetUp i2cMaster, i2cAddr24LC256, i2cslow, i2cword ' set 24LC256 slave address with word-sized addressing
         '
         High outLCD
         Pause 100
         '
         'SerOut outLCD, T2400_8, ("?G216")  'Set to 2 x 16
         'SerOut outLCD, T2400_8, ("?L4?L5") 'Red, Green 'off'
         SerOut outLCD, T2400_8, ("?c0?f?g") 'No cursor + Clear/home + beep
 

hippy

Technical Support
Staff member
The ?G216 is defining the display as a 2x16 characters
Thanks for that. So it may be that 'one line of blobs' may be the expected situation when the LCD117 is powered up, that it doesn't initialise the display until sent a "?G" command. The way to confirm that would be to power up an LCD117 without sending any serial to it.

I re-assembled the old circuit using the same 14M ... and the code runs fine.
So where is the fault?
Thanks for checking and testing.

The two most obvious things I would suspect are that the LCD117 serial input isn't wired to the correct PICAXE-18M2 pin, C.2, leg 1, or it is a baud rate issue.
 

westaust55

Moderator
Looking at the data sheet (page 2) that I provided a link to earlier, and as mentioned by IWP, the LCD117 does save the display “dimensions” so the ?Gxxx code should only be required once.

Also from the PHAnderson website
seems that the baud rate is fixed at time of purchase (2400, 4800, 9600 or 19,200) at least since June 2009 so Chris cannot seemingly cannot to an alternate baud rate.
 

inglewoodpete

Senior Member
IWP,
Should that be that your LCD117 operates at 2400 baud (per the posted code using T2400_8) ?
Sometimes I miss the obvious :rolleyes: . I have corrected the baud rate mentioned in the text (the code is unchanged from the working program).

A further thought: perhaps the LCD117 chip is not seated properly - it is possible that a lead has been bent under the chip.
 

Chris6969

New Member
Since I am sure that both parts, LCD and the driver chip are OK, I will concentrate on the 18M2 chip pins. I already tried C.3 for Serout, no change.
I'll report back if successful. Will take some time though. Thank you for your suggestions so far.
One more question, I tied all unused I/O pins to Vdd through a 6.8k SIP resistors. Is this correct?
 
Last edited:

premelec

Senior Member
I've used these units [used to be from Wulfden] - with good results. Don't know about burning the PICs but wonder where the burning code is available as freeware in case I would try it in future....
 

westaust55

Moderator
I've used these units [used to be from Wulfden] - with good results. Don't know about burning the PICs but wonder where the burning code is available as freeware in case I would try it in future....
The PHAnderson link I gave at post 8 has a link to the LCD117 Rev E source code and docs.
You do need the CCC PIC-C compiler.
 

Chris6969

New Member
On the working circuit I measured all signals directly at the LCD and compared it to the not functioning setup. The RS signal (pin4) was always High on the not functioning circuit. Upon inspection of the LCD117 driver chip socket with an magnifying glass, I discovered a tiny solder bridge between pin4 MCLR and RS pin 15. Removed it and boom, all came to live. Mea culpa.
 

westaust55

Moderator
@chris,
That is good news.

Now try and start up without sending the
?G216 command.
You should find that the LCD117 has saved that internally and you do not need to keep sending that same command unless you change the display format.[/B]
 

Chris6969

New Member
@ westaust55
I'll try that. That saves a few lines of code.

I also will attempt to program an PIC16F628 chip with LCD117 firmware. I bought them for $0.65 ea. at BGmicro a couple years ago. Now sold out.
DigiKey caries the PIC16F1627 for $1.52 ea. which is the chip in my kit.
 
Last edited:

julianE

Senior Member
I also will attempt to program an PIC16F628 chip with LCD117 firmware. I bought them for $0.65 ea. at BGmicro a couple years ago. Now sold out.
DigiKey caries the PIC16F1627 for $1.52 ea. witch is the chip in my kit.
Excellent, let us know how the programming works.
 
Top