Just imagine, by mistake you wired USART pins wrongly in your design but those I/O port pins’ can be alternatively used as USART pins. It is just why we feel comfortable making stuffs with embedded systems rather than using complex discrete mixed analog-digital circuits. Thus hardware designing become more flexible and easy. both XMegas and ARMs have an option to relocate dedicated hardware pins from one pin/port position to another. Unlike traditional micros which have dedicated pins for certain internal hardware modules like USART, I2C, SPI, etc. Pin remapping is another feature that is common in both XMega and ARM micros. This basically allows general purpose I/O pins to do stuffs other than the basic use as a general purpose I/O. One such similarity is the alternate function of an I/O pin. These similarities are as such that I can literally anticipate what I’ll find next when I proceed. Trust me I played with STM32 and AVR micros and I found some striking similarities. People who had played with ARM micros will also find some interesting similarities.
In XMega devices this concept is expanded, allowing more options in designs and coding. In Mega/Tiny AVRs there are basically three registers to make an I/O pin/port work and these are DDRx, PINx and PORTx registers. People who have been using Mega/Tiny AVR will find similarities but not monotony. XMega devices are not same as Mega/Tiny AVRs.
Totem pole output configuration how to#
The reference manuals and documentations of XMega devices come in colours, legends and bookmarks and so navigating these docs is pretty easy provided that one knows how to use PDF reader like the Adobe Reader efficiently. They are highly user friendly and when it comes to XMega’s documentations, there is one word I can say “Awesome”.
I have always admired Atmel’s documentations, particularly datasheet and reference manuals. A quick view of the XMega I/O pins reveals the purpose of these pins. XMega I/Os have digital, analog and special purpose functions. The ATXMega32A4U just like any other micro has 34 programmable I/O pins divided unevenly amongst six IO ports. Any microcontroller must have I/O pins for taking inputs and providing outputs.