LCD 20x4 with KS0073 controller

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
beambase
Posts: 94
Joined: Wed Jul 29, 2009 5:15 pm
Has thanked: 6 times
Been thanked: 8 times

LCD 20x4 with KS0073 controller

Post by beambase »

Hi,
I am trying to geta LCD display with a KS0073 to work in Flowcode.
It is supposed to be "Near 100% compatible with HD44780" but so far no luck.
The programs works with other HD44780 compatible LCDs that I tried but not with this one.
Does anyone have any experince with the KS0073 and what to change in the LCD macro to get it to work?

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times

Re: LCD 20x4 with KS0073 controller

Post by Sean »

The KS0073 has an extra communication mode (serial - looks like SPI). Selection is controlled by an IM input.
Is this line available?
Is it configured for parallel communications?

In parallel mode, the 4-bit bus option required by Flowcode seems to be supported.

beambase
Posts: 94
Joined: Wed Jul 29, 2009 5:15 pm
Has thanked: 6 times
Been thanked: 8 times

Re: LCD 20x4 with KS0073 controller

Post by beambase »

The option SPI / 4 or 8 bit databus is controlled with a link on the LCD. It is set to 4 or 8 bit databus mode. The only other thing is that there is a separate pin for a reset line. It has a internal 10k pullup resistor and should not need to be connected if not used.

Data of the display can be found here:
http://www.lcd-module.com/eng/pdf/doma/dip204-4e.pdf

Thanks for your help.

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

Re: LCD 20x4 with KS0073 controller

Post by Benj »

Hello,

In most cases the compatible LCD's should just fire up. Other then that you may have to change the delays or the commands slightly to allow the display to work. Does the display have the normal set of connections? Might be worth comparing the timing information from the datasheets to see if you can spot the difference.

beambase
Posts: 94
Joined: Wed Jul 29, 2009 5:15 pm
Has thanked: 6 times
Been thanked: 8 times

Re: LCD 20x4 with KS0073 controller

Post by beambase »

All the normal connections like D0-D7 or D0-D3 in 4 bit mode are there. Also RS and Enable etc.
Where do I change the timing for the LCD componernt i Flowcode?

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

Re: LCD 20x4 with KS0073 controller

Post by Benj »

Hello,

Are you aware when in 4-bit mode the LCD uses the upper nibble of the data bus. Eg the pin marked data 1 in Flowcode should go to the fifth data pin on the LCD etc.

If you have already done this then you will have to use the code customization feature to change the delay timings in the init and rawsend functions.

beambase
Posts: 94
Joined: Wed Jul 29, 2009 5:15 pm
Has thanked: 6 times
Been thanked: 8 times

Re: LCD 20x4 with KS0073 controller

Post by beambase »

I tried to implement the following code wich is an example from the display manufacturer into the Custom Code Start macro.

But no luck so faar.

GLOBAL void LcdClr(void)
{
lcdbefout(0x01); // Display l”schen
}

GLOBAL void LcdInit(void)
{
ClrBit(DMRESPORT, DMRES);
waitms(2);
SetBit(DMRESPORT, DMRES);
waitms(50);

lcdbefout(0x34); // Function Set: 8-Bit, Bit RE=1
lcdbefout(0x09); // ext. Function Set: 4 Zeilen Modus
lcdbefout(0x30); // Function Set: 8-Bit, Bit RE=0
lcdbefout(0x0C); // Display On/Off: Display ein, Cursor aus
lcdbefout(0x06); // Entry Mode Set: Cursor Auto-Increment

LcdClr();
}

Any ideas what to do to get this display working?

Post Reply