I tried to use a 2*20 LCD (type JHD202C with standard HD44780 like chip) with LPC core, but it was unsuccesful. After I checked all the connections and soldering, I compared the universal LCD driver with the datasheet. I found in the LCD init part of the universal LCD driver code :
// initialize LCD
MIOS32_BOARD_J15_DataSet(0x38);
MIOS32_BOARD_J15_RS_Set(0);
MIOS32_BOARD_J15_E_Set(mios32_lcd_device, 1);
MIOS32_BOARD_J15_E_Set(mios32_lcd_device, 0);
MIOS32_BOARD_J15_RW_Set(0);
MIOS32_DELAY_Wait_uS(50000);
In the first init command the RW set to zero after the E line trigger, but I think it should be before. As I haven’t install the toolchain jet. could anybody please check that my founding was correct or not?
Thanks for the fast response, first of all, let me say a big thanks for this amazing project. I totally agree with the timing issue, but I’m thinking about the initialization process of the LCD. According the data sheet:
It states, that in the first 3 init instruction the RW line should be at zero, but in the code, the RW line set to zero after the first instruction (after the E line pulse). I checked the MIOS8 LCD code, and there the sequence is according the data sheet. So I suggest the following code for the first init command:
You are right, it doesn’t make sense, where the RW set to zero is. I double checked all the connections, also the 5V jumper is OK. I have a 4*20 LCD on my MIOS8, which is working OK, sothe next step will be creating a cross connect cable, I’ll try this LCD width my MIOS8 core and the 4*20 width the LPC core. I hope it will show where the problem is.
I found the solution, but it’s a litle bit strange: I changed the IC2 from HCT595 to HC595. Even that the schematic suggest HCT595 for 5V LCD-s, my LCDs didn’t work with it, but both work perfect with the HC595. I don’t know wether others have same experience?
Thank you for this information. I’m a bit surprised, but removed the reference to the 74HCT595 from the schematic before trying to understand the reason.
Background: other users probably never noticed issues, since the 74HC595 is recommended in the part list, simply because the 74HCT595 can’t be ordered from Reichelt.
Even I only own 74HC595 devices and was never able to test this with a 74HCT595.
On the other hand I was reading somewhere that 74HCT is more suitable for conversion to TTL level (5V)… I also checked input level requirements, and output level ranges, it looked plausible.
Apparently I overlooked something…
However, in the last months it has been proven with the STM32 module, that the 74HC595 works fine for 3.3V -> 5V level conversion. Therefore it’s now the only recommended solution.