Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
Thread Tools Display Modes
Old 28th October 2007, 01:18 PM   (permalink)
Experienced Member
mcs51mc is on a distinguished road
Default Need more than 8 user defined characters

Hi there,

I need more than eight user defined characters in one LCD screen.
How can that be done using the HD44780U display controller?

What I want to do?
Combine four adjacent (5*7 dots) characters + cursor to one big number. Characters 1 and 2 from lines 1 and 2 will result in one big number.

I thought of following steps:
1) make four user defined characters (1 to 3) for a big 1
2) write those characters on the display
3) make four user defined characters (1 to 3) for a big 2
4) write the new characters in the display, and so on… …

With the above sequence I thought I will end up with a large 12 on the display but:
The first written big number 1 is overwritten by an even big 2 so I end up with 22 instead of 12.

With a delay between the two write sequences I clearly first see a big 1 and then a big 22.
So the display don’t copy the data of the user defined characters into DDRAM but the address of the user defined character.

Thanks for any inputs… …
mcs51mc is offline   Reply With Quote
Old 28th October 2007, 04:29 PM   (permalink)
Experienced Member
 
Blog Entries: 4
blueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to behold
Send a message via Skype™ to blueroomelectronics
Default

It's a limitation of all those Hitachi based displays. There is only 8 bytes for custom characters. But your description should work as it's only 8 charaters.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now   Reply With Quote
Old 28th October 2007, 04:41 PM   (permalink)
Super Moderator
 
Nigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to behold
Default

Quote:
Originally Posted by blueroomelectronics
It's a limitation of all those Hitachi based displays. There is only 8 bytes for custom characters. But your description should work as it's only 8 charaters.
You've misunderstood what he's trying to do, he needs TWO defined characters per digit - one for the top half, and one for the bottom half (one complete digit across the two lines).
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 29th October 2007, 02:00 AM   (permalink)
Experienced Member
Pommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to behold
Default

He's only using 4 characters (0-3 not 1-3 as stated) and overwriting then with the 2nd digit.

mcs,
If you write 1 to chars 0-3 and 2 to chars 4-7 then you will be able to display 12 on your display. You will not however be able to display any other digits at the same time. If you only want to count from 00 to 99 then you can do it, otherwise you can't.

Mike.
Pommie is offline   Reply With Quote
Old 29th October 2007, 03:29 AM   (permalink)
Experienced Member
 
Blog Entries: 1
Sceadwian is just really niceSceadwian is just really niceSceadwian is just really nice
Send a message via AIM to Sceadwian Send a message via Yahoo to Sceadwian
Default

Could you PWM it? Load the 8 charactors, display the first line for a few ms's clear it, load the next 8 charactors then display the lower line and switch back and forth really fast? According to the PDF at 5 volts you can communicate at 2MHZ. With an 8 bit interface you should be able to switch the lines fast enough to get it to work, but it would require the MCU to pay a lot more attention to the display.
__________________
Curiosity killed the cat; That's why they have nine lives.

Sceadwian is offline   Reply With Quote
Old 29th October 2007, 06:46 AM   (permalink)
Experienced Member
mcs51mc is on a distinguished road
Default

Thanks for the reactions guys,

Blueroom & Nigel;
I use 4 characters for 1 digit, two on the top line and two on the bottom line. Otherwise the aspect ratio width/height of the digits will be very bad

Pommie;
You're wright it's 0 to 7 in the HD44780U but I wrote a LCD library long time ago and I numberd them 1 to 8. In my post I refered to the numbers I use in my library.
I already tried your idea with the 8 user defined characters and indeed it works but I want to write HH:MM:SS on an LCD

Sceadwian;
I already tried PWM but I didn't clear the display in between two consecutive writes . I'll try that this evening.


Beside this way of working, could anyone think of another way to write to the LCD?
mcs51mc is offline   Reply With Quote
Old 29th October 2007, 06:49 AM   (permalink)
Experienced Member
 
Gordz is on a distinguished road
Default

You should be able to create and load the custom characters into display ram 'on the fly' as the displayed pixel information is not changed until the print position is overwritten with something else. Try create a custom char, display it, then create another custom char in the same custom location and display that.
Gordz is offline   Reply With Quote
Old 29th October 2007, 07:59 AM   (permalink)
Experienced Member
 
ericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to behold
Default

Quote:
Originally Posted by Gordz
You should be able to create and load the custom characters into display ram 'on the fly' as the displayed pixel information is not changed until the print position is overwritten with something else. Try create a custom char, display it, then create another custom char in the same custom location and display that.
hi,
This is exactly way I would tackle the problem, create the special symbols in a table and reload the display in real time.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Nigel's: www.winpicprog.co.uk/
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is offline   Reply With Quote
Old 29th October 2007, 08:34 AM   (permalink)
Experienced Member
Pommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to behold
Default

