LCD ECIO28 Random chars

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

greycal
Posts: 5
Joined: Sun Oct 23, 2011 6:46 am
Contact:

LCD ECIO28 Random chars

Postby greycal » Thu Mar 01, 2012 3:45 am

Hi,

I have a 16x2 LCD connected to port a of a ECIO 28. I checked everything i can think of, yet when i initialise the display i just get random "?" displayed on the screen "? ? ? ? ? ?" etc.

The display itself is from Jameco (http://www.jameco.com/Jameco/Products/P ... 585979.pdf), but i can not see a difference between this and the eb005 display.

Is it likely to be a timing issue?

flowcode 4.5
Regards
Graham

User avatar
Benj
Matrix Staff
Posts: 14797
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4759 times
Been thanked: 4362 times
Contact:

Re: LCD ECIO28 Random chars

Postby Benj » Thu Mar 01, 2012 10:15 am

Hello Graham,

As a test of the Flowcode code and the hardware could you try connecting the LCD to portB and see if this makes a difference.

Pin RA5 of the ECIO28 is connected to the USB detection circuitry and LED, also pin RA4 is normally a open collector on these devices so to allow this pin to source current you have to provide an external pull up resistor.

greycal
Posts: 5
Joined: Sun Oct 23, 2011 6:46 am
Contact:

Re: LCD ECIO28 Random chars

Postby greycal » Thu Mar 01, 2012 10:54 pm

Hi Ben,

I have already pulled RA4 high (100K) due to that issue. I did not know RA5 was being utilised in that way. Is that a permanent feature of the ECIO implementation or 455 itself?

I will re-test my LCD board on portb to eliminate the possibility of mistake there.

Thanks for prompt reply.

Regards

Graham.

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8825
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2561 times
Been thanked: 3720 times
Contact:

Re: LCD ECIO28 Random chars

Postby medelec35 » Thu Mar 01, 2012 11:02 pm

What I do when using a new microcontroller, or changing to a different port to drive a LCD is:
Connect LED Eblock and set whole port to 255 then 0 every second.
Then I know If all LED's connected to the pins I'm interested in flash at full brightness every second, then port will be OK to drive LCD and osc is running a correct speed.

Martin
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

greycal
Posts: 5
Joined: Sun Oct 23, 2011 6:46 am
Contact:

Re: LCD ECIO28 Random chars

Postby greycal » Fri Mar 02, 2012 7:14 am

Hi,

I have moved everything LCD related to port b and the display is working.

So what is the trick to using port a? Pull ra4 high, but what about ra5? ra5 seems to the be the issue.

I will investigate further (Port a), but this seems like an area for a wiki or an update on the docs. The help file in particular. It feels like I have wasted a few cycles on a component that should just work (hence the lib etc), due to facts that may well be in the 455 datasheet but not the ecio28/40 datasheet. This info would of saved me a few wasted hours double checking my hardware and questioning the flowcode modules.

I do however really appreciate the pointers you have both provided.

-graham

kersing
Valued Contributor
Valued Contributor
Posts: 1931
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 568 times
Been thanked: 1079 times
Contact:

Re: LCD ECIO28 Random chars

Postby kersing » Fri Mar 02, 2012 9:09 am

greycal wrote:It feels like I have wasted a few cycles on a component that should just work (hence the lib etc), due to facts that may well be in the 455 datasheet but not the ecio28/40 datasheet.


Hi Graham,

RA5 use is documented in the ECIO documentation on page 3. In the diagram there is the USB led connected to RA5 and there is a connection between RA5 and USB in the diagram as well. I agree Matrix could provide more details to clarify their use of RA5 so we know when the port can be used and when to avoid using it.

(Ben, is it as simple as a resistor between RA5 and one of the USB data or the power connections to check for a signal?)

Regards,

Jac
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

User avatar
Benj
Matrix Staff
Posts: 14797
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4759 times
Been thanked: 4362 times
Contact:

Re: LCD ECIO28 Random chars

Postby Benj » Fri Mar 02, 2012 10:05 am

Hi Jac,

Yes the RA5 pin (RE2 for the ECIO40P) is simply connected via a resistor to the LED and USB 5V supply. The resistor is such that you should be able to use the pin as a standard I/O in your application.

Hi Graham,

The RA4 pin can be used as a standard I/O by using a 4.7 - 10K resistor between the pin and the VCC +ve supply rail.
These users thanked the author Benj for the post:
kersing (Fri Mar 02, 2012 10:10 am)
Rating: 5%
 

greycal
Posts: 5
Joined: Sun Oct 23, 2011 6:46 am
Contact:

Re: LCD ECIO28 Random chars

Postby greycal » Fri Mar 02, 2012 3:38 pm

Thank you both for your comments. I do think the documentation on page 3 is a stretch, i had look twice even after you pointed it out.
Thanks again.
Graham.