Hi,
I have a Nanocore12 MC9S12C32 microcontroller. I'm trying to use the Port T (0-7) pins as digital outs, as well as the AN0/PAD00-AN7/PAD07 pins as digital outs at the same time. I believe this is possible but I can't seem to discern from the documentation how to do this. I have no issues with Port T but I'm getting nothing out of the AN/PAD pins. Is there a register that sets those ports to digital outs? I've tried setting DDRAD to #$FF and then PORTAD to #$FF but nothing seems to happen. Please advise. Apologies if this is an obvious or mundane question but I'm a bit stumped. Any help would be appreciated.
Thanks,
Eric
I tried this after your suggestion but I'm still not getting any signal out of the N0/PAD00-AN7/PAD07 pins:
movb #$FF, ATDDIEN ; enable digital input buffer to PTAD
movb #$FF, DDRAD ; sets PORTAD data direction to output
movb #$FF, PORTAD ; set PORTAD pins to high
any suggestions?
Thanks
Actually, I got it to work by setting PTAD to #$FF. Thanks for the help! I do have another question though. What is the difference between PORTAD and PTAD? This might clear up future issues for me.
Thanks for the help!