MattairTech MT-X1S User manual

MT-X1S Manual
Table of Content
Table of Content
Overview........................................................................................................................3
Introduction.......................................................................................................................................3
MT-X1S Features..............................................................................................................................4
ATxmega128a1u Features................................................................................................................5
Revision B Changes.....................................................................................................7
Board Variants (Rev B only)........................................................................................7
MT-X1S Hardware.........................................................................................................9
Solder Jumpers.................................................................................................................................9
Headers / Pin Descriptions..............................................................................................................10
Buttons / Jumper.............................................................................................................................13
Power / Status LEDs.......................................................................................................................13
Power Supply..................................................................................................................................13
Clock Sources / RTC.......................................................................................................................14
USB Serial Bridge...........................................................................................................................15
MicroSD Card..................................................................................................................................15
32KB SPI SRAM.............................................................................................................................15
RS-232 / RS-485.............................................................................................................................15
Audio Amplifier................................................................................................................................16
1.25V Precision Reference..............................................................................................................16
Temperature Sensor.......................................................................................................................16
8-channel Lowside / Relay Driver....................................................................................................17
Installation...................................................................................................................18
AVRISP mkII Compatible PDI Programmer..............................................................22
Using Atmel Studio (AVR Studio)....................................................................................................22
Using AVRDUDE............................................................................................................................26
Serial Bridge................................................................................................................27
Configuration..............................................................................................................29
XMEGA Demo Program..............................................................................................30
Firmware Updates.......................................................................................................31
XMEGA USB DFU Bootloader (Rev B Only).............................................................34
Troubleshooting / FAQ...............................................................................................36
Support Information...................................................................................................36
Schematic....................................................................................................................37
Legal Notices...............................................................................................................39
Appendix A: Precautions...........................................................................................41
Appendix B: Other MattairTech Products................................................................42
March 2, 2017 2 http://www.mattairtech.com/

MT-X1S Manual
Overview
Overview
Introduction
The MT-X1S is a flexible USB development board for the Atmel ATxmega128a1u
microcontroller. Optionally available is a MicroSD card slot, 32KB SPI SRAM, audio amplifier,
lowside / relay driver, temperature sensor, RS-232 or RS-485, 4 LEDs, and an onboard 1.25V
precision reference for the ADC. The XMEGA can be programmed over USB using the optional
onboard AVRISP mkII compatible PDI programmer. The XMEGA can communicate with a computer
using the optional onboard USB to serial bridge (up to 2Mbps). The Atmel AT90USB162 USB AVR,
which provides these features, will automatically sleep when USB is disconnected. Alternatively, the
XMEGA can be connected directly to the USB connector. The board can be powered via USB or an
external header. Voltage is regulated by a 3.3V, 1A LDO regulator. There are several clock options
available onboard, including a 32.768KHz crystal, an external clock, an external HC49 crystal landing,
and several internal clock options. Most XMEGA pins are routed to headers. The included peripheral
devices are connected to the XMEGA via solder jumpers, which allows use of the pins if the device is
not used. A demo program is preinstalled on the XMEGA demonstrating use of each peripheral
device, as well as demonstrating sleep mode.
March 2, 2017 3 http://www.mattairtech.com/

