LCD display showing Japanese Characters

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Lord Grezington
Flowcode V4 User
Posts: 230
Joined: Wed Nov 02, 2011 11:15 pm
Has thanked: 18 times
Been thanked: 23 times
Contact:

LCD display showing Japanese Characters

Postby Lord Grezington » Wed Jul 24, 2019 12:33 pm

Hello All

I have been using the WH0802A-YYH-JT display for a long while now without any issues (datasheet attached). But I have recently redesigned the PCB to make simpler use of the backlight. So in order to do this, I changed the display to the RC0802A1-LLR-JWVE (again attached), however, the characters are now displayed in Japanese...

The datasheets for both displays both say they incorporate English and Japanese characters. The ROM pattern for both displays ar the same (Table 2 on both datasheets).

When doing a comparison to the English and Japanese characters, it can be noted that the only difference I am seeing is that the first bit of the upper four bits seems to be displaying high rather than low. So the English characters corrolate perfectly with the Japanese ones

Untitled.jpg
Untitled.jpg (155.3 KiB) Viewed 678 times


I have read another forum (https://www.newhavendisplay.com/NHD_for ... topic=65.0). I think the IC's used may be different using a slightly different speed. Question is how do I resolve this without using the 8bit data (as it means re-designing the PCB), and secondly, the code uses was using FC5. I have never had any luck being able to transfer the programs over from one version to another. So if possible a FC5 solution is preferable, if not I can look at redoing the program in FC8.

Thanks
Attachments
WH0802A-YYH-JT 8x2 LCD.pdf
(733.15 KiB) Downloaded 18 times
RC0802A1-LLR-JWVE.pdf
(1.33 MiB) Downloaded 17 times

User avatar
Benj
Matrix Staff
Posts: 14157
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4330 times
Been thanked: 4080 times
Contact:

Re: LCD display showing Japanese Characters

Postby Benj » Wed Jul 24, 2019 12:39 pm

Hello,

You might want to try this.

Find the file "Flowcode 5\PIC\Components\FC5_PIC_LCDDisplay.c"

Copy to somewhere editable e.g. your desktop and open in a text editor.

Find the RawSend function and add a second delay before setting the enable pin high.

e.g.

%a_DELAY;
FC_CAL_Bit_High (%a_PORT5, %a_E);


would become

%a_DELAY;
%a_DELAY;
FC_CAL_Bit_High (%a_PORT5, %a_E);


This code happens twice in the function.

Not sure if this helps but it might, otherwise maybe try the 30 day trial of v8 and see if it solves the issue for you.

Lord Grezington
Flowcode V4 User
Posts: 230
Joined: Wed Nov 02, 2011 11:15 pm
Has thanked: 18 times
Been thanked: 23 times
Contact:

Re: LCD display showing Japanese Characters

Postby Lord Grezington » Wed Jul 24, 2019 1:35 pm

Hi Ben

Thanks, I will try the fix on V5.

I do have a licence for FC8, but using FC8 has the same problem (with all the patches and all updates).

If I add the delay in the folders you suggested, would this prevent the stander LCD's from working correctly when compiled?

Thanks

User avatar
Benj
Matrix Staff
Posts: 14157
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4330 times
Been thanked: 4080 times
Contact:

Re: LCD display showing Japanese Characters

Postby Benj » Wed Jul 24, 2019 1:49 pm

Hello,

I don't see the mod breaking the functionality for standard displays it's basically just allowing more setup time for the data and RS pins before strobing the E pin.

Do you have a datasheet for the display which might show specific timings required?

Edit, sorry just seen this is attached on your first post. This shows a setup time as 40 - 50ns so I'm surprised your having the problem.

Lord Grezington
Flowcode V4 User
Posts: 230
Joined: Wed Nov 02, 2011 11:15 pm
Has thanked: 18 times
Been thanked: 23 times
Contact:

Re: LCD display showing Japanese Characters

Postby Lord Grezington » Wed Jul 24, 2019 4:17 pm

Hi Ben

Unfortunatly the Fix for V5 did not work, I still had the Japanese charactors.

With V8, I did a hello world and then ran it on hardware on both display types. I have attached the program and below are the pictures.

WhatsApp Image 2019-07-24 at 16.04.37.jpeg
WhatsApp Image 2019-07-24 at 16.04.37.jpeg (62.23 KiB) Viewed 666 times


WhatsApp Image 2019-07-24 at 16.06.15.jpeg
WhatsApp Image 2019-07-24 at 16.06.15.jpeg (59.35 KiB) Viewed 666 times


Do you have any other possible fixes?

Thanks
Attachments
Hello World.fcfx
(14.62 KiB) Downloaded 17 times

Lord Grezington
Flowcode V4 User
Posts: 230
Joined: Wed Nov 02, 2011 11:15 pm
Has thanked: 18 times
Been thanked: 23 times
Contact:

Re: LCD display showing Japanese Characters

Postby Lord Grezington » Fri Jul 26, 2019 9:45 am

Hi Ben

Sorry to push, but I need to try and get this resolved. Do you have any other idea's I can try? I am under a little bit of pressure to get this resolved.

Thanks

User avatar
Benj
Matrix Staff
Posts: 14157
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4330 times
Been thanked: 4080 times
Contact:

Re: LCD display showing Japanese Characters

Postby Benj » Fri Jul 26, 2019 10:14 am

Maybe the bit pattern is reversed on those displays is all I can come up with? Though this is a fairly serious error with the display if it is the case.

Have a go using this as your RawSend function. I've commented the line of code I changed. Note this will break normal working displays.


Code: Select all

void RawSend(MX_UINT8 in, MX_UINT8 mask)
{
/*Macro_RawSend_Start*/

   MX_UINT8 pt;

   FC_CAL_Bit_Low(%a_PORT0, %a_BIT0);
   FC_CAL_Bit_Low(%a_PORT1, %a_BIT1);
   FC_CAL_Bit_Low(%a_PORT2, %a_BIT2);
   FC_CAL_Bit_Low(%a_PORT3, %a_BIT3);
   FC_CAL_Bit_Low(%a_PORT4, %a_RS);
   FC_CAL_Bit_Low(%a_PORT5, %a_E);
   pt = ((in >> 4) & 0x0f);
   if (pt & 0x01)
       FC_CAL_Bit_High(%a_PORT0, %a_BIT0);
   if (pt & 0x02)
       FC_CAL_Bit_High(%a_PORT1, %a_BIT1);
   if (pt & 0x04)
       FC_CAL_Bit_High(%a_PORT2, %a_BIT2);
   if ((pt & 0x08) == 0)                                              //Edited this line
       FC_CAL_Bit_High(%a_PORT3, %a_BIT3);
   if (mask)
       FC_CAL_Bit_High(%a_PORT4, %a_RS);
   %a_DELAY;
   FC_CAL_Bit_High (%a_PORT5, %a_E);
   %a_DELAY;
   FC_CAL_Bit_Low (%a_PORT5, %a_E);
   pt = (in & 0x0f);
   %a_DELAY;
   FC_CAL_Bit_Low(%a_PORT0, %a_BIT0);
   FC_CAL_Bit_Low(%a_PORT1, %a_BIT1);
   FC_CAL_Bit_Low(%a_PORT2, %a_BIT2);
   FC_CAL_Bit_Low(%a_PORT3, %a_BIT3);
   FC_CAL_Bit_Low(%a_PORT4, %a_RS);
   FC_CAL_Bit_Low(%a_PORT5, %a_E);
   if (pt & 0x01)
       FC_CAL_Bit_High(%a_PORT0, %a_BIT0);
   if (pt & 0x02)
       FC_CAL_Bit_High(%a_PORT1, %a_BIT1);
   if (pt & 0x04)
       FC_CAL_Bit_High(%a_PORT2, %a_BIT2);
   if (pt & 0x08)
       FC_CAL_Bit_High(%a_PORT3, %a_BIT3);
   if (mask)
       FC_CAL_Bit_High(%a_PORT4, %a_RS);
   %a_DELAY;
   FC_CAL_Bit_High (%a_PORT5, %a_E);
   %a_DELAY;
   FC_CAL_Bit_Low (%a_PORT5, %a_E);
   %a_DELAY;

/*Macro_RawSend_End*/
}

Lord Grezington
Flowcode V4 User
Posts: 230
Joined: Wed Nov 02, 2011 11:15 pm
Has thanked: 18 times
Been thanked: 23 times
Contact:

Re: LCD display showing Japanese Characters

Postby Lord Grezington » Fri Jul 26, 2019 11:21 am

Hi Ben

Just to make sure...

Do you want me to change the F5 or the V8 RawSend .c file?

Then do I need to use the RawSend function on the LCD macro?

Thanks

User avatar
Benj
Matrix Staff
Posts: 14157
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4330 times
Been thanked: 4080 times
Contact:

Re: LCD display showing Japanese Characters

Postby Benj » Fri Jul 26, 2019 1:33 pm

Hello,

Do you want me to change the F5 or the V8 RawSend .c file?
Then do I need to use the RawSend function on the LCD macro?


v5 and this will overwrite everything for you, print string, print ascii etc all use RawSend behind the scenes.
This is not something you can do in v8.

I'll be surprised if it works as that suggests there is something very off about the displays. Maybe they are known defects and being sold off on the cheap?

Lord Grezington
Flowcode V4 User
Posts: 230
Joined: Wed Nov 02, 2011 11:15 pm
Has thanked: 18 times
Been thanked: 23 times
Contact:

Re: LCD display showing Japanese Characters

Postby Lord Grezington » Mon Jul 29, 2019 3:17 pm

Hi Ben

They were £10 each off Ebay... May be problematic, but was the only place I could find them at the time with the 16pins. I have now found some on RS components, I have ordered them. I will let you know if its resolved.

Graham
These users thanked the author Lord Grezington for the post:
Benj (Mon Jul 29, 2019 5:29 pm)
Rating: 5.56%
 

User avatar
Benj
Matrix Staff
Posts: 14157
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4330 times
Been thanked: 4080 times
Contact:

Re: LCD display showing Japanese Characters

Postby Benj » Mon Jul 29, 2019 5:29 pm

Thanks Graham,

I take it the last v5 fix didn't solve the problem then.