LCD Port D 16F1939

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
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

LCD Port D 16F1939

Post by Jan Lichtenbelt »

I use just a test flowcode (LCD start, clear and string "TEST") to test the LCD on the EB006-30 board on port D. I use the 40 pins 16F1939 microcontroller. But the LCD does not show the text. Is there a reason that I cannot use the prot D?

kind regards

Jan Lichtenbelt

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: LCD Port D 16F1939

Post by Enamul »

Hi,
I think you that this particular PIC has built-in capacitive sensor which has analog input CPS8-15 mapped in PORTD...which has to be disabled for normal digital I/O operation.
Jan Lichtenbelt wrote:I use just a test flowcode (LCD start, clear and string "TEST") to test the LCD on the EB006-30 board on port D. I use the 40 pins 16F1939 microcontroller. But the LCD does not show the text.
To do this add the following C code in the beginning of the program...

Code: Select all

anseld=0x00;
cpscon0=0x00;
Hope this will help. :)
Enamul
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: LCD Port D 16F1939

Post by Benj »

Hi Jan,

Please can you confirm that this works to solve the problem and I will add the lines of code to the init section of the FCD file so this problem is automatically fixed in future revisions.

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: LCD Port D 16F1939

Post by Jan Lichtenbelt »

Hi Ben,

This extention of 2 lines C-code let work the LCD correctly on the D-Port of the 16F1939.

Kind regards

Jan Lichtenbelt

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: LCD Port D 16F1939

Post by Enamul »

Hi,
I was thinking it should work but as I don't have the IC with me..
I feel I should keep quite until your answer...Thanks Jan for the reply..
Enamul
Enamul
University of Nottingham
enamul4mm@gmail.com

Post Reply