MT-X1S Manual
MT-X1S Features
●Atmel XMEGA ATXMEGA128A1U, 128KB flash, 8KB RAM
●Optional onboard USB PDI programmer (no external programmer needed)
●AVRISP mkII compatible
●Program flash, EEPROM, fuses, lock bits, and more
●Supports AVR Studio 4 & 5, Atmel Studio 6 & 7, AVRDUDE, Codevision, and BASCOM
●Optional USB - Serial Bridge
●Up to 2MHz baud rate (1MHz async)
●Synchronous or asynchronous operation
●XMEGA can be routed directly to the USB connector
●3.3V, 1A LDO regulator
●Powered via USB or external header
●32.768KHz crystal connected to TOSC (RTC) pins
●HC49 crystal landing connected to XTAL pins
●MicroSD card slot with push-push spring action*
●32KB SPI SRAM chip*
●8 channel lowside / relay driver with kickback protection*
●Up to 70mA per channel
●5V or 3.3V devices (relays, LCD backlights, etc.)
●Can be used as general purpose lowside driver
●Audio amplifier connected to XMEGA DAC*
●Temperature sensor with low-power operation*
●1.25V precision voltage reference*
●Use for signed differential conversions from 0V to ~2.5V at the pin
●Routed to both reference inputs via solder jumpers
●Choice of RS-232 or RS-485 serial interface, with powerdown and 3-pin screw terminal*
●4 LEDs
●Available 1MB low power external SRAM (see http://www.mattairtech.com/)
●JTAG (XMEGA), PDI (XMEGA)*, and ISP (USB AVR) headers
●4 boot modes selectable via jumper and button (with optional onboard programmer only)
●Serial bridge (default)
●AVRISP mkII compatible PDI programmer
●Configuration (uses terminal emulator)
●DFU bootloader (to update firmware on USB AVR via USB)
●Boot button can be used to toggle between the PDI programmer and the serial bridge
●Entire board can consume down to 100uA or less in sleep mode
●Preloaded demo program demonstrates onboard peripheral devices as well as sleep mode
●Most pins routed to headers (Port A through Port K)
●38 Solder jumpers can be used to disconnect devices when not used (frees up header pin)
●PCB measures 100mm x 50mm
* Available only on boards with Onboard Peripheral Devices option selected
March 2, 2017 4 http://www.mattairtech.com/

MT-X1S Manual
ATxmega128a1u Features
●High-performance, low-power Atmel®AVR®XMEGA®8/16-bit Microcontroller
●Nonvolatile program and data memories
●l 64K - 128KBytes of in-system self-programmable flash
●l 4K - 8KBytes boot section
●l 2KBytes EEPROM
●l 4K - 8KBytes internal SRAM
●l External bus interface for up to 16Mbytes SRAM
●l External bus interface for up to 128Mbit SDRAM
●Peripherall features
●Four-channel DMA controller
●Eight-channel event system
●Eight 16-bit timer/counters
●l Four timer/counters with 4 output compare or input capture channels
●l Four timer/counters with 2 output compare or input capture channels
●l High resolution extension on all timer/counters
●l Advanced waveform extension (AWeX) on two timer/counters
●One USB device interface
●l USB 2.0 full speed (12Mbps) and low speed (1.5Mbps) device compliant
●l 32 Endpoints with full configuration flexibility
●Eight USARTs with IrDA support for one USART
●Four two-wire interfaces with dual address match (I2C and SMBus compatible)
●Four serial peripheral interfaces (SPIs)
●AES and DES crypto engine
●CRC-16 (CRC-CCITT) and CRC-32 (IEEE®802.3) generator
●16-bit real time counter (RTC) with separate oscillator
●Two sixteen channel, 12-bit, 2msps Analog to Digital Converters
●Two Two-channel, 12-bit, 1msps Digital to Analog Converters
●Four Analog Comparators (ACs) with window compare function, and current sources
●External interrupts on all general purpose I/O pins
●Programmable watchdog timer with separate on-chip ultra low power oscillator
●QTouch®library support
●l Capacitive touch buttons, sliders and wheels
●Special microcontroller features
●l Power-on reset and programmable brown-out detection
●l Internal and external clock options with PLL and prescaler
●l Programmable multilevel interrupt controller
●l Five sleep modes
●l Programming and debug interfaces
●l JTAG (IEEE 1149.1 compliant) interface, including boundary scan
●l PDI (Program and Debug Interface)
March 2, 2017 5 http://www.mattairtech.com/

MT-X1S Manual
Revision B Changes
Revision B Changes
Revision B includes the following changes:
1) Add jumpers J33 and J34 to allow routing of the USB data lines to either the XMEGA or the AVR.
Jumpers J10 and J11 were changed to 3-pad to support this. The Serial RAM cannot be used when
the XMEGA is connected to USB.
2) Add PTC fuse to USB Vbus
3) Change both crystals and buttons to SMT
4) Change 32.768KHz crystal load capacitors
5) Support a variant of the board without the onboard PDI programmer / serial bridge by adding J35
through J38:
* J35 connects the STS_LED to TX (XMEGA F2)
* J36 connects the PROG button to XCK (XMEGA F1)
* J37 disconnects the debouncing capacitor of the Reset button for use with the XMEGA
* J38 connects Reset button to XMEGA PDI_CLK (also reset)
Board Variants (Rev B only)
Board Variants (Rev B only)
Revision B of the MT-X1S is sold with two hardware options:
1) Onboard PDI Programmer / Serial Bridge
2) Onboard Peripheral Devices
for a total of four board variants. The schematic shows the variant with both options installed.
The peripheral devices include:
1) Micro SD card slot
2) Relay driver
3) Precision reference
4) Audio amplifier
5) Temperature sensor
6) Serial RAM
7) RS-232 or RS-485
The 4 LEDs are always installed
The PDI programmer / serial bridge includes:
1) AT90USB162 and related parts (8MHz crystal, capacitors, etc)
2) bilateral switch (TC7W66)
3) PWR LED (STS LED is always installed)
March 2, 2017 7 http://www.mattairtech.com/

