Sign in

username:

password:



Not a member?

Search hc11



Search tips

Subscribe to hc11



Ads

Discussion Groups

Technical discussions about Freescale Microcontrollers: M68HC11. (Freescale Semiconductor is a Subsidiary of Motorola).

Re: Port C - Bill Walker - Nov 24 17:06:00 2004

Make sure you have a pulldown resistor tied to all input ports. I use a 4.7K
from the pin to ground. Without these, even a very short piece of wire can
act like an antenna and make the input unstable -- a characteristic of CMOS
logic.

----- Original Message -----
From: "bal_gill21" <>
To: <>
Sent: Sunday, November 28, 2004 11:40 AM
Subject: [m68HC11] Port C >
> Hi
> When reading the contents of port c I have to have a delay in my code
> that is quite long (ie ffff on x stack and all pulled off again).
> Without the delay I get garbage read from port C. This doesn't seem
> right as it's only supposed to be a couple of machine cycles for the
> port to be read. What could possibly be the cause of this?
>
> Thanks guys
>
> Bal >
> Yahoo! Groups Links > **************************************************************
> Scanned by VisNetic MailScan for SMTP Servers.
> Visit http://www.deerfield.com/products/visnetic_mailscan.
> **************************************************************




(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )


Port C - bal_gill21 - Nov 28 11:40:00 2004


Hi
When reading the contents of port c I have to have a delay in my code
that is quite long (ie ffff on x stack and all pulled off again).
Without the delay I get garbage read from port C. This doesn't seem
right as it's only supposed to be a couple of machine cycles for the
port to be read. What could possibly be the cause of this?

Thanks guys

Bal






(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )

Re: Port C - Tony Papadimitriou - Nov 29 14:44:00 2004

----- Original Message -----
From: "bal_gill21" <>
To: <>

> When reading the contents of port c I have to have a delay in my code
> that is quite long (ie ffff on x stack and all pulled off again).
> Without the delay I get garbage read from port C. This doesn't seem
> right as it's only supposed to be a couple of machine cycles for the
> port to be read. What could possibly be the cause of this?

Well, the port is actually read in a single cycle within the LDAA command (for
example). So, if the delay is causing it to work and no delay messes it up, it
seems that whatever you have connected to PORTC isn't setting up its data fast
enough. What do you have on PORTC?

> Bal






(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )

Re: Port C - bal_gill21 - Nov 30 13:06:00 2004


Connected to PORTC is a vacuum flourecent display (VFD). The VFD
becomes busy when an ASCII character or any other command is sent to
it. I am reading the busy line so I can then send it more data. It
claims in the data sheet that instructions take no longer than 50uS
at a time (for the commands i'm sending it), my delay exceeds that.

Bal > > When reading the contents of port c I have to have a delay in my
code
> > that is quite long (ie ffff on x stack and all pulled off again).
> > Without the delay I get garbage read from port C. This doesn't
seem
> > right as it's only supposed to be a couple of machine cycles for
the
> > port to be read. What could possibly be the cause of this?
>
> Well, the port is actually read in a single cycle within the LDAA
command (for
> example). So, if the delay is causing it to work and no delay
messes it up, it
> seems that whatever you have connected to PORTC isn't setting up
its data fast
> enough. What do you have on PORTC?
>
> > Bal
>
> tonyp@a...





(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )