Is it possible to influence port-initialisation on startup (S12XF512)

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

Is it possible to influence port-initialisation on startup (S12XF512)

1,150件の閲覧回数
jedi82
Contributor I

Hello,

 

I am preparing a automatic lightning solution, that controlls lots of LEDs. My problem is the following:

 

- when the MCU starts up on power-on, all port become high for a short period of time. This causes all LEDs to flash.

Can I prohibit or influence this behaviour?

 

thanks for your advices!

Jedi82

ラベル(1)
0 件の賞賛
返信
2 返答(返信)

851件の閲覧回数
kef
Specialist I

Do you mean pins are high until you initialize DDRx registers, or do you mean pins are driven high from the moment you write tto DDRx until the moment you write initial pins values to PORTx or PTx registers?

 

1) In the first case peraphs your circuit lacks pull down resisotrs.

2) Each output capable port pin must have some latch. To initialize these latches you should write initial pin states pattern to PORTx / PTx register before switching pin direction(s) to output(s).

 

PORTA &= ~1;

DDRA |= 1;

0 件の賞賛
返信

851件の閲覧回数
jedi82
Contributor I

to be more precise. the short peak is only visible on Port J.

Don't find any information in the datasheet!

 

0 件の賞賛
返信