MT-X1S Manual
Variant Jumper Configuration
Variant Jumper Config
With programmer J19: Installed
J10 & J11: Any setting
J33: Left*, J34: Up*
J35 & J36: Not Installed
J37: Installed, J38: Not Installed
Without programmer J19: Not Installed
J10 & J11: Disconnected*
J33 & J34: Right & Down*
J35 & J36: Installed
J37: Not Installed, J38: Installed
With programmer, but with
USB routed to XMEGA
J19: Not Installed
J10 & J11: Disconnected*
J33 & J34: Right & Down*
J35: Not Installed, J36: Installed
J37: Installed, J38: Not Installed
* Direction indicates which pads are soldered when the board is
viewed with the USB connector to the left. Disconnected means no
solder connection from the center pad to either of the outer pads.
If you have the programmer installed, you may switch the USB data connection between the
programmer (AT90USB162) and the XMEGA. See the table above for jumper settings. Note that
because the AT90USB162 is mounted, the XMEGA cannot control the STS LED, otherwise contention
would occur. When the AT90USB162 detects that USB is disconnected, it will turn off both the STS
and PWR LEDs and enter sleep. The RESET button should not be connected to the XMEGA. The
AT90USB162 will reset the XMEGA after the button is pressed. Because the serial connection
between the two chips is unused in this configuration, J19 should be disconnected (and optionally
J18). Additionally, be sure that the Serial Mode is set to Asynchronous and the USB Ready Signal is
Disabled in the AT90USB162 configuration (see the Configuration chapter). Finally, the XMEGA
BOOTRST fuse bit must be changed so that the bootloader is run after reset. This can be done with
the onboard programmer prior to changing the jumpers.
The XMEGA demo program is installed on all board variants, even those without the optional
onboard peripheral devices. In these cases, most of the functionality will be useless except for the
LED demo (the 4 LEDs are always installed). Additionally, if the optional onboard PDI programmer /
serial bridge is not installed, communications must be made by connecting a USB-serial converter to
pins F2 (XMEGA TX) and F3 (XMEGA RX) at 1000000 baud (8N1).
See the XMEGA USB DFU Bootloader chapter for details on the XMEGA bootloader.
March 2, 2017 8 http://www.mattairtech.com/

MT-X1S Manual
MT-X1S Hardware
MT-X1S 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.25V reference
J6 ADCA1 (pin A1) to temperature sensor output
J7 Not present on MT-X1S
J8 SPI D SS (pin D4) to SRAM chip select (external pullup)
J9 SPI D MOSI (pin D5) to SRAM SI (external pullup)
J10 SPI D SCK (pin D7) to SRAM clock input (external pullup)
J11 SPI D MISO (pin D6) to SRAM SO (external pulldown)
J12 Pin D0 to LED_1
J13 Pin D1 to LED_2
J14 Pin D2 to LED_3
J15 Pin D3 to LED_4
J16 SPI F SCK (pin F7) to relay driver clock input
J17 SPI F MOSI (pin F5) to relay driver SI input
J18 USART F0 RXD (pin F2) to AT90USB162 USART TX
J19 USART F0 TXD (pin F3) to AT90USB162 USART RX (shared with PDI_DATA)
J20 USART F0 XCK (pin F1) to AT90USB162 USART XCK (also USB ready signal)
J21 SPI E MISO (pin E6) to SD card SO (must enable XMEGA pullup)
J22 SPI E SCK (pin E7) to SD card clock input (external pullup)
J23 SPI E MOSI (pin E5) to SD card SI (external pullup)
J24 SPI E SS (pin E4) to SD card chip select (external pullup)
J25 Serial TX enable (pin E0) to RS-232 _FORCEOFF_ or RS-485 DE (external pulldown)
J26 Serial RX enable (pin E1) to RS-232 _EN_ or RS-485 _RE_ (external pullup)
J27 Serial RX (pin E2) to RS-232 ROUT or RS-485 RO
March 2, 2017 9 http://www.mattairtech.com/

