Page 1 of 1
LCD on Port A prints ? Marks and doesn't work...
Posted: Thu Aug 02, 2012 11:43 am
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 :-}
Re: LCD on Port A prints ? Marks and doesn't work...
Posted: Thu Aug 02, 2012 12:01 pm
by Enamul
Can you please mention which ECIO you are using? I mean ECIO-28 or ECIO-40
Re: LCD on Port A prints ? Marks and doesn't work...
Posted: Thu Aug 02, 2012 12:10 pm
by Enamul
Please add the following code in the beginning of the flowcode in the c code box...
Please let me know is that worked or not.
Enamul
Re: LCD on Port A prints ? Marks and doesn't work...
Posted: Thu Aug 02, 2012 2:00 pm
by Sparkoids
The ECIO 40 - I'll check your fix now...
Re: LCD on Port A prints ? Marks and doesn't work...
Posted: Thu Aug 02, 2012 2:05 pm
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 :-}
Re: LCD on Port A prints ? Marks and doesn't work...
Posted: Thu Aug 02, 2012 2:13 pm
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
Re: LCD on Port A prints ? Marks and doesn't work...
Posted: Thu Aug 02, 2012 3:00 pm
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.
Re: LCD on Port A prints ? Marks and doesn't work...
Posted: Thu Aug 02, 2012 3:56 pm
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...
Re: LCD on Port A prints ? Marks and doesn't work...
Posted: Thu Aug 02, 2012 4:42 pm
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)
Re: LCD on Port A prints ? Marks and doesn't work...
Posted: Thu Aug 02, 2012 5:39 pm
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
Re: LCD on Port A prints ? Marks and doesn't work...
Posted: Fri Aug 03, 2012 3:58 pm
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 :-}