9S08PT60 - port A3 pin won't output

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

9S08PT60 - port A3 pin won't output

Jump to solution
560 Views
digisnapmark
Contributor II

9S08PT60

 

Most of my code is working fine, but PortA3 is giving me fits.

 

It works fine as an input... the debugger correctly display the pin state, but when set as an output, I cannot get it to go high. The voltage is always low, but a light external pull-up will pull it high with no current load, and even latch it high (still looks like a high-Z input).

 

I've triple checked the port addresses, made sure the other peripherals associated with that pin are disabled, etc. I've even run the code in debug, stepping through only the code starting from reset, initializing the port registers, then set that output bit... but I can't seem to make the pin output anything.

 

The other portA pins are all inputs, but a quick reassignment showed that I could control A2 as an output OK... but not A3!

 

Any thoughts?

Labels (1)
1 Solution
433 Views
eduardo_viramon
NXP Employee
NXP Employee

Mark,

In S08PT, PTA2 and 3 are true open-drain pins when configured as outputs, which means you need a pull-up to drive them high. This is because they are also multiplexed with the IIC module, they need to be true open drain.

This is documented in the RM, page 48:

http://cache.freescale.com/files/microcontrollers/doc/ref_manual/MC9S08PT60RM.pdf

I'm unsure why PTA2 worked fine, is there a load connected to it that could be acting as on output? If not, the internal pad resistance could be providing a little bit of a pull-up, but in that case it is a very weak pull-up.

PTA2 and 3 should be used as open drains when configured as outputs.

View solution in original post

0 Kudos
2 Replies
434 Views
eduardo_viramon
NXP Employee
NXP Employee

Mark,

In S08PT, PTA2 and 3 are true open-drain pins when configured as outputs, which means you need a pull-up to drive them high. This is because they are also multiplexed with the IIC module, they need to be true open drain.

This is documented in the RM, page 48:

http://cache.freescale.com/files/microcontrollers/doc/ref_manual/MC9S08PT60RM.pdf

I'm unsure why PTA2 worked fine, is there a load connected to it that could be acting as on output? If not, the internal pad resistance could be providing a little bit of a pull-up, but in that case it is a very weak pull-up.

PTA2 and 3 should be used as open drains when configured as outputs.

0 Kudos
433 Views
digisnapmark
Contributor II

Thank you for the quick and relevant response!

That indeed solves the issue...  Yes, there may have been some pullup on PTA2...