MT-X1S Manual
J28 Serial TX (pin E3) to RS-232 DIN or RS-485 DI (external pullup)
J29 Serial Non-inverting screw-terminal to 680 ohm bias resistor to 3.3V (RS-485 ONLY)
J30 Serial Non-nverting screw-terminal to 120 ohm termination resistor to Inverting screw-
terminal (RS-485 ONLY)
J31 Serial Inverting screw-terminal to 680 ohm bias resistor to GND (RS-485 ONLY)
J32 3.3V to 33KOhm minimum current resistor to GND (MT-X1S ONLY) Disconnect for
lowest power consumption, but observe 3.3V regulator minimum load specification
J33
Jumpers J33 and J34 allow routing of the USB data lines to either the XMEGA or the
A90USB162. Jumpers J10 and J11 were changed to 3-pad to support this. The Serial
RAM cannot be used when the XMEGA is connected to USB. See Board Variants
section above.
J34 See J33
J35 J35 connects the STS_LED to TX (XMEGA F2) . This allows the XMEGA to control the
STS LED when the AT90USB162 in not installed. See Board Variants section above.
J36 J36 connects the PROG button to XCK (XMEGA F1) . This enables bootloader entry
selection for the DFU bootloader on the XMEGA when the AT90USB162 in not installed.
See Board Variants section above.
J37 The XMEGA reset line is also the PDI_CLK line used for programming/debugging. It
cannot have a capacitor installed. J37 disconnects the debouncing capacitor of the Reset
button for use with the XMEGA . See Board Variants section above.
J38 J38 connects Reset button to XMEGA PDI_CLK (also reset). This allows the XMEGA to
be reset when the AT90USB162 in not installed. See Board Variants section above.
Headers / Pin Descriptions
Pin Description
External Power Header Under the default configuration, 5V should be supplied to this pin. Lower
voltages may be used down to around 4V (or lower if using less current).
Voltages greater than 5.5V require J2 to be disconnected. Disconnecting J2
will disable the 5V output pin and inductive kickback protection of the relay
driver. But it will then allow voltages up to ~7.5V. This header is reverse
polarity / reverse current protected using a schottky diode.
3.3V output headers (x4) There are four 2-pin power output headers next to each port header group. The
header next to the analog ports (ports A and B) comes from the analog 3.3V rail.
Note that if these headers are installed, there will not be enough room to plug in
IDC connectors next to each other.
Relay Header 3.3V This can be used for the positive 3.3V side of a relay or other device.
March 2, 2017 10 http://www.mattairtech.com/

MT-X1S Manual
Relay Header 5V This can be used for the positive 5V side of a relay or other device. This is also
the common cathode of the kickback diodes in the relay driver. Both of these are
disabled when J2 is diconnected.
Relay Header 1-8 These are the 8 relay driver outputs. They are open-drain active low. When
enabled, the output is connected to ground. When disabled, the pin is in a high
impedance state. When driving inductive loads, like relays, free-wheeling diodes
provide kickback protection (when J2 connected). Non-inductive loads can also
be connected (ie: LCD backlight). Each output is capable of sinking 70mA.
Outputs can be combined.
Audio Header This is the singe channel output from the audio amplifier. It can drive 8 ohm
loads. 4 ohm loads may also be connected, but under some conditions,
distortion or automatic thermal shutdown may occur.
JTAG Header JTAG header for the XMEGA which can be used for programming, debugging,
and JTAG boundary scans. Disable JTAG to gain access to the four underlying
analog/GPIO pins.
PDI Header PDI header for the XMEGA which can be used for programming or debugging.
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. Alternatively, an external USB-
serial bridge can be connected.
ISP Header ISP header for the USB AVR which can be used for programming or debugging.
The USB AVR can be programmed over USB using the DFU bootloader.
Port A All pins are routed to headers. The 1.25V precision reference can be connected
to pin A0 (Vref input) through a solder jumper. The temperature sensor output
and audio amplifier input are also connected to this port.
Port B All pins are routed to headers. The 1.25V precision reference can be connected
to pin B0 (Vref input) through a solder jumper. Note that JTAG is connected to
pins B4 – B7. JTAG must be disabled to use these pins for other purposes like
the ADC.
Port C All pins are routed to headers. No peripheral devices are connected to this port.
Port D All pins are routed to headers. This port also connects to the LEDs and 32KB
SPI SRAM memory through solder jumpers.
Port E All pins are routed to headers. This port also connects to the buttons and the
MicroSD card slot through solder jumpers.
Port F All pins are routed to headers. This port also connects to the USART of the USB
AVR (RX, TX, and optionally, XCK) as well as the SPI inputs of the relay driver
(MOSI and SCK) through solder jumpers. To minimize power consumption. TX
should be tristated before entering sleep.
Ports H, J, and K All pins are routed to headers. No peripheral devices are connected to these
ports. They can be used for GPIO or for use with external memory.
March 2, 2017 11 http://www.mattairtech.com/

