Chinese math?

I ordered a graphics and receiveda a 4 line text LCD. Decided to keep the 4 line text, got it for half the price, and now also have the graphics. Hooked up the 4 line text LCD, could not figure out how to address line 3. So made a slow loop that printed the RAM address while filling up RAM.

So just observed where it started:

#define LINE_1 D'128' #define LINE_2 D'168' #define LINE_3 D'148' #define LINE_4 D'212'

Logic?

Reply to
Jan Panteltje
Loading thread data ...

Is it a 40x4 display?

Best regards, Spehro Pefhany

--
"it\'s the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

Were you printing the address to the display in question?

--
John
Reply to
John O'Flaherty

On a sunny day (Sun, 03 Feb 2008 20:38:06 -0500) it happened Spehro Pefhany wrote in :

No, 20 x 4 :-) You need to subtract 128 (bit 7), as that is the RAM address flag, that leaves the 7 lower bits as the actuall RAM address: line1 0 line2 40 line3 20 line4 84

The display is the HC200401C-VA.pdf and the controller, of which I think there are 2, S6A0069.pdf

formatting link

I can understand they interleaved the lines from both chips, but I cannot think of a way to come up with 84, that should have been 60?

Reply to
Jan Panteltje

On a sunny day (Sun, 03 Feb 2008 19:57:35 -0600) it happened John O'Flaherty wrote in :

No, was printing 'P' to display, while the addresses go to PC via RS232. You can see the display in action here, those defines are correct:

formatting link

Reply to
Jan Panteltje

An interesting thing is that if it were absolute sequential addressing, the third line should overwrite half of the second. It must be magic; that's the only logical explanation.

--
John
Reply to
John O'Flaherty

Usually 0x00, 0x40, 0x20, 0x60

Probably if you looked more closely at the HD44780-based chipset and physical constraints it would make more sense.

Best regards, Spehro Pefhany

--
"it\'s the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

On a sunny day (Mon, 04 Feb 2008 06:07:37 -0600) it happened John O'Flaherty wrote in :

No, it is 20 chars / line, so the third line starts at 20, and ends at 39.

Reply to
Jan Panteltje

"Jan Panteltje" schreef in bericht news:fo6tuc$krv$ snipped-for-privacy@aioe.org...

I see no logic in this sequence. An explanation may be that some hardware/chip designer was messing up the address lines. Or he used another "logic" for line four. The first three ones are continous but for line four only an extra address line is used with respect to line three. Which leaves a hole that is not uncommon in I/O addressing, though not in RAM adressing. BTW do you have RAM in the addresses 60-83? And beyond 104?

petrus bitbyter

Reply to
petrus bitbyter

On a sunny day (Mon, 4 Feb 2008 15:17:07 +0100) it happened "petrus bitbyter" wrote in :

If you go beyond 104, 128+104 = 232, so 232 to 255 is the only space left that can be used, as the MSB must always be one, as the screen was already filled by then with 'P's I could not say if new 'P's were overwriting the old.

There is nothing going to the display IIRC between line 2 and 3 for 59 to 84,

I did set up a loop 0-127 but was only watching for line3 and line4 start. The PIC has now been programmed with the real stuff, so I cannot check again in a simple way.

Reply to
Jan Panteltje

In message , Spehro Pefhany writes

There may be an option to support 6 line LCD displays of 20 char. In which case the full set of 6 magic constants don't look quite so crazy.

0x00, 0 +00, +20, +40 0x00, 64 +00, +20, +40

3 from one bank and 1 from the other still looks odd to me though. Maybe it shaves $0.01 off the manufacturing cost to do it this way.

Regards,

--
Martin Brown
Reply to
Martin Brown

At some point, AFIUI, you go to two independent HD44780 controllers, at which point all reason goes out the window.

Reply to
Spehro Pefhany

No. It is 0x13 chars/line so the third line starts at 0x20 and ends at

0x33
Reply to
Spehro Pefhany

On a sunny day (Mon, 04 Feb 2008 12:13:31 -0500) it happened Spehro Pefhany wrote in :

Sorry, all values I specided ARE IN HUMAN DECIMAL FORM. line 3 starts at 20 dec, so line 3 holds:

20 'A' 21 'r' 22 'e' 23 ' ' 24 'Y' 25 'o' 26 'u' 27 ' ' 28 'K' 29 'i' 30 'd' 31 'd' 32 'i' 33 'n' 34 'g' 35 '' 36 'M' 37 'e' 38 '?' 39 '?' start line 2: 40
Reply to
Jan Panteltje

Yes that looks correct, First and Third lines are sequential, then second and fourth.

Don't ask why....

Cheers

Reply to
Martin Riddle

fourth.

But the second and fourth aren't sequential.

--
John
Reply to
John O'Flaherty

fourth.

Your right, some snippets form a 4 line display commonly available:

Reply to
Martin Riddle

fourth.

Your right, here is my old code for a 4 line jobber:

/* Display line addresses */

#define LINE1 0x00

#define LINE2 0X40

#define LINE3 0x14

#define LINE4 0x54

Cheers

Reply to
Martin Riddle

On a sunny day (Tue, 05 Feb 2008 23:14:57 GMT) it happened "Martin Riddle" wrote in :

fourth.

Thank you, confirms I do not have a bad one, they are all like that.

Reply to
Jan Panteltje

and fourth.

All the examples I've seen so far have been symmetrical. If the 4th line on yours started at 0x50 = 80 it would be more consistent.

Best regards, Spehro Pefhany

--
"it\'s the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.