Hi!
How to configure port (ex. PORTA.0) in xMega for corresponding to
1. tri-state
2. input with pull-up
in mega/tiny?
thank )
from mega to Xmega
Author
Message
Level: Moderator
Joined: Mon. Jul 18, 2005
Posts: 101062 View posts
Location: (using avr-gcc in) Finchingfield, Essex, England
Doesn't the code in AVR1313 provide the solution? IN fact for Xmega you want to download all the PDFs and ZIPs for AVR1300 to AVR1318
I don't find any tri-state in AVR1313...
code-by wrote:
When an input, the pin is tri-state by default. If you want to enable the pullup or pulldown resistor you need to manipulate the corresponding PINnCTRL register, e.g. PORTA.PIN0CTRL. There are other fancy things you can do by way of the PINnCTRL register.
How to configure port (ex. PORTA.0) in xMega