MT-X1S Manual
Pins Q0 and Q1 The 32.768KHz crystal is connected to these pins, which serve as the TOSC
input pins of the RTC.
Pins Q2 and Q3 Pin Q2 is routed to the chip select pin of the relay driver. Pin Q3 is routed to the
audio amplifier power-down pin. Neither pin is routed to a header.
Pins R0 and R1 Both of these pins are routed to an HC49 crystal footprint. A 22pF capacitor is
also connected to each line. If an external clock is used, connect it to R1.
Serial Screw Terminal Pin 1, which is closest to the port F header, is ground. This should always be
connected, with both RS-232 and RS-485. Pin 2 is RX (RS-232) or inverting (-,
RS-485). Pin 3 is TX (RS-232) or non-inverting (+, RS-485).
March 2, 2017 12 http://www.mattairtech.com/

MT-X1S 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. The reset button resets the USB AVR, which will in turn reset the
XMEGA when it boots. The following table lists the mode selection during power-up and reset.
Mode Selection During Power-up and Reset
PROG Button JMP Jumper Mode
Pressed Installed DFU Bootloader
Not Pressed Installed Configuration Mode
Pressed Not Installed AVRISP mkII PDI Programmer
Not Pressed Not Installed USB Serial Bridge
Power / Status LEDs
There are two green LEDs that are used to indicate USB status, the mode of operation,
communication activity, programmer status, and more. The following table lists LED functionality in
each mode. Both LEDs are turned off in sleep mode.
LED Functionality
Mode STS LED PWR LED
AVRISP mkII Programmer Programmer Activity PWM pulsing
Configuration Mode On On
USB Serial Bridge RX Activity TX Activity
DFU Bootloader On Off
Power Supply
The MT-X1S can be powered via USB or via an external header. Both sources are connected
to the input of a 1A, 3.3V LDO linear regulator through Schottky diodes rated at 2A each (2A was
chosen also to keep the dropout voltage low throughout the range of current). The diodes provide
reverse-polarity protection as well as ensuring that current will not flow from one source to the other.
For example, if the external header has a greater voltage than the USB VBUS voltage, the diode
March 2, 2017 13 http://www.mattairtech.com/

MT-X1S 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 MT-X1S 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.3V regulator has thermal protection and foldback current limiting. There is a 10uF
capacitor on both the input and output. Note that 10uF is the maximum allowed by the USB
specification. When using the external header, additional capacitance may be needed with higher
impedance voltage sources (ie: batteries, long cable runs). The regulator input can also be routed
through J2 to the header pin labeled 5V (near the relay driver). Voltages greater than 5.5V on the
external power input header require J2 to be disconnected, which will disable the relay driver kickback
protection.
Clock Sources / RTC
By default, a 32.768KHz crystal is installed and connected to the TOSC pins of the XMEGA
(R0 and R1). An HC49 crystal landing is available as well, with 22pF load capacitors preinstalled. An
external clock can also be connected to pin R1. There are several internal clock options as well. The
demo program makes use of the 32MHz internal RC oscillator. This oscillator is configured to be auto-
calibrated by a DFLL, which uses the 32.768KHz crystal as input. The crystal is also the source for the
RTC. A 2MHz RC oscillator and two different 32KHz oscillators are also available. A PLL and
prescalers can be used to obtain the various clocks. Be aware that the ATxmega128a1u requires both
the 2MHz and 32MHz oscillators to be running and both DFLLs to be enabled for either DFLL to
operate due to errata. Atmel ASF (Atmel Software Framework) does not support this arrangement, but
the example code shows how to set this up. Also note that the DFLL calibrated oscillators will still not
be as accurate as an external high speed crystal. If using an external crystal, it must be 0.4MHz to
16MHz. The PLL can be used to obtain higher clock speeds.
Programming Headers
The PDI header has the standard 6-pin layout. Because an onboard programmer is provided,
an external programmer is not necessary. However, debugging requires use of an external debugger
connected to the PDI header or the JTAG header. Because the RX/D pin is shared with the XMEGA
PDI_DATA pin, an external programmer/debugger cannot be used when using the serial bridge as this
would cause contention. Jumper J19 can be disconnected to avoid this contention, but the onboard
serial bridge will no longer be usable (an external bridge can be used if needed for debugging).
Alternatively, the JTAG header can be used for debugging. When using an external debugger or
programmer on the PDI header, the USB AVR should be in any mode other than the PDI programmer.
An ISP header is available for programming the USB AVR. It can also be programmed over USB (see
Firmware Updates).
Solder Jumpers / USB Shield
There are many solder jumpers on the PCB connecting XMEGA pins to the onboard peripheral
devices. This allows unused devices to be disconnected, freeing up the XMEGA pin, which is also
March 2, 2017 14 http://www.mattairtech.com/

