PDA

View Full Version : Lcd pin out help



smeghead
- 15th November 2008, 20:46
Not sure if this is the right part of the forum fer this , i recently purchased some lcd displays from evilbay, and wondered if anyone has the connection pinouts, ive searched for a datasheet all to no avail, im waiting for the seller to email the diagrams but dont hold out much hope

the markings on the modules are as follows

1st one 4DMC-2021 STLDN D020S

2nd one 4GLM-12232

many thanks in advance

mackrackit
- 15th November 2008, 21:06
Does it look anything like the one in the manual under LCD, 14 or 16 pins?

If so then just try that set up???

smeghead
- 15th November 2008, 21:26
16 pin, 2 rws of pins 1 row numbered odd other row numbered even, will try the pins as in the manual and see if that works


many thanks for your prompt responce

Darrel Taylor
- 16th November 2008, 03:43
The 2nd one is a 122x32 GLCD

http://www.esnips.com/doc/1e1f1f03-c24e-4010-9c7e-0ffbd5239dc5/4GLM-12232-5LDE-5V

rhino
- 16th November 2008, 04:33
4DMC-202-1

Datasheet is from the same place Darrel points to.
http://www.esnips.com/doc/c88ddf19-9f17-4ef9-bf1a-22dd83cfe251/4dmc

20X2 character display. KS0076B controller.

Ioannis
- 16th November 2008, 12:34
I don't know about G-LCD's but recenty I had an issue with an 2x16 LCD from Winstar.

All known LCD's I 've used up to this moment had the #1 pin as GND and #2 pin as Vdd. The Winstar has the power supply in the opposite order! So read the manuals and Data Sheet is still valid!

Also I used to ground the contrast pin as it was not necessary to adjust it. All LCD that I got this month need to be adjusted through a trimmer! And I did not put that thing on the PCB... :-(

Ioannis

smeghead
- 16th November 2008, 14:47
many thanks again everyone, i have now got the top one connected and it displays 1 row of black squares, i tried the lcd test code but am getting no joy,
so i reprogrammed a simple light an led code which works in the velleman programmer/test board but doesnt seem to work on breadboard, I think this is down to my stupidity,i think the lcd test is written using an external xtal, i've reread the manual but cant seem to work out how to use the internal oscillator on the 16f628a, will have another play when i've calmed down :lol:

Oh and i exploded a pic earlier, got a new power supply from maplins, read the destructions ,dialed in 5v lcd was blank so turned up the current and the voltage dropped to 3v so adjusted the voltage to get 4.5v, then adj the current a bit , the voltage shot up to 25v and bang.

still these thing happen

again many thanks to everyone for replying :)

mackrackit
- 16th November 2008, 15:10
Do you have a pot/trimmer connected to the contract pin of the LCD?



Oh and i exploded a pic earlier, got a new power supply from maplins, read the destructions ,dialed in 5v lcd was blank so turned up the current and the voltage dropped to 3v so adjusted the voltage to get 4.5v, then adj the current a bit , the voltage shot up to 25v and bang.

I have said it before and I will say it again.
Always have safety glasses on while programming :D

smeghead
- 16th November 2008, 15:49
nope had the contrast pin to 0v



Do you have a pot/trimmer connected to the contract pin of the LCD?


I have said it before and I will say it again.
Always have safety glasses on while programming :D

think i will from now on :lol: even the dog jumped ;)

Ioannis
- 16th November 2008, 21:29
So, do you think that using an 7805 is an option? So even if you have a 100Volt/100 Amp Power supply, your PIC circuit will be a bit safer.

Ioannis

smeghead
- 17th November 2008, 21:49
So, do you think that using an 7805 is an option? So even if you have a 100Volt/100 Amp Power supply, your PIC circuit will be a bit safer.

Ioannis

i had one on the board but didnt connect it, simply a case of stupidity on my part :lol:

smeghead
- 24th November 2008, 20:07
with the help from forum members and a lot of reading i managed to get the lcd working, again my stupidity came into play ,i defined the 16f628a to use the internal osc but it would not work ,so put an external xtal in the circuit and it worked. so thanks again

a new question i want to use a 1 wire temp sensor as per the example code, now i know i can define the lcd to port b, but the bit i cant seem to get my head around is how to move the lcd pins db7 this shows as porta.3 in the sample code so i assume it will want portb.3 if i move the lcd to portb, also the e line shows as portb.3 in the sample code, so am i right in thinking i can move the e line by using the following and specifing an unused pin say portb.5 i.e

Define LCD_EREG PORTb
Define LCD_EBIT 5

another thing i cant get to grips with is displaying 2 seperate pieces of info one a line ,

say
fan1 on fan2 off
i plan on using 4 different gosubs with an lcdout to show the 4 states of the fan,

is there any way to make the on and off words appear as say

fan1 (a) fan2 (b)

where (a) and (b) say off or on by using only 1 lcdout command

can i use something like
lcdout $fe, 1
pause 500
lcdout fan1 (a) fan2 (b)
if temperature =21 then let (a)=on and (b)=off
if temperature =23 then let (a)=off and (b)= on

lastly how can i display a custom character more than once on a line ie if i make a smiley and want to use it 6 times (its say written to the lcd in the first memory slot)

LCDOUT $fe,$c0,0,0,0,0,0 'write smiley six times
when i tried it it just wrote it the once

i hope this makes sence to someone
many thanks in advance

mackrackit
- 25th November 2008, 00:13
LCDOUT $fe,$c0,0
LCDOUT $fe,$c1,0
LCDOUT $fe,$c2,0
LCDOUT $fe,$c3,0
LCDOUT $fe,$c4,0
LCDOUT $fe,$c5,0
LCDOUT $fe,$c6,0

What does "smeghead" mean?

smeghead
- 25th November 2008, 16:47
many thanks for the reply ,erm me username i'll pm you :lol:

mackrackit
- 25th November 2008, 17:32
The four data lines (4 bit mode) have to be on the same port going from 0-3 or 4-7.
The othe two lines can be anywhere.
Example:


DEFINE LCD_DREG PORTC
DEFINE LCD_DBIT 0
DEFINE LCD_RSREG PORTD
DEFINE LCD_RSBIT 1
DEFINE LCD_EREG PORTD
DEFINE LCD_EBIT 0
DEFINE LCD_BITS 4
DEFINE LCD_LINES 2
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 50

This is all standard.
Darrel has a trick called LCD AnyPin that does as the name implies. Non standard :)



can i use something like
lcdout $fe, 1
pause 500
lcdout fan1 (a) fan2 (b)
if temperature =21 then let (a)=on and (b)=off
if temperature =23 then let (a)=off and (b)= on
Try something like
If temperature is whatever gotsub a subroutine.

smeghead
- 25th November 2008, 18:27
cheers again have already wrote 4 subroutines for the various temperature fan states . just wondered if i could do it the other way will have a search for darrels ant pin routine