Quote:
Originally Posted by Gordz
You should be able to create and load the custom characters into display ram 'on the fly' as the displayed pixel information is not changed until the print position is overwritten with something else. Try create a custom char, display it, then create another custom char in the same custom location and display that.
This is not how character based displays work. If you print the character a number of times and then change the definition, the characters on screen will change. The only "display ram" is the ram that contains the character numbers (1 byte per character location), there is no pixel data type ram.

Multiplexing (described as pwm above) the display may work but I think it will be very faint. Changing the contrast may improve things.

Mike.
Pommie is offline   Reply With Quote
Old 29th October 2007, 09:28 AM   (permalink)
Experienced Member
 
ericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to behold
Default

hi,
This is another way you could use just 8 special characters.

Its based on the standard 7 segment display pattern.

You could double the width/height of the special character 'segments' to give a better looking digit.

EDITED: added a pix of the LCD display, special characters on the fly, its a crappy display, due to the physical gaps in the LCD layout.
Had to use a 20 character LCD for this demo.
Attached Images
File Type: gif LCDspec1a.gif (59.6 KB, 17 views)
File Type: jpg screenhunter1.jpg (7.9 KB, 12 views)
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Nigel's: www.winpicprog.co.uk/
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/

Last edited by ericgibbs; 29th October 2007 at 10:49 AM.
ericgibbs is offline   Reply With Quote
Old 29th October 2007, 11:29 AM   (permalink)
Experienced Member
mcs51mc is on a distinguished road
Default

Hi Eric,

I can't implement your solution since I have to treat each sub-character as one item.
You can't say user defined character 0 (udc) is segement a, udc1 is segment b and so on to udc7 is segment h.
In your example is udc1 segments a, c, e (upper left character); udc2 segments b, g, f (upper right character) and so on. That way I need more than 8 udc's for all possible combinations.

Or did I misunderstand your example?

Thanks anyway to help me out on this one
mcs51mc is offline   Reply With Quote
Old 29th October 2007, 11:35 AM   (permalink)
Experienced Member
 
ericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to behold
Default

Quote:
Originally Posted by mcs51mc
Hi Eric,

I can't implement your solution since I have to treat each sub-character as one item.
You can't say user defined character 0 (udc) is segement a, udc1 is segment b and so on to udc7 is segment h.
In your example is udc1 segments a, c, e (upper left character); udc2 segments b, g, f (upper right character) and so on. That way I need more than 8 udc's for all possible combinations.

Or did I misunderstand your example?

Thanks anyway to help me out on this one
Hi,
The concept is to use the bars as per a standard 7 segment display.
You will have to 'create' the LCDs 5*8 pix block, in real time, for each digit, using the 7 segment idea.

Its messy, but it can be done. I think the simple test, showing the '8's convinced me that it wont look very 'elegant' as a total display.

What language do you use for writing programs?
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Nigel's: www.winpicprog.co.uk/
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is offline   Reply With Quote
Old 29th October 2007, 03:26 PM   (permalink)
Experienced Member
 
ericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to behold
Default

hi mcs,

Done some test programs for the 'time' display.

Attached a picture taken from my PIC Sim.

This using a 2 * 16 LCD.

What do you think?
Attached Images
File Type: jpg screenhunter2.jpg (8.8 KB, 17 views)
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Nigel's: www.winpicprog.co.uk/
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is offline   Reply With Quote
Old 29th October 2007, 03:38 PM   (permalink)
Experienced Member
Pommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to behold
Default

It doesn't work.

For the first number (2) you need 4 characters.
For the 3 you need an additional 2 characters - bottom 2.
For the 4 you need 3 more - all of them.

That's nine already and we're not even half way through.

Mike.
Pommie is offline   Reply With Quote
Old 29th October 2007, 04:15 PM   (permalink)
Experienced Member
 
ericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to behold
Default

Quote:
Originally Posted by Pommie
It doesn't work.

For the first number (2) you need 4 characters.
For the 3 you need an additional 2 characters - bottom 2.
For the 4 you need 3 more - all of them.

That's nine already and we're not even half way through.

Mike.
Hi Mike,
I am sitting here watching my PIC count up/down, using the segment method.

As I explained to mcs, he has to change the special characters in real time.
I have defined 0 thru 9 digits, then I load them to the LCD ram location and call them from within the program.

The program is set to refresh/update only the digits that have changed.

Regards
Attached Images
File Type: jpg screenhunter3.jpg (6.7 KB, 12 views)
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Nigel's: www.winpicprog.co.uk/
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/

Last edited by ericgibbs; 29th October 2007 at 04:17 PM.
ericgibbs is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
User defined characters-alfanumeric LCD ady689 Micro Controllers 13 30th October 2007 07:03 AM
MP Lab Program Help bamafan54 Micro Controllers 3 19th October 2007 02:53 AM
User defined Time period 16f628 jagrolet Micro Controllers 4 5th September 2006 07:37 PM
compiling with MPLAB evandude Micro Controllers 4 9th April 2005 08:08 AM
An error in pic16f84a, why? Zener_Diode Micro Controllers 6 11th April 2004 02:55 AM



All times are GMT. The time now is 05:28 AM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.