MT-X1S 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. Jumper J1 can be soldered to
connect the USB shield to ground. The USB specification calls for the USB shield to be connected to
ground on the host side only. However, it may be desired to ground this on the device side. An 0603
SMT component may be soldered on the solder jumper pads as well.
USB Serial Bridge
The USB Serial bridge allows the XMEGA to communicate with a computer over USB by
simply using a USART. There is no need to learn the USB protocol or utilize a USB library. All USB
functionality is handled by the USB AVR (AT90USB162). It simply relays bytes between the XMEGA
and the host. The MT-X1S uses two pins on USART F (RX and TX) in asynchronous mode and three
pins (adding XCK) in synchronous mode. Optionally, a USB ready signal is available on the XCK pin.
To minimize power consumption. TX should be tristated before entering sleep. This is due to the
sharing of PDI_DATA and TX. PDI_DATA has a pulldown active, which will consume current when TX
is set to output high. All three pins can be disconnected from the USB AVR using the solder jumpers.
MicroSD Card
The MicroSD card slot has a spring-loaded mechanism that locks the card in place when
inserted (push-in, push-out). The contacts are gold-plated. It is connected to SPI E using four pins. All
pins have external 47Kohm pullups installed. All four pins can be disconnected from the MicroSD card
slot using the solder jumpers. Note that when in the deepest sleep modes and a card is installed, it will
likely consume the most current. Since the minimum load required by the regulator is 100uA, and the
rest of the onboard components may consume less than 75uA, having a card installed may allow
disconnection of the minimum load resistor (solder jumper), which itself consumes 100uA.
32KB SPI SRAM
The 32KB SPI SRAM is the 23K256-I/SN from Microchip. It has a very simple protocol, and
can be quite fast operating at 16MHz with sequential access (ie: data capture). It is less suitable for
storage that requires random access. It is connected to SPI D using four pins, all of which have
47Kohm external pull resistors. All four pins can be disconnected using the solder jumpers. A simple
driver is provided in the ASF template. More more information, consult the datasheet.
RS-232 / RS-485
The MT-X1S comes with either an RS-232 or RS-485 interface IC installed. There are two
different PCB footprints, but the screw terminals and I/O lines are shared. Therefore, only one can be
installed on the PCB at a time. The RS-232 IC is the MAX3221IPWR from Texas Instruments. The
RS-485 IC is the ISL3175EIUZ from Intersil. The IC is connected to USART E via four pins. They are
RX, TX, RX enable, and TX enable. There are three 47Kohm pull resistors installed, a pullup on TX,
and pull resistors on the enable lines that keep both disabled by default. All four pins can be
March 2, 2017 15 http://www.mattairtech.com/

MT-X1S Manual
disconnected using the solder jumpers. The IC is connected to a 3-pin screw terminal with 3.5mm pin
spacing. The pin closest to header F is ground. The center pin is RX with RS-232 installed, or
Inverting (-) with RS-485. The pin next to the MicroSD slot is TX with RS-232 or Non-Inverting (+) with
RS-485. Note that the A/Y, B/Z naming is not used due to differing definitions among different
manufacturers. When RS-485 is installed, there is a 120ohm termination resistor installed between the
inverting and non-inverting pins, which can be disconnected using the solder jumper. Additionally, two
680 ohm resistors are installed that can be used to bias the inverting and non-inverting pins to
negative and positive voltages respectively. The IC does not require this biasing so the bias resistors
are disconnected by default. When connecting wires to the screw terminal, take care not to short a
wire to an LED as they are close in proximity. The location of the LEDs was chosen to minimize
differences between the MT-X1 and the MT-X1S. When using RS-232, be aware that the auto-
powerdown feature is enabled. This causes the TX driver to power down when the RX line is
disconnected (no valid RS-232 level present). One consequence of this is that a loopback test
requires a pull resistor on RX to enable the TX driver, which will then keep RX at a valid level
thereafter. For more information on either IC, consult the appropriate datasheet.
Audio Amplifier
The audio amplifier is the LM4889MM/NOPB from National Semiconductor. It is a single
channel, class AB, 400mW @ 3.3V amplifier with depop and thermal protection. It is connected to the
XMEGA DAC A0 on pin A2, which can be disconnected using a solder jumper. The shutdown pin is
routed to pin Q3 and has a 47 Kohm pull resistor to keep the IC in shutdown when Q3 is not driven.
The differential gain is set to 2, so the internal 1V reference or the external 1.25V reference can be
used. An 8ohm or 16ohm speaker can be connected to the output which is routed to a two pin header.
A 4ohm load can also be connected, but the amplifier may enter thermal shutdown if using a higher
voltage reference and the signal magnitude remains large for a long enough period of time. For more
information on this IC, please consult the datasheet.
1.25V Precision Reference
The 1.25V precision reference is the ISL60002DIH312Z-TK from Intersil. It is a low-power FGA
reference with a low 20ppm/C temperature coefficient. The initial accuracy is +/-5mV. Because each
MT-X1S board is intended to be calibrated individually, the initial accuracy was deemed less important
than the temperature coefficient. The reference is connected to both reference inputs, pins A0 and B0.
It can be disconnected using the solder jumpers. The reference voltage of 1.25V was chosen as a
workaround to the ADC errata of the ATxmega128a1. It is intended to be used with the ADC in
differential mode and with signed conversions. The voltage to be measured is connected to the
positive input, and the reference to the negative. This results in conversions in the ~0 to 2.5V range.
See the source code for example setup and usage. For more information on this IC, please consult
the datasheet.
Temperature Sensor
The temperature sensor is the MCP9701AT-E/TT from Microchip. It is connected to pin A1,
and can be disconnected by using a solder jumper. It can sense from -10C to 125C, though the high
March 2, 2017 16 http://www.mattairtech.com/

