The Xmegalab


The XMultiKit and Xmegalab are development boards for the AVR XMEGA. They are also dual channel oscilloscopes with an arbitrary wavefrom generator. The devices use an ATXMEGA128A1 microcontroller, this allow a sampling rate of up to 16MS/s and with the internal DAC, the units have an arbitrary waveform generator of 1MS/s.


  • ATXMEGA128A1 microcontroller with 128K Flash, 8K SRAM, 2K EEPROM
  • External serial SRAM 32K
  • Inputs: 2 Analog Channels, 4 Digital Channels
  • Sampling rate: 16MSPS
  • Arbitrary Waveform Generator, 1MSPS, using the XMEGA's internal DAC
  • SD Card
  • 4x3 Keypad plus 5 tactile swtiches
  • 2 Rotary encoders
  • Serial Port
  • JTAG and PDI interfaces for development
  • User external connection with digital and analog I/Os
  • Graphic LCD 128x128 pixexls with backlight

History of the XMultiKit / Xmegalab

The XMultiKit project was initially going use the same circuit as the MultiKitB but with the XMEGA micro. After reading the XMEGA datasheet I realized that the XMEGA had enough horsepower to handle 2 analog channels, and a function generator using the internal DAC.

The XMEGA is a new AVR microcontroller and it has a lot of potential, the XMultiKit will serve as a platform to evaluate the ATXMEGA128A1, one of the first XMEGA micros.

The Xmegalab is an enhanced version of the XMultiKit. The Xmegalab is a step forward for developing the COMA.

Link to the XMultiKit and Xmegalab product pages:

{product_snapshot:id=18,showimage=y} {product_snapshot:id=52,showimage=y}
XMultiKit Xmegalab

Project Status:

2010 August 10th

  • Compiling using latest WinAVR compiler: ver 20100110
  • Using EEPROM functions from compiler
  • Factory options: calibrate, reset calibration, restore settings
  • MSO: Fixed invert signal bug
  • MSO: Reference waveforms moved to EEPROM
  • AWG: Frequency adjust improved, manual updated

2010 July 29th

  • All storage functions implemented:
  • BMP format save
  • CSV format save
  • WFM format save/load/erase
  • Renamed terminal.c to storage.c

2010 July 21st

  • Slow sampling rate acquisition rewritten
  • Fixed slow sampling rate bugs
  • Added more sampling rates: 5S/div, 10S/div, 20S/div, 50S/div

2010 July 8th

  • Fonts moved from EEPROM to Program memory.
  • Renamed xmultikit.c to main.c, renamed xmultikit.h to main.h
  • Implemented AWG calibration function
  • AWG now shows amplitude in volts
  • Slew rate control on ADC clock and CH select clock
  • More robust clock initialization
  • Added reference waveform

2010 June 5th The AWG can now be controlled within the MSO

2010 May 25th

  • MSO: Implemented offset calibration.
  • MSO: Fixed Meter mode bug.
  • MSO: Implemented all measurements in Meter mode.
  • MSO: Reduced refresh rate in Meter mode for better readability.

2010 March 29th

  • File System: The file system will initialize whenever the SD Card is inserted
  • AWG: Save setttings on EEPROM.
  • AWG: Automatically starts when the XMultiKit powers up.
  • MSO: Save BMP file to SD Card
  • MSO: More accurate automatic cursors
  • General: Reduced RAM usage
2010 March 28th MSO: BMP file transfer with Hyperterminal working Cool
2010 March 27th
MSO: Implemented all trigger sources.

Hardware modification required

  1. Replace C27,C44 15pF capacitors with 39pF 5% (0805 package). This is needed to adjust the RC filter that was changed with the last modification. The RC filter will now have a 3dB cutoff at 8MHz.
  2. Replace R43 470 resistor with 3k 1% (0805 package). Remove D8, this diode is no longer necessary and it also had an incorrect footprint. After these changes the external trigger will be operable.

2010 March 25th - I took 2 weeks to finalize the Xminilab PCB, now back on the XMultiKit firmware.

  • MSO: Improved triggering
  • Logic Analizer: Added parallel and serial decoding

2010 March 5th

  • MSO Menus now show if an item is active or not.
  • Speed optimizations
  • Eliminated LCD Flicker at slow sampling rates.
2010 March 5th MSO: Improved automatic cursors, Added CH1+CH2 and CH1*CH2 math.
2010 March 4th
MSO: Lots of updates, added automatic cursors, updated the MSO manual.
2010 February 23rd
MSO: Filled in some missing items in the help menu. Started to work on the autosetup routine.
2010 February 19th
MSO: Added the option to apply a logarithm to the FFT.
2010 February 15th
2010 February 14th
MSO: Voltmeter mode implemented. FFT windows implemented.
2010 February 11th
MSO: Voltmeter mode starting to work - big fonts added
2010 January 26th
MSO: Trigger working for fast sample rates (1uS/div,2uS/div,5uS/div)
2010 January 17th
MSO: All sampling rates working, now to work on the triggering...
2010 January 16th
MSO: Many improvements, better sampling, better menus, fixed some bugs
2010 January 13th
Hardware modification required: Replace R29,R30,R50,R52 10k resistors with 1k 1% (resistor package is 0805). This is needed to decrease the switching time of the SPDT switch.
2010 January 11th
MSO: Improved menus, digital inputs and basic triggering
2010 January 8th
MSO: Slow sampling rates starting to work
2009 December 25th
MSO: Gain control working, EEPROM save working
2009 December 21st
MSO: Fixed minor bugs, LED flashing correctly, Horizontal Position added
2009 December 21st
MSO: 1uS/div, 2uS/div, 5uS/div starting to work, added more comments
2009 December 9th
Minor update, added a constant that was giving a compiler error
2009 September 21st
Back on development after a 2 month break. Minor updates on the MSO.
2009 July 8th
MSO Menus starting to take shape
2009 July 5th
Started to work on the MSO application, the XMultiKit can sample at 16MSPS!
2009 June 28th
Added the AVR-MAX Chess from Andre Adrian, an AVR port of H. G. Muller Chess engine.
2009 June 15th
Added a Recursive Descent Parser for the Calculator Application.
2009 June 12th
The Arbitrary Waveform Generator is working!
2009 June 10th
SD Card with FAT File System working!!! (Thanks to ChaN's FatFs library)
2009 June 7th
32MHz clk, Test Pin 1KHz, Serial RAM and USART are working.
2009 June 1st
The Keypad, buttons and rotary encoders are working
2009 May 29th
: The LCD is working, you can preview the source code at the product page.
2009 May 22th
: The XMultiKit communicates with the AVRISP2, I can get the LEDs to blink.
2009 May 19th
: First Prototype Built. I was going to start developing today but unfortunetely my AVR Dragon doesn't program XMEGAs... I bought an AVRISP2, so developing will start this weekend...
2009 May 15th
: Building the first prototype. I will post some pictures when it is built!