Port AD output on S9S12G

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Port AD output on S9S12G

703 次查看
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 回复数

603 次查看
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 项奖励
回复

617 次查看
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 项奖励
回复