Sign in

username:

password:



Not a member?

Search 68hc12



Search tips

Subscribe to 68hc12



68hc12 by Keywords

68HC1 | 812A4 | 9S12DP256 | Bootloader | CodeWarrior | D60A | Debugger | DP256 | ECT | EEPROM | EVB | Flash | HC1 | HCS12 | I2C | IAR | ICC1 | Interrupts | LCD | M68KIT912DP256 | MC9S12DP256 | MC9S12DP256B | Metrowerks | Motor | MSCAN | Multilink | PLL | Quadrature | SDI | SPI | Transceiver | XFC


Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | 68HC12 | Can't set port value?


Advertise Here

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 )