iam presently working on ATmega controller, but now i need to change over to ATXmega controller,as my project needs more serial ports. I need your help for solving the following queries: 1) what is the difference between the two in terms of hardware and software? 2)can same c program written for ATmega be used for ATXmega , if not then what would be modifications? 3)does any of the ATmega controller support 3 UARTS or more?
1) The biggest change is probably that neither of them runs 8051 or ARM code.
2) The same program can be used for both chips - but that doesn't mean you will be happy with the outcome. Especially if that program happens to be compiled with a Keil compiler.
3) Almost any microcontroller supports 3 UARTs or more. If not internally, then it's still possible to connect extra UARTs using I2C, SPI, direct memory mapping, ... But it would have taken you maybe a minute or two to find out that ATmega chips exists with at least 3 internal UART.