background image

 

MT­X1                                     Manual

June 2, 2015

1

http://www.mattairtech.com/

Summary of Contents for MT-X1

Page 1: ...MT X1 Manual June 2 2015 1 http www mattairtech com ...

Page 2: ...ference 11 Temperature Sensor 12 8 channel Lowside Relay Driver 12 Windows Installation 13 Atmel Studio AVR Studio AVRISP mkII driver 13 WinAVR AVRDUDE 14 MT X1 Driver Serial Configuration 15 Terminal Emulator 15 Linux Installation 16 AVRISP mkII Compatible PDI Programmer 17 Using Atmel Studio AVR Studio 17 Using AVRDUDE 21 Serial Bridge 22 Configuration 24 XMEGA Demo Program 25 Firmware Updates 2...

Page 3: ...onnected 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 Additionally an Atmel Studio 6 ASF template is provided All software used on both the XMEGA and USB AVR is open source MT X1 Features Atmel XMEGA 128A1 chip rev H 128KB flash 8KB R...

Page 4: ...ftware Framework template to get started quickly Preloaded demo program demonstrates onboard peripheral devices as well as sleep mode PCB measures 10cm x 5cm Compatible with Windows XP Vista 7 8 and Linux All firmware is open source MIT license Uses LUFA USB library and AVRISP mkII clone by Dean Camera http www fourwalledcubicle com ATxmega128a1 Features High performance Low power 8 16 bit AVR XME...

Page 5: ...s on all General Purpose I O pins Watchdog Timer with Separate On chip Ultra Low Power Oscillator Special Microcontroller Features Power on Reset and Programmable Brown out Detection Internal and External Clock Options with PLL and Prescaler Programmable Multi level Interrupt Controller Sleep Modes Idle Power down Standby Power save Ext Stby Advanced Programming Test and Debugging Interfaces JTAG ...

Page 6: ...CK 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...

Page 7: ...heeling 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 Heade...

Page 8: ... 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 Additionally R1 can be connected to the USB AVR 8MHz clock out...

Page 9: ...ween 3 3V and Gnd to ensure that this requirement is met A MicroSD card inserted may consume enough to meet the specification without the resistor 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 ne...

Page 10: ...re 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 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 d...

Page 11: ...ion 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 ...

Page 12: ...nnected 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 inpu...

Page 13: ...AVRSTUDIO4 aspx OR http www atmel com tools ATMELAVRSTUDIO aspx MT X1 Driver latest CDC driver https www mattairtech com software MattairTech_CDC_Driv er_Signed zip Atmel Studio AVR Studio AVRISP mkII driver Atmel Studio formerly AVR 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 Ju...

Page 14: ...nAVR 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 an...

Page 15: ...ulator can be configured Windows XP includes HyperTerminal which has been tested with the MT X1 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 a...

Page 16: ...NphpBB2 file viewtopic t 42631 All firmware written for the MT X1S is developed under Linux using this toolchain Drivers TODO drivers should already be installed GCC Toolchain TODO see opening paragraph AVRDUDE TODO ie avrdude p x128a1 c avrisp2 P usb U flash w myfirmware hex dfu programmer TODO must use version 0 5 2 or higher Terminal Emulator TODO can use minicom config port ie dev tty ACM0 sav...

Page 17: ... project An example project which can be used as a template is available for the MT X1 at http www mattairtech com software MT X1 MT X1_Simple_Demo zip To install click File Import Project Template Once installed open the template by clicking File New Project and selecting the MT X1_Simple_Demo Once loaded you can read the main source file Also have a look at the src config and src asf xmega board...

Page 18: ... 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 It should match the device if all is well It is recommended to always perform this step first to verify the connection The target voltage will always read 3 3V Jun...

Page 19: ...gets flash memory Load your hex file then click Program The hex file for the MT X1_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 June 2 2015 19 http www mattairtech com ...