MT-X1S 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.
8-channel Lowside / Relay Driver
The 8-channel lowside / relay driver is the MAX4820 from Maxim. The outputs are open-drain.
Each channel can drive low at 70mA each. Channels can be connected together to increase the
current capability. All channels have kickback protection diodes, allowing them to driver relays. Note
that solder jumper J2 must be connected for kickback protection to be available. All eight outputs,
along with 3.3V (regulated Vcc) and ~5V (external voltage), are routed to a 10-pin header. Thus,
devices that use either 3.3V or 5V (ie: 5V relay, 5V LCD backlight) are supported. Voltages greater
than 5.5V on the external power input header require J2 to be disconnected, which will disable the relay
driver kickback protection. The IC is connected to SPI F and can be disconnected using the solder
jumpers. Note that MISO is not connected, so the XMEGA cannot read from the IC. Also note that the
SPI F SS line is not used as the chip select, but instead, Q2 is used. Thus, it is necessary to configure
the SS pin as an output, or enable the pullup and leave it as an input so that SPI will operate as a
master. The maximum operating speed is 2MHz. The protocol is very simple; essentially just a shift
register. A simple driver is provided in the ASF template. For more information on this IC, please
consult the datasheet.
LEDs
There are four LEDs connected to pins D0-D3, and can be disconnected by using the solder
jumpers. The LEDs are on when the outputs are high. The LEDs are connected to ground through 249
ohm series resistors.
External 1MB low-power SRAM (optional)
An external 1 MB low-power SRAM module is available separately.
* 8-Mbit (1024 x 8) static RAM
* Cypress CY62158EV30 IC
* 45ns
* 2.2V-3.6V
* 18mA (25mA max) @ max speed
* 2uA (8uA max) when not selected
* -40C to +85C
* 2 latches for address lines (20-bit)
* dedicated 8-bit data lines
* Measures 34.6mm x 25.0mm (1.36" x 0.98")
* Fits EBI header on MT-X1 development board
March 2, 2017 17 http://www.mattairtech.com/

MT-X1S Manual
Installation
Installation
This section applies only to boards with the PDI Programmer / Serial Bridge option installed.
Before plugging in the MT-X1S for the first time, the latest software and drivers must be
downloaded. The MT-X1S is supported under Windows XP, Vista (32 and 64 bit), Windows 7 (32 and
64 bit), Windows 8, and Windows 10. The MT-X1S appears as three different devices to the PC
depending on which mode is selected by the button and jumper. These devices are the AVRISP mkII
compatible programmer, the DFU bootloader for firmware updates of the USB AVR, and the USB
CDC device (Virtual COM port) which is used for configuration mode and the USB Serial bridge.
Therefore, three drivers are required. The DFU driver is included with software available on the Atmel
website. The CDC driver is included with Windows, but requires an .inf file available on the
MattairTech website. The following table lists the minimum versions of the required software. If the
software provides a driver, is is listed as well. See the Firmware Updates section for installation of the
DFU bootloader driver.
Required Downloads
Soft are Version Driver URL
AVRISPmkII
Driver latest AVRISPmkII
driver
https://www.mattairtech.com/software/MattairTech_AVRISPmk
II_Driver_Signed.zip
CDC Driver latest CDC driver https://www.mattairtech.com/software/MattairTech_CDC_Driv
er_Signed.zip
AVR Studio /
Atmel Studio
4.19, 5.x,
6.x, 7.x
Old
AVRISPmkII
http://www.atmel.com/tools/atmelstudio.aspx OR
http://www.atmel.com/tools/studioarchive.aspx (AVR Studio)
Atmel Studio (AVR Studio) / AVRISP mkII driver
Atmel Studio is a free IDE provided by Atmel that runs on Windows operating systems. It
includes an assembler, debugger, simulator, and an AVR chip programming utility. As of April 2016,
there are 3 main versions supported, AVR Studio 5.x, and Atmel Studio 6.x and 7.x.
If installing Atmel Studio 7, the AVRISPmkII driver must now be downloaded separately (see
above). Extract the archive to any directory, then remove jumper JMP and plug in or reset the MT-X1S
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. Windows will prompt for
drivers, so direct the installer to the new directory. Prior versions of Atmel Studio bundled the AVRISP
mkII driver. In these cases, point the installer to “Program Files/Atmel/AVR Jungo USB” and select the
appropriate directory (usb32 or usb64). Do not use the driver in the AVR Tools/usb directory.
March 2, 2017 18 http://www.mattairtech.com/

