MTX1S January 29, 2015 Manual 1 http://www.mattairtech.
MTX1S Manual Table of Contents Overview........................................................................................................................4 Introduction....................................................................................................................................... 4 MTX1S Features.............................................................................................................................. 4 ATxmega128a1 Features.................................
MTX1S January 29, 2015 Manual 3 http://www.mattairtech.
MTX1S Manual Overview Introduction The MTX1S is a flexible USB development board for the Atmel ATxmega128a1 microcontroller. Included is a MicroSD card slot, 32KB SPI SRAM, audio amplifier, lowside / relay driver, temperature sensor, RS232 or RS485, 4 LEDs, and an onboard 1.25V precision reference for the ADC. This reference is setup to work with the XMEGA errata. The XMEGA can be programmed over USB using the onboard AVRISP mkII compatible PDI programmer.
MTX1S ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● Manual Audio amplifier connected to XMEGA DAC Temperature sensor with lowpower operation 1.25V precision voltage reference ● Works with XMEGA ADC errata ● Use for signed differential conversions from 0V to ~2.5V at the pin ● Routed to both reference inputs via solder jumpers Choice of RS232 or RS485 serial interface, with powerdown and 3pin screw terminal 4 LEDs Available 1MB low power external SRAM (see http://www.mattairtech.
MTX1S ● ● ● ● Manual Eight USARTs IrDA modulation/demodulation for one USART Four 2Wire Interfaces w/ dual address match (I2C and SMBus) Four SPI (Serial Peripheral Interface) peripherals AES and DES Crypto Engine 16bit Real Time Counter with separate Oscillator Two Eightchannel, 12bit, 2 Msps Analog to Digital Converters Two Twochannel, 12bit, 1 Msps Digital to Analog Converters Four Analog Comparators with Window compare function External Interrupts on all General Purpose I/O pins Watchdog Tim
MTX1S Manual MTX1S Hardware Solder Jumpers Jumper Description J1 USB Shield to gnd (not connected by default) J2 ~5V to relay driver (5V header pin and kickback diodes common cathode) J3 DACA0 (pin A2) to amplifier audio input J4 AREF B (pin B0) to 1.25V reference J5 AREF A (pin A0) to 1.
MTX1S Manual J28 Serial TX (pin E3) to RS232 DIN or RS485 DI (external pullup) J29 Serial Noninverting screwterminal to 680 ohm bias resistor to 3.3V (RS485 ONLY) J30 Serial Nonnverting screwterminal to 120 ohm termination resistor to Inverting screw terminal (RS485 ONLY) J31 Serial Inverting screwterminal to 680 ohm bias resistor to GND (RS485 ONLY) J32 3.3V to 33KOhm minimum current resistor to GND (MTX1S ONLY) Disconnect for lowest power consumption, but observe 3.
MTX1S Manual PDI Header PDI header for the XMEGA which can be used for programming or debugging. Note that an onboard programmer is already provided. When using this header, J19 MUST be disconnected. This is due to the fact that RX and PDI_DATA are shared. This means that the XMEGA serial TX won't be connected to the USB AVR RX. This doesn't affect programming, but may present a problem in certain situations when debugging. If serial TX is required when debugging, the JTAG header can be used.
MTX1S Manual Buttons / Jumper There are four modes of operation which are selected using the PROG button and JMP jumper. The button and jumper are sampled when powering up or pressing reset. Additionally, the MT X1S can be switched between the AVRISP mkII programmer and the serial bridge during runtime by pressing the PROG button. This is useful, for example, to program the XMEGA, then switch to the serial bridge for printf() debugging.
MTX1S Manual prevents VBUS from rising to the level of the external voltage. Note that there is a minimum load of 100uA for this regulator. The MTX1S can consume less than 75uA in the deepest sleep modes. An onboard load resistor between 3.3V and Gnd is provided to ensure that this requirement is met. A MicroSD card inserted may consume enough to meet the specification without the resistor, thus it can be disconnected by using solder jumper J32. The 3.
MTX1S Manual routed to a header, to be used for other purposes. External pull resistors are installed to keep the peripheral pins at a defined state during boot or when the peripheral is disconnected. They pull chip select lines to the deselected state to minimize power consumption. Most solder jumpers are connected by default. To disconnect for the first time, a small trace connecting the two jumper pads must be cut. To reconnect, create a solder bridge across the pads.
MTX1S Manual disconnected using the solder jumpers. The IC is connected to a 3pin screw terminal with 3.5mm pin spacing. The pin closest to header F is ground. The center pin is RX with RS232 installed, or Inverting () with RS485. The pin next to the MicroSD slot is TX with RS232 or NonInverting (+) with RS485. Note that the A/Y, B/Z naming is not used due to differing definitions among different manufacturers.
MTX1S Manual temperature is limited to the maximum PCB temperature. It has an accuracy of +/ 2C (max.) and it outputs 19.5mV/C. It consumes only 6uA (typ.). For more information on this IC, please consult the datasheet. 8channel Lowside / Relay Driver The 8channel lowside / relay driver is the MAX4820 from Maxim. The outputs are opendrain. Each channel can drive low at 70mA each. Channels can be connected together to increase the current capability.
MTX1S Manual Windows Installation Before plugging in the MTX1S for the first time, the latest software and drivers must be downloaded. The MTX1S is supported under Windows XP, Vista (32 and 64 bit), and Windows 7 (32 and 64 bit). There is limited support for Windows 2000. The MTX1S appears as three different devices to the PC depending on which mode is selected by the button and jumper.
MTX1S Manual Once Atmel Studio is installed, remove jumper JMP and plug in or reset the MTX1S while holding down the PROG button. This will run the AVRISP mkII compatible PDI programmer. LED_STS should be lit and LED_PWR should be PWM flashing on and off. You will then be prompted for the AVRISP mkII driver. By default, this is located in the Program Files/Atmel/AVR Jungo USB directory. Point the installer to the appropriate subdirectory for your PC architecture (usb32 or usb64) and install the driver.
MTX1S Manual MTX1S Driver / Serial Configuration Next, the MTX1S CDC driver can be installed, which is used by the serial bridge and configuration mode. This driver allows the board to appear as a COM port. The driver itself is included with Windows, but an .inf file is needed to configure it. Download the .inf file from https://www.mattairtech.com/software/MattairTech_CDC_Driver_Signed.zip. Note that Windows Vista 64bit, Windows 7 64bit and Windows 8 require the signed driver.
MTX1S Manual Linux Installation Linux is supported as well. You must download and build the toolchain from the latest script available at AVR Freaks on the AVR GCC Forum (Script for building AVR GCC sticky at http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=42631). All firmware written for the MTX1S is developed under Linux using this toolchain.
MTX1S Manual AVRISP mkII Compatible PDI Programmer The MTX1S onboard PDI Programmer is based on the AVRISP mkII compatible programmer written by Dean Camera (http://www.fourwalledcubicle.com/). AVR Studio 4.19, 5.x, Atmel Studio 6.x, and AVRDUDE are supported. Using Atmel Studio (AVR Studio) Start Atmel Studio and open or create a new project. An example project, which can be used as a template, is available for the MTX1S at http://www.mattairtech.com/software/MTX1S/MT X1S_Simple_Demo.zip.
MTX1S Manual Next, build the project. Then, click on the Device Programming button. In the Device Programming window, select the AVRISP mkII as the tool. If no tool appears, be sure that the MTX1S is plugged in and in programming mode (STS LED will be pulsing). Select the ATxmega128A1 as the device and PDI as the interface and click Apply. You should now be connected to the AVRISP mkII compatible programmer with serial number 000200012345. Now click Read next to Device signature.
MTX1S Manual Next, select the Memories page. In the Flash section, a hex file can programmed into the targets flash memory. Load your hex file, then click Program. The hex file for the MT X1S_Simple_Demo is located in the Debug folder. You will need to erase the target first if you do not have “Erase Flash before programming” checked. You should also verify the flash as well. January 29, 2015 21 http://www.mattairtech.
MTX1S Manual Next, select the Fuses page. It is best to leave the fuse settings alone until you understand what they do. In particular, do not set the BOD (Brownout detection) voltage too close to 3.3V, as this could cause the target to be held perpetually in reset. Due to errata, the BOD should not be enabled in sampled mode when active or idle (BODACT). Sampled mode is OK for other sleep modes (BODPD). Now you may wish to look at the other pages.
MTX1S Manual Using AVRDUDE TODO (ie: avrdude p x128a1 c avrisp2 P usb U flash:w:"myfirmware.hex") January 29, 2015 23 http://www.mattairtech.
MTX1S Manual Serial Bridge The serial bridge can connect the XMEGA to a host application (ie: terminal emulator) over USB. The XMEGA simply uses one USART as it would with, for example, RS232. There is no need to learn the USB protocol or use a USB library. On the host side, the MTX1S will appear as a virtual COM port. Speeds of up to 2Mbps are supported. Configuration Before using the serial bridge, it must be configured to be compatible with the target. This configuration is stored in EEPROM.
MTX1S Manual Baud Rate Register Value (Manual Speed) Async 1X f osc −1 16∗BAUD UBRR= f osc 16∗UBRR1 BAUD= UBRR= BAUD= where Async 2X Synchronous f osc −1 8∗BAUD UBRR= f osc 8∗UBRR1 BAUD= f osc −1 2∗BAUD f osc 2∗UBRR1 f osc =8000000 January 29, 2015 25 http://www.mattairtech.
MTX1S Manual Configuration The MTX1S PDI programmer, serial bridge, and other features can be configured by entering configuration mode. This configuration is stored in nonvolatile EEPROM memory. Configuration mode requires an ANSI terminal emulator. Configuration options are highlighted by using the up and down arrow keys, and selected using the enter key. Some dialogs are for entering numbers in hexadecimal. Here, the left and right arrow keys and backspace are used.
MTX1S Manual XMEGA Demo Program Note: This page describes the preinstalled demo program. This program is primarily meant for testing. While the source code is available, it is not intended to be reused. The code is a collection of many code fragments. It is disorganized and complicated. It is recommended to use the Atmel Studio 6 ASF (Atmel Software Framework) template to get started (see Using Atmel Studio (AVR Studio)). The following relates to the preinstalled demo.
MTX1S Manual Firmware Updates The MTX1S firmware will be updated periodically to add new features and fix bugs. These updates will be available on the MattairTech website. The updates may include just a hex file (for programming flash), or both a hex file and eep file (for programming both flash and EEPROM). FLIP is a graphical utility for Windows used to load firmware updates onto the MTX1S. FLIP includes the DFU bootloader driver. Download FLIP 3.4.2 or higher from http://www.atmel.com/tools/FLIP.
MTX1S Manual FLIP Plug in the MTX1S with jumper JMP installed and while holding down the PROG button. This will enter the DFU bootloader. LED_STS should be on and LED_PWR should be off. Now launch the FLIP utility. When it has loaded, click on the chip icon and select the AT90USB162. Next, click on the USB icon, select USB, then connect. The screen should now show information about the AT90USB162. Click on the File menu, and open the appropriate hex file. More information will appear about the program.
MTX1S Manual You may also need to program the EEPROM. If so, click on Select EEPROM at the bottom. Then, click on the File menu and open the appropriate eep file. You will have to change the file filter to allow you to see the eep file. Note that eep files are just hex files but with the eep extension instead of hex. More information will appear about the file when selected. Both Program and Verify should be checked. Click run to program the EEPROM. dfuprogrammer TODO Must erase chip first.
MTX1S Manual Troubleshooting / FAQ Nothing yet Support Information Please check the MattairTech website (http://www.MattairTech.com/) for firmware and software updates. Email me if you have any feature requests, suggestions, or if you have found a bug. If you need support, please contact me (email is best). You can also find support information at the MattairTech website. A support forum is planned. Support for AVRs in general can be found at AVRfreaks (http://www.avrfreaks.net/).
MTX1S Manual Schematic January 29, 2015 32 http://www.mattairtech.
MTX1S Manual Legal Notices Copyright Notices Copyright Copyright Copyright Copyright Copyright © © © © © 2009-2012, Justin Mattair (http://www.mattairtech.com/) 2009-2012, Dean Camera (http://www.lufa-lib.org) 2003-2012, Atmel Corporation (http://www.atmel.com/) 2009, CHaN (http://elm-chan.org/fsw/ff/00index_e.html) 2010, Peter Kwan (serial demo) Software Disclaimer The author(s) disclaim all warranties with regard to this software, including all implied warranties of merchantability and fitness.
MTX1S Manual Licenses LUFA USB Library Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that the copyright notice and this permission notice and warranty disclaimer appear in supporting documentation, and that the name of the author not be used in advertising or publicity per
MTX1S Manual Appendix A: Precautions CAUTION The MT-X1S contains static sensitive components. Use the usual ESD procedures when handling. CAUTION Improper fuse settings may result in an unusable AVR. Be certain that you know the effects of changing the fuses, that you understand the convention used for describing the state of the fuses (programmed = 0), and that you are using an appropriate programming speed before attempting to change fuse settings. January 29, 2015 35 http://www.mattairtech.
MTX1S Manual Appendix B: Other MattairTech Products ZeptoProg II AVRISP mkII Programmer ● ● ● ● ● ● ● ● ● AVRISPmkII compatible AVR Programmer Supports all AVRs with ISP, PDI, or TPI Optional 5V output via headers to target board, with standard jumper and PTC fuse 4channel Logic Analyzer Serial bridge / pattern generator / SPI interface GPIO / PWM / frequency input & output Atmel Studio / AVRDUDE support Target board voltage of 2V to 5.