9S08PT60 - port A3 pin won't output

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

9S08PT60 - port A3 pin won't output

ソリューションへジャンプ
564件の閲覧回数
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?

ラベル(1)
1 解決策
437件の閲覧回数
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 件の賞賛
2 返答(返信)
438件の閲覧回数
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 件の賞賛
437件の閲覧回数
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...