![]() | ![]() | ![]() |
| | |||||||
| 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. |
| | Thread Tools | Display Modes |
| | (permalink) |
| Experienced Member | 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… … |
| | |
| | (permalink) |
| Experienced Member | 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. |
| | |
| | (permalink) | |
| Super Moderator | Quote:
| |
| | |
| | (permalink) |
| Experienced Member | 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. |
| | |
| | (permalink) |
| Experienced Member | 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. |
| | |
| | (permalink) |
| Experienced Member | 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 Beside this way of working, could anyone think of another way to write to the LCD? |
| | |
| | (permalink) |
| Experienced Member | 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. |
| | |
| | (permalink) | |
| Experienced Member | Quote:
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/ | |
| | |
| | (permalink) | |
| Experienced Member | Quote:
Multiplexing (described as pwm above) the display may work but I think it will be very faint. Changing the contrast may improve things. Mike. | |
| | |
| | (permalink) |
| Experienced Member | 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.
__________________ 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. |
| | |
| | (permalink) |
| Experienced Member | 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 |
| | |
| | (permalink) | |
| Experienced Member | Quote:
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/ | |
| | |
| | (permalink) |
| Experienced Member | 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?
__________________ Eric "Good enough is Perfect" PIC tutorials: Nigel's: www.winpicprog.co.uk/ Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ |
| | |
| | (permalink) |
| Experienced Member | 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. |
| | |
| | (permalink) | |
| Experienced Member | Quote:
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
__________________ 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. | |
| | |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| 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 |