Page 20: ...d 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 Note that any firmware upgrade feature should not be used The MT X1 PDI Programmer is not an actual AVRISP mkII it just emulates one so you should not attempt to update the MT X1 firmware using Atmel Studio Any firmware updates will be posted to the...

Page 21: ...MT X1 Manual Using AVRDUDE TODO ie avrdude p x128a1 c avrisp2 P usb U flash w myfirmware hex June 2 2015 21 http www mattairtech com ...

Page 22: ...nd the XMEGA use these settings Note that when configuring the speed to be manual it is possible to set the speed higher than 2MHz but the maximum speed supported by the USB link is 2MHz The serial bridge is configured in configuration mode jumper on button not pressed Serial Bridge Configuration Options Configuration Option Possible Values Speed 2M 1M 500K 250K 125K 76 8K 57 6K 38 4K 19 2K 9600 2...

Page 23: ...ster Value Manual Speed Async 1X Async 2X Synchronous UBRR fosc 16 BAUD 1 UBRR fosc 8 BAUD 1 UBRR fosc 2 BAUD 1 BAUD fosc 16 UBRR 1 BAUD fosc 8 UBRR 1 BAUD fosc 2 UBRR 1 where fosc 8000000 June 2 2015 23 http www mattairtech com ...

Page 24: ...r Standby Ready Signal USB ready signal is open drain active low on XCK pin from USB AVR Disabled or Enabled AVRISPmkII select which software will be interfacing with the MT X1 PDI programmer AVR Studio or AVRDUDE Credits displays list of firmware authors The USB AVR automatically enters sleep mode when the USB cable is disconnected or the USB bus is suspended Sleep mode is by default set to Power...

Page 25: ...he SD card and play them over an 8 ohm speaker connected to the audio amplifier You will need to use an audio program like sox to encode music or sound to 8 bit or 16 bit recommended 44 1KHz or less mono uncompressed PCM Then in the audio demo select the file chooser and pick a file You can use the slider to adjust volume When using the sleep demo current measurements can be made using the externa...

Page 26: ...ersion Driver URL MT X1 Firmware latest At90USB162 N A http www mattairtech com software MT X1 MT_X1 hex FLIP 3 4 2 DFU driver http www atmel com tools FLIP aspx Signed DFU Driver latest DFU driver http www avrfreaks net index php module Freaks 20Academy func viewItem item_type project item_id 219 6 Once FLIP is installed the DFU bootloader driver can be loaded Plug in the MT X1 with jumper JMP in...

Page 27: ...out the AT90USB162 Click on the File menu and open the appropriate hex file More information will appear about the program Be sure that erase is checked The MT X1 firmware cannot be loaded unless the flash is erased first Program must be checked Verify should also be checked Now click on the Run button in the lower left of the screen and the firmware will be quickly loaded onto the MT X1 If you en...

Page 28: ...t 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 dfu programmer TODO Must erase chip first Cannot read flash dfu programmer at90usb162 erase dfu programmer at90usb162 flash eeprom MT_X1 eep if applicable dfu programmer at90usb162 flash MT_X1 he...

Page 29: ...ps www olimex com forum index php topic 4188 0 Support Information 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 ...

Page 30: ...MT X1 Manual Schematic Schematic June 2 2015 30 http www mattairtech com ...

Page 31: ...ted MattairTech LLC supplied this development product AS IS without any warranties with all faults at the buyer s and further users sole risk The user assumes all responsibility and liability for proper and safe handling of the goods Further the user indemnifies MattairTech LLC from all claims arising from the handling or use of the goods Due to the open construction of the product it is the user ...

Page 32: ... that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific written prior permission The author disclaim all warranties with regard to this software including all implied warranties of merchantability and fitness In no event shall the author be liable for any special indirect or consequential damages or any damages whatsoever res...

Page 33: ...ling 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 June 2 2015 33 http www mattairtech com ...

Reviews: