LCD on Port A prints ? Marks and doesn't work...

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
Sparkoids
Posts: 267
Joined: Mon Sep 14, 2009 10:34 am
Has thanked: 30 times
Been thanked: 19 times

LCD on Port A prints ? Marks and doesn't work...

Post by Sparkoids »

Any ideas please? It simulates as expected but not in real life....

I seem to remember I souldn't use the LCD on Port A of ECIO not sure why though...


James :-}

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

Re: LCD on Port A prints ? Marks and doesn't work...

Post by Enamul »

Can you please mention which ECIO you are using? I mean ECIO-28 or ECIO-40
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

Re: LCD on Port A prints ? Marks and doesn't work...

Post by Enamul »

Please add the following code in the beginning of the flowcode in the c code box...

Code: Select all

cmcon=0x07;
Please let me know is that worked or not.
Enamul
Enamul
University of Nottingham
enamul4mm@gmail.com

Sparkoids
Posts: 267
Joined: Mon Sep 14, 2009 10:34 am
Has thanked: 30 times
Been thanked: 19 times

Re: LCD on Port A prints ? Marks and doesn't work...

Post by Sparkoids »

The ECIO 40 - I'll check your fix now...

Sparkoids
Posts: 267
Joined: Mon Sep 14, 2009 10:34 am
Has thanked: 30 times
Been thanked: 19 times

Re: LCD on Port A prints ? Marks and doesn't work...

Post by Sparkoids »

Nope still prints '?' in real life.

The file is here - I'm just trying to see the numbers selected on the slide switches on the LCD to test it...


James :-}
Attachments
Dip_Switch_JD.fcf
Here it is....
(10 KiB) Downloaded 288 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

Re: LCD on Port A prints ? Marks and doesn't work...

Post by Enamul »

This should certainly work..

Code: Select all

cr_bit(hlvdcon,HLVDEN);
cr_bit(sspcon1,SSPEN);
Try this code together with earlier one..if not work then definitely USB issue...In that case use all RA pin except RA4 use from other port..
Enamul
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: LCD on Port A prints ? Marks and doesn't work...

Post by DavidA »

Hello James,

If Enamuls code doesnt work i would try using a different port as i remember there being a problem with one of the pins on PORTA being attached to the LED or is Vin, i cant remember why, it would be worth checking the 18F4455 datasheet to see if these pins can be used.

Sparkoids
Posts: 267
Joined: Mon Sep 14, 2009 10:34 am
Has thanked: 30 times
Been thanked: 19 times

Re: LCD on Port A prints ? Marks and doesn't work...

Post by Sparkoids »

Thanks for the help all but I gave up and set the LCD on Port D and the Switchbank on Port B and it works fine!

(Plus I don't understand what Enamul is actually doing and don't want to look stupid by admitting that!)

Best regards,


James :-}

PS - I will check if your version later Enamul but the excitement of seeing the numbers working OK on the display is too exciting...

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times

Re: LCD on Port A prints ? Marks and doesn't work...

Post by kersing »

DavidA wrote:If Enamuls code doesnt work i would try using a different port as i remember there being a problem with one of the pins on PORTA being attached to the LED or is Vin, i cant remember why, it would be worth checking the 18F4455 datasheet to see if these pins can be used.
ECIO-40 uses pin RE2 for USB LED, not a port A pin. It is an ECIO feature, not of the PIC so this will not be mentioned in the Microchip data sheet. It is listed in the ECIO data sheet. (For ECIO-28 it is pin RA5)
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: LCD on Port A prints ? Marks and doesn't work...

Post by medelec35 »

Hi James,
Would you like to give this a try please.
Just to see if it works on port A.
This may not still work of course.

Martin
Attachments
Dip_Switch_JD V2.fcf
(10 KiB) Downloaded 271 times
Martin

Sparkoids
Posts: 267
Joined: Mon Sep 14, 2009 10:34 am
Has thanked: 30 times
Been thanked: 19 times

Re: LCD on Port A prints ? Marks and doesn't work...

Post by Sparkoids »

Hi Martin,

It doesn't work I'm afraid but it does something different now.

It scrolls solid blocks of 5x7 with question marks randomly placed...

Thanks for trying anyway - I'm sticking to Port D for the LCD and Port B for the slide switches...


James :-}

Post Reply