Problem with frequency and LCD display

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Mikat
Posts: 258
Joined: Wed Nov 29, 2006 6:32 pm
Location: Finland
Has thanked: 7 times
Been thanked: 36 times
Contact:

Post by Mikat »

Steve,the problen should be in the 4mhz hello file,its one of the 3 hello files i sent to you,so you shoul to be able to test with it... The problen might be in controller,but i have 2 displays,acting same way,one have ks66u,and the other ks70b controller.. I try to test today one more display,it has "original" hitaci hd44780 controller.
And seems that the problem exist at 8mhz clock too,i quikly testd yesterday on 18f4585,and at least in it osc configured on 8mhz,and chip settings 8mhz the lcd prints mess..

User avatar
Steve
Matrix Staff
Posts: 3421
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Post by Steve »

does this problem still exist with the latest v1.3 of the LCD component?

Mikat
Posts: 258
Joined: Wed Nov 29, 2006 6:32 pm
Location: Finland
Has thanked: 7 times
Been thanked: 36 times
Contact:

Post by Mikat »

steve wrote:does this problem still exist with the latest v1.3 of the LCD component?

Yes it does.
And there is few other things,in my last project,when i use the lcd clear macro,the lcd starts print mess.. And when i test the files what Ben sent me,the cursor stays blinking after the last printed character (not sure was that every time),but that does not happen with delay and different chip clock..

Mikat
Posts: 258
Joined: Wed Nov 29, 2006 6:32 pm
Location: Finland
Has thanked: 7 times
Been thanked: 36 times
Contact:

Post by Mikat »

Hello guys.

I tested today with 2 more displays,the other was same Displaytech type,but different display,and the other was some old 2x16,and it has hd44780 controller,made by Hitaci,and both of those have the same problem...
So i dont think its a controller problem.
Have you tested my hello files,does those work on you hardware?

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:

Post by Benj »

Hello Mikat

The files you sent me compile and work fine on our LCDs here. Can you send me the .c, .fcf and the .hex files from your 4MHz program so I can see if it is your compiler at fault.

Mikat
Posts: 258
Joined: Wed Nov 29, 2006 6:32 pm
Location: Finland
Has thanked: 7 times
Been thanked: 36 times
Contact:

Post by Mikat »

Benj wrote:Hello Mikat

The files you sent me compile and work fine on our LCDs here. Can you send me the .c, .fcf and the .hex files from your 4MHz program so I can see if it is your compiler at fault.


Ill sent the files you today.
Was there the c,asm and hex files in the archive i sent to you,or did i forgot those?
If there was,have you tested the hex file i sent?
And have those files delay before lcd start macro?

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:

Post by Benj »

Was there the c,asm and hex files in the archive i sent to you,or did i forgot those?
I think it was just the .FCF files you sent before.

Mikat
Posts: 258
Joined: Wed Nov 29, 2006 6:32 pm
Location: Finland
Has thanked: 7 times
Been thanked: 36 times
Contact:

Post by Mikat »

Ben,i sent the files for you,tell us when you have tested those..

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:

Post by Benj »

Hello Mika

I have tested the hex files you sent me. They all seemed to work fine here. What type of crystal are you using and have you tried a different one. It may be that it is ever so slightly out and therefore is causing these irregularities in your LCD routine.

Mikat
Posts: 258
Joined: Wed Nov 29, 2006 6:32 pm
Location: Finland
Has thanked: 7 times
Been thanked: 36 times
Contact:

Post by Mikat »

Well well... Seems that the problem is in my hardware.. I havent tested more than one crystal,and the int oscillator,when i had change,ill try something else,ill had to test that will this work on pcb,or is the error same..

Ben,could you quickly test the spi component on 18f4585,because when i add the program nothing but c icon osccon = 0x6c;,and spi init macro,ill get compiler error,was it sspcon,if i remember correct.. With 16f,the spi compiles fine..

By the way,you mentioned on spi tread that you made spi codes,could you sent me the fcf files...

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:

Post by Benj »

Let me know how it goes. Still a very strange problem.

You are correct the SPI component for the 18F4585 is incorrect. The register sspcon should be sspcon1. This can probably be changed in the FCD file very easily. I will email you an example file that uses C code Icons to call the SPI C routines.

User avatar
Steve
Matrix Staff
Posts: 3421
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Post by Steve »

The SPI error cannot be corrected within the FCD file. Instead, you should put the following into the "definitions" box of the "supplementary code" window:

Code: Select all

#define sspcon sspcon1
This is not a perfect solution, but should work ok.

Mikat
Posts: 258
Joined: Wed Nov 29, 2006 6:32 pm
Location: Finland
Has thanked: 7 times
Been thanked: 36 times
Contact:

Post by Mikat »

Wery few things in this word is perfct:).
With me,its okay if it works,so thanks guys..
The lcd problem is strange,but probably next week i get the relays in my project,and i can test the lcd in actual pcb,now its wired on terminal board,so maybe that will fix the problen,at least i hope so..

Rosenbaum
Flowcode V4 User
Posts: 25
Joined: Thu Feb 22, 2007 3:20 pm
Has thanked: 1 time
Been thanked: 5 times
Contact:

Same problems with the LCD

Post by Rosenbaum »

Hi,
I have exactly the same problem, using a PIC16F716 with an AV1624 LCD in combination with a 4MHz or 2MHz quartz. If I adjust the frequency on the same value as the quartz has, no matter if it is a 4 MHz or a 2MHz, the LCD is not working. If I adjust it on a different value it works with both. Very strange. Is there a solution, or isnΒ΄t it ?

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:

Post by Benj »

We have a range of LCDs arriving here at Matrix and at some point this week I will have a look at the C driver file for the LCD. Obviously there is a small problem with the way it is currently functioning.

Post Reply