Port AD output on S9S12G

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

Port AD output on S9S12G

702件の閲覧回数
Didier91
Contributor I

Hi, I am having a problem with an S9S12G96, I have to use the AD port as output. On CODEWARRIOR Processor Expert correctly initializes the port:
MOVB #255,DDR0AD
MOVB #255,DDR1AD
I make it clear that I do not use these ports for anything else (ADC...)
The ADH and ADL ports seem to be configured as output, but I cannot control them... the lines:
MOVB #255, PT1AD
MOVB #255, PT0AD
Seem inoperable, outputs remain at 0
Someone ? to help me ?
THANKS !!!

0 件の賞賛
返信
2 返答(返信)

602件の閲覧回数
Didier91
Contributor I

Thnk you for your reply ...

With over 40 years of experience, fortunately I don't make such mistakes.

However I found the anomaly on a forum:
Just run these 2 lines of code:
MOVB #255, ATDDIENL
MOVB #255, ATDDIENH
While the ADC device is disabled!!!!
Good day
Didier

0 件の賞賛
返信

616件の閲覧回数
lama
NXP TechSupport
NXP TechSupport

Hi,

I suppose external circuits connected to the AD do not influence output value at the pin.

Do you measure a correct port PT1AD registers sets pins PAD0-PAD7 of the MCU?

Have you tested it out of PE tool?

Best regards,

Ladislav

0 件の賞賛
返信