PIC18f4680 PORTD LCD issue

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

PIC18f4680 PORTD LCD issue

Post by Enamul »

Hi,
I have been struggling to get LCD output in PORTD in PIC18f4680..This is because of the initialization problem in the FCD file. I have managed to sort out the issue. There are quite a few multiplexing in that port..I/O, PSP, CCP, ECCP which causing the problem.

I have attached here the FCD so that MM masters can update that. Clearing trisd will not hamper input declaration as whenever anyone declares any pin as input that macro will automatically changes that bit in tris register.

Code: Select all

Initialise="adcon1 = 0x0F;\ncr_bit(trise,PSPMODE);\nccp1con=0x00;\neccp1con=0x00;\ncmcon=0x07;\ntrisd=0x00;\n"
Thanks,
Enamul
Attachments
18F4680.fcd
(15.05 KiB) Downloaded 348 times
Enamul
University of Nottingham
enamul4mm@gmail.com

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: PIC18f4680 PORTD LCD issue

Post by Benj »

Thanks Enamul,

The changes have now gone into the master files. Effected devices - 18F2585, 2680, 4585, 4680.

I have left the "trisd=0x00;\n" off all the init functions as we can't tell what the user will want the data direction to be and the LCD component should sort this out for you anyway.

I have also left the "cr_bit(trise,PSPMODE);" off for the 18F2xxx devices as they do not have the trise register.

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: PIC18f4680 PORTD LCD issue

Post by Enamul »

Hi Ben,
I have left the "trisd=0x00;\n" off all the init functions as we can't tell what the user will want the data direction to be and the LCD component should sort this out for you anyway.
Unfortunately until the above command I don't have anything in the display...
Enamul
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: PIC18f4680 PORTD LCD issue

Post by Enamul »

Hi Ben,

This change should go to 18f4580.fcd as well..
The changes have now gone into the master files. Effected devices - 18F2585, 2680, 4585, 4680.
Enamul
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: PIC18f4680 PORTD LCD issue

Post by Enamul »

Hi,
This change isn't still in PIC18f4580.fcd

I thought it's already updated but when LCD wasn't working I found it not still updated
Enamul
University of Nottingham
enamul4mm@gmail.com

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: PIC18f4680 PORTD LCD issue

Post by Benj »

Hello Enamul,

Sorry about that. The changes have now been applied to the 18F4480 and 4580 devices.
Attachments
18F4580.fcd
(15.16 KiB) Downloaded 322 times
18F4480.fcd
(15.16 KiB) Downloaded 307 times

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: PIC18f4680 PORTD LCD issue

Post by Enamul »

Hi Ben,
It's ok. I am currently using PIC18f4580 for couple of projects and my machine needed new OS and I have reinstalled FCV5.4. I was testing ready program but it doesn't work at all..screws me down what happening. Then I found this FCD issue.
Enamul
University of Nottingham
enamul4mm@gmail.com

Post Reply