MT-X1S Manual
WinAVR / AVRDUDE
WinAVR contains the GNU GCC compiler for C and C++, compiler tools, and libraries
(including AVR Libc). It also includes AVRDUDE for Windows, which is a command line tool for
transferring firmware to AVR microcontrollers. A graphical tool is included with AVR Studio. Download
WinAVR from http://sourceforge.net/projects/winavr/files/WinAVR/20100110/ and install it first. To use
AVRDUDE, you will need to download and install an update to libusb-win32 available at
http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/. Choose the libusb-win32-
devel-filter-x.x.x.x.exe file. Do this only after installing AVR Studio. You will also need to change the
MT-X1S AVRISP mkII Programmer host configuration to AVRDUDE. Note that WinAVR is outdated. It
is not recommended for newer devices like the XMEGA series. AVRDUDE can also be installed
separately.
March 2, 2017 19 http://www.mattairtech.com/

MT-X1S Manual
MT-X1S Driver / Serial Configuration
Next, the MT-X1S 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_Signe .zip. Note that
Windows Vista 64-bit, Windows 7 64-bit and Windows 8 require the signed driver. Now, plug in or
reset the MT-X1S with jumper JMP removed. This will run the USB-serial bridge. Both LEDs should be
lit. Windows will then prompt you for the MT-X1S CDC driver. Point the installer to the directory where
you downloaded the driver and install. Note that you may need to rename the driver in order for it to
show up in the installer. Windows may add the .txt extension to the file after downloading. Rename it
so that it ends with .inf. Ignore any warnings given by the installer (ie: unsigned driver). Once the
driver is loaded, the device will appear as the MT-X1S CDC device using a COM port in the device
manager. There is no need to configure serial port parameters. The buad rate, for example, is ignored.
The MT-X1S will always communicate with the computer at full speed (up to 2Mbps). If you
experience any buffering problems, for example, a delayed response to user input, then change both
buffer sizes to 1.
Terminal Emulator
Finally, the terminal emulator can be configured. Windows XP includes HyperTerminal, which
has been tested with the MT-X1S and will be documented here. There are several other terminal
emulators available freely on the Internet. If you wish to use any of them, it should be no trouble to
adapt the instructions presented here.
Next, start HyperTerminal. Create a new connection. You will refer to this connection again, so
give it an appropriate name (after it is configured, you can copy it to your desktop). Select the MT-X1S
COM port (ie: COM4) and continue. It is not necessary to configure the baud rate or any other serial
parameters. Now, click on the connect icon.
After connecting, you may see garbage on the terminal screen. If this is the case, click on the
configuration icon and change the emulation to ANSI (or ANSIW). The configuration mode requires an
ANSI terminal to allow drawing of the menu system. Normally, when first entering a mode that uses
the CDC driver, a message that reads “Press any Key” is printed periodically. If you do not see this
message, just press any key to continue. Note that it may not be possible to switch between modes
using the button until a key is pressed.
It is important to always click the disconnect icon before switching to the PDI programmer.
Then click the connect icon a couple seconds after returning. This is required because changing to the
AVRISP mkII driver unloads the CDC driver, then loads the AVRISP mkII driver. In order for the
terminal to use the same COM port as before, it must be disconnected when returning to the CDC
driver so that it does not assign a new COM port.
March 2, 2017 20 http://www.mattairtech.com/
Table of contents
Other MattairTech Motherboard manuals