Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).
Can't set port value? - nixknacks - Jul 21 20:57:10 2008
I'm having trouble writing to Port A in my code.
I have written a function that I call in my main function. In the
function, I change the value of Port A at 4 different points in the
function, however, the value at Port A never actually changes.
DDRA = 0x0F;
I'm only trying to change the lower 4 bits.
Any reasons why PORTA would not allow me to change the values?
------------------------------------
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.
(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )
RE: Can't set port value? - Darren Moore - Jul 21 21:03:25 2008
DDRA is the data direction register for port A.
Regards,
Darren
> -----Original Message-----
> From: 6...@yahoogroups.com [mailto:6...@yahoogroups.com]
> On Behalf Of nixknacks
> I'm having trouble writing to Port A in my code.
>
> I have written a function that I call in my main function. In the
> function, I change the value of Port A at 4 different points in the
> function, however, the value at Port A never actually changes.
>
> DDRA = 0x0F;
>
> I'm only trying to change the lower 4 bits.
>
> Any reasons why PORTA would not allow me to change the values?
>
------------------------------------

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )
Re: Can't set port value? - nixknacks - Jul 21 21:09:04 2008
Yeah, I know.
I only put it down to show that I'm using the upper 4 bits as inputs
and the lower 4 bits as outputs.
Since the lower 4 bits are outputs, I don't understand why I should
ever have trouble setting the value of these bits with a simple...
PORTA=0x0F;
for instance.
I guess I should also mention that I'm using a mc9s12dp256.
Thanks for any suggestions!
--- In 6...@yahoogroups.com, "Darren Moore"
wrote:
>
> DDRA is the data direction register for port A.
>
> Regards,
> Darren
>
> > -----Original Message-----
> > From: 6...@yahoogroups.com [mailto:6...@yahoogroups.com]
> > On Behalf Of nixknacks
> >
> >
> > I'm having trouble writing to Port A in my code.
> >
> > I have written a function that I call in my main function. In the
> > function, I change the value of Port A at 4 different points in the
> > function, however, the value at Port A never actually changes.
> >
> > DDRA = 0x0F;
> >
> > I'm only trying to change the lower 4 bits.
> >
> > Any reasons why PORTA would not allow me to change the values?
>
------------------------------------

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