Saturday, 26 September 2020
Main Menu
Home Home
Shop Shop
News News
Products Products
Application Notes Application Notes
Publications Publications
Links Links
Support Center Support Center
Downloads Downloads
Forum Forum
Resellers Resellers
Contact Us Contact Us
Updates Updates
MCS Wiki MCS Wiki
Online Help
BASCOM-8051 Help BASCOM-8051 Help
Contents in Cart
Show Cart
Your Cart is currently empty.
Search the Shop

Products Search

User Login


If you have problem after log in with disappeared login data, please press F5 in your browser

RSS News

AN #192 - Getting Started With ATXMEGA and BASCOM-AVR - Part 1 Print
by MAK3

This Application Note will not cover BASCOM-AVR programming basics so you should know BASCOM-AVR Language Fundamentals.
This Application Note will not cover Analog I/O such as Analog Input, Analog Output or Analog Comparator. There will be a Part 2 of Getting Started with ATXMEGA which will cover the Analog Part of XMEGA.

NOTE : Part 2 is now part of the help file and examples. See CONFIG ADCx, CONFIG DACx

The ATXMEGA work with 3.3V so please do not connect something which output 5V. Use a Level Shifter for that.
The maximum rating for a XMEGA Pin is 3.6 V.
When using the internal 32MHz oscillator you need at least 2.7V Vcc. The maximum CPU Clock Frequency is 12MHz when using the XMEGA with 1.6V Vcc.

All XMEGA have their registers at the same address. Some chips might not have all registers because the hardware is not inside the chip, but all DAT* files are similar. And all hardware has a fixed offset. This allows to use dynamic code. For example Bascom-AVR can now use a variable for the UART and the code is only needed once because all hardware has a fixed offset.

* DAT files are the register files. The register files are stored in the BASCOM-AVR application directory and they all have the DAT extension.
The register file holds information about the chip such as the internal registers and interrupt addresses.
The register file info is derived from ATMEL definition files.

Manuals for ATXMEGA: There are 2 manuals available from ATMEL

  • One Family Manual like for example for a ATXMEGA128A1 it is Atmel AVR XMEGA A Manual
  • Another Manual for the single chips like for example for an ATXMEGA128A1 it is the ATxmega64A1/128A1/192A1/256A1/384A1 Manual. In this Manual you find for example the Alternate Pin Functions. So you can find which Pin on Port C is the SDA and SCL Pin when you want to use the I2C/TWI Interface of this Port.

What you need to get started with ATXMEGA and BASCOM-AVR

Supported XMEGA Chips in Bascom-AVR (Status of Bascom-AVR Version


Table of Contents

  • Manuals for ATXMEGA:  There are 2 manuals available from ATMEL 
  • What you need to get started with ATXMEGA and BASCOM-AVR   
  • Supported XMEGA Chips in Bascom-AVR (Status of Bascom-AVR Version   
  • Supported Functions for XMEGA in Bascom-AVR (Status of Bascom-AVR Version   
  • The Program and Debug Interface (PDI)   
  • Fuse Bits   
  • Now you can flash your first Bascom-AVR Program where you toggle an Output:   
  • The most important parts of an Bascom-AVR Program for XMEGA are:   
  • Port I/O   
  • External Pin Interrupt   
  • System Clock Options (internal and external oscillator options)   
  • ATXMEGA128A1 with EXTERNAL oscillator 16MHz   
  • USART - Universal Synchronous and Asynchronous Serial Receiver and Transmitter   
  • Using Interrupts with UARTS:   
  • Using Dynamic Channels with XMEGA COM Ports   
  • ATXMEGA and RS-485   
  • Using a Bootloader with ATXMEGA   
  • Using EEPROM   
  • How to initiate a software Reset of ATXMEGA:   
  • Using the Watchdog of ATXMEGA:   
  • TC - 16-bit Timer/Counter   
  • Now we use the RTC - Real Time Counter for generating 1 Second Tick:   
  • Using config tcxx to easy configure a PWM with XMEGA   
  • Easy Frequency Generation with XMEGA   
  • XMEGA I2C bzw. TWI in MASTER MODE   
  • Using a LCD with XMEGA:   
  • Reduce power consumption by setting Power Reduction Register:   
  • Using the Event System (first example):   
  • ATXMEGA as SPI Master   
  • Using Dynamic Channels with XMEGA SPI   
  • Power Mode Options   
  • Virtual Port Registers   
  • AES Crypto Module   
  • DMA (Direct Memory Access)   
  • Reading and Writing to ATXMEGA Registers   
  • Great existing Bascom-AVR ATXMEGA Projects:  

 Full article can be found in this PDF file