Crystalfontz 20/4 LCD display

Forum for problems or queries regarding other Flowcode Components. Eg LEDs, Switches, LCD, Gfx LCD etc

Moderators: Benj, Mods

Post Reply
Sefi
Posts: 56
Joined: Mon Sep 29, 2008 10:26 am
Has thanked: 9 times
Been thanked: 14 times
Contact:

Crystalfontz 20/4 LCD display

Post by Sefi »

Hello,

I am new to Flowcode and have a problem with driving a CrystalFontz 4 line 20 character alphanumeric LCD display using a PIC 18F4320.

This set up works perfectly well using PROTON Plus compiler but the same code on FlowCode produces garbage on the screen.

My set up is as follows:

I am using porte.0 to send serial data to the LCD. The LCD expects to receive data at 19200 baud. I cant see how I can adjust the rate of sending the data to the LCD in flowcode. I am using a 10Mhz oscillator. The circuit works using simple LEDs to check timings etc. But all I see on the LCD is garbage.

Does anyone have any experience of this?

Many thanks for your help.

Sefi

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

Re: Crystalfontz 20/4 LCD display

Post by Sean »

Hello Sefi,

The Flowcode LCD component is compatible with devices that support the HD44780 style 4-bit parallel interface. You seem to have a component with a serial (RS232) interface. It might still be possible to use this component with Flowcode, but you would need to use the RS232 component to send raw data.

If the LCD device has a logic (TTL) level serial interface it will be possible to connect it directly to the USART I/O lines (RXD, TXD) of the PIC. Otherwise you will need an RS232 level converter (example available as E-Block EB-015).

Sefi
Posts: 56
Joined: Mon Sep 29, 2008 10:26 am
Has thanked: 9 times
Been thanked: 14 times
Contact:

Re: Crystalfontz 20/4 LCD display

Post by Sefi »

Thanks Sean for your reply. As the circuit is already built, I have no option but to use the pin already assigned to the LCD output (pin porte.0). Is there anyway around this? The circuit works perfectly well using PROTON PLUS (basic). (You may ask why I am changing to using FlowCode ;-)

I thought it would be easier than coding!

Thanks.

Sefi

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: Crystalfontz 20/4 LCD display

Post by Benj »

Hello

Check out the bit banged rs232 out code available from here.

http://www.matrixmultimedia.com/Flowcode_Examples.php

This will allow you to use your existing hardware via a software UART. Then simply use the bit bang routine to transmit the required data to the display.

Post Reply