LCD 16X1 problem
Moderator: Benj
- fotios
- Posts: 458
- Joined: Mon Feb 08, 2010 10:17 am
- Location: Greece
- Has thanked: 109 times
- Been thanked: 117 times
LCD 16X1 problem
Hello
I bought two 16X1 LCDs, one cheap from e-bay and one expensive MIDAS with large characters from Farnell UK, both compatible with Hitachi HD44780 controller. If are configured in FlowCode as 16X1 only the first 8 characters are printed. If are configured as 8X2 then with proper calculation of cursor X/Y coordinates both can print correctly. OK the problem with this trick could be resolved but i have to write a huge code for a very complex project and the use of double component macros is not only time consumming, is also program memory consumming.
Can anyone help me please?
Thanks
I bought two 16X1 LCDs, one cheap from e-bay and one expensive MIDAS with large characters from Farnell UK, both compatible with Hitachi HD44780 controller. If are configured in FlowCode as 16X1 only the first 8 characters are printed. If are configured as 8X2 then with proper calculation of cursor X/Y coordinates both can print correctly. OK the problem with this trick could be resolved but i have to write a huge code for a very complex project and the use of double component macros is not only time consumming, is also program memory consumming.
Can anyone help me please?
Thanks
Best Regards FOTIS ANAGNOSTOU
-
- Posts: 438
- Joined: Mon Aug 29, 2011 12:26 am
- Location: arizona
- Has thanked: 175 times
- Been thanked: 173 times
Re: LCD 16X1 problem
hey fotio's i don't have a 16x1 but i pretended i did with a 16x2... assumming that the address is starting with 0x0 for first char and char 8 is 0x40, give this a try
in supp window i created these variables
then i created a new function for lcd called "check_line_status" in customize code section which is here
also in customize code section delete and replace code in lcd with the code in example for these c code funtions
clear, print_string, print_number, print_ascii, cursor
this should work in the background to make it do what you want
in supp window i created these variables
Code: Select all
char char_count=0;
char change_line=0;
Code: Select all
if(char_count>7 && change_line==0){
change_line=1;
Cursor(0,1);
}
char_count=char_count+1;
clear, print_string, print_number, print_ascii, cursor
this should work in the background to make it do what you want

- Attachments
-
- 16x1 temp fix.fcf
- (15.86 KiB) Downloaded 392 times
-
- Posts: 594
- Joined: Thu Sep 17, 2009 7:52 am
- Location: Belgium
- Has thanked: 63 times
- Been thanked: 102 times
Re: LCD 16X1 problem
Have you tried just keeping the configuration at 16x2 and only writing on the first line ?
- fotios
- Posts: 458
- Joined: Mon Feb 08, 2010 10:17 am
- Location: Greece
- Has thanked: 109 times
- Been thanked: 117 times
Re: LCD 16X1 problem
Yes, i tried the 16X2 configuration but again the same problem, only first 8 characters are printed.Spanish_dude wrote:Have you tried just keeping the configuration at 16x2 and only writing on the first line ?
Thanks friend by anyway.
Best Regards FOTIS ANAGNOSTOU
-
- Posts: 594
- Joined: Thu Sep 17, 2009 7:52 am
- Location: Belgium
- Has thanked: 63 times
- Been thanked: 102 times
Re: LCD 16X1 problem
It must be that the DDRAM on your LCD is re-arranged differently than on the 16x2 LCD from Matrix Multimedia, even though it's compatible with the HD44780 controller.
Maybe it's like Brandonb said. Instead of having a continuous DDRAM line from 0x00 to 0x0F, you have an LCD with a DDRAM going from 0x00 to 0x07 for the first half and 0x40 to 0x47 for the other half.
Maybe it's like Brandonb said. Instead of having a continuous DDRAM line from 0x00 to 0x0F, you have an LCD with a DDRAM going from 0x00 to 0x07 for the first half and 0x40 to 0x47 for the other half.
- fotios
- Posts: 458
- Joined: Mon Feb 08, 2010 10:17 am
- Location: Greece
- Has thanked: 109 times
- Been thanked: 117 times
Re: LCD 16X1 problem
My LCD is 16X1. Here a picture how it prints in 8X2 configuration. Attached is the datasheet.
- Attachments
-
- Pilium LCD1.jpg (120.26 KiB) Viewed 10472 times
-
- MIDAS LCD 1X16.pdf
- (1.29 MiB) Downloaded 387 times
Best Regards FOTIS ANAGNOSTOU
- fotios
- Posts: 458
- Joined: Mon Feb 08, 2010 10:17 am
- Location: Greece
- Has thanked: 109 times
- Been thanked: 117 times
Re: LCD 16X1 problem
OK fellow, since you persist on it, here is the - incomplete - fcf till now.brandonb wrote:fotio's post your flowchart and i'll change the code to make it work for you
- Attachments
-
- PILIUM_CONTROL_LCD.fcf
- (85.84 KiB) Downloaded 384 times
Best Regards FOTIS ANAGNOSTOU