38H means 38 hexadecimal, you simply decide what bits you need to set, and generate the hexadecimal value for it - or you could use a binary value?, in which case it's B'00111000'
38H means 38 hexadecimal, you simply decide what bits you need to set, and generate the hexadecimal value for it - or you could use a binary value?, in which case it's B'00111000'
Ah 4x20 means four lines of 20 characters. You do seem to be struggling a bit here. Maybe you should back up and compose a set of questions whose answers will get you back on track. You might start with a link to the LCD datasheet so we can all be on the same page.
I suspect there is more to the initialization than 38H.
IMO, the OP is obviously using a 8 wire configuration with his 2*16 LCD,
which suggests to me he wants to use the same PIC wiring for a 2*20 LCD,
so why is the initialise 0x38, nonsense?
IMO, the OP is obviously using a 8 wire configuration with his 2*16 LCD,
which suggests to me he wants to use the same PIC wiring for a 2*20 LCD,
so why is the initialise 0x38, nonsense?
IMO, the OP is obviously using a 8 wire configuration with his 2*16 LCD,
which suggests to me he wants to use the same PIC wiring for a 2*20 LCD,
so why is the initialise 0x38, nonsense?
When they designed the chip they had no way to know if it would be used in 4 or 8 bit mode and so the initialisation had to use only the top 4 bits.
Once the chip is initialised and the data width is selected then writing 0x38 is perfectly valid. The initiation, however, is different and should not be relied upon to setup any registers.
When they designed the chip they had no way to know if it would be used in 4 or 8 bit mode and so the initialisation had to use only the top 4 bits.
Once the chip is initialised and the data width is selected then writing 0x38 is perfectly valid. The initiation, however, is different and should not be relied upon to setup any registers.