background image

MT-DB-U4

User Guide

Appendix B: Other MattairTech Products

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

4­channel Logic Analyzer

Serial bridge / pattern generator / SPI interface

GPIO / PWM / frequency input & output

Atmel Studio / AVRDUDE support

Target board voltage of 2V to 5.5V via level­shifted 
pins on two main headers

MT­DB­U6  USB AVR development board

AT90USB646 / AT90USB1286 USB AVR

64KB/128KB FLASH, 4KB/8KB SRAM

5V, 500mA LDO regulator (3V­30V input)

Auto power source selection IC (USB/External)

16MHz and 32.768KHz crystals

Arduino compatible

CDC or DFU bootloader

MT­DB­X4  USB AVR XMEGA board

ATxmega128A4U USB XMEGA AVR

128KB FLASH, 8KB SRAM, 2KB EEPROM

3.3V LDO regulator (low quiescent current)

16MHz and 32.768KHz crystals

LED, boot jumper, PDI header

Reset button, mounting holes

USB DFU bootloader preinstalled

MT­D21E USB ARM Cortex M0+ board

ATSAMD21E17A or ATSAMD21E18A (32­pin)

128KB/256KB FLASH, 16KB/32KB SRAM

Onboard 3.3V, 250mA LDO regulator (2uA quiescent)

16MHz and 32.768KHz crystals

USB connector (power by USB or external up to 15V)

Blue LED, 10­pin Cortex header, 2 buttons, I2C 
pullups

USB Mass Storage Bootloader (no programmer 
required)

December 30, 2015

38

http://www.mattairtech.com/

Summary of Contents for MT-DB-U4

Page 1: ...MT DB U4 User Guide December 30 2015 1 http www mattairtech com ...

Page 2: ...ew 13 Summary 13 Special Notes 14 Pin Configurations 14 MT DB U6 AT90USB64 AT90USB128 15 MT DB U4 ATmega32U4 16 MT DB U1 MT DB U2 AT90USB162 ATmega32U2 16 Pin Capabilities 17 Using Arduino with MattairTech USB boards 18 Serial Monitor 18 Updated Tone cpp 18 Detailed Memory Usage Output After Compilation 19 USB Technical Notes 19 Installation 20 Driver Installation 20 Windows 20 Linux 21 OS X 21 AV...

Page 3: ...erial Driver 25 CDC Bootloader 25 DFU Bootloader FLIP dfu programmer 28 FLIP 29 dfu programmer 31 Running Bitlash Demo 32 Schematic 34 Fuse and Lock Settings 35 Troubleshooting FAQ 35 Support Information 35 Legal 36 Appendix A Precautions 37 Appendix B Other MattairTech Products 38 December 30 2015 3 http www mattairtech com ...

Page 4: ...B connectors The PCB is high quality with ENIG gold plated finish red soldermask and white screenprinting showing the pinout and Arduino pin numbering There are two 3mm mounting holes 5mm pad It measures approximately 2 1 x 0 9 52mm x 23mm and is 0 062 1 6mm thick MT DB U4 Features ATmega32U4 USB microcontroller 32KB FLASH 2 5KB SRAM 1KB EEPROM 12 10 bit ADC channels 1 used by LED which can be dis...

Page 5: ...rol Transfers up to 64 bytes 6 Programmable Endpoints with IN or Out Directions and with Bulk Interrupt or Isochronous Transfers Configurable Endpoints size up to 256 bytes in double bank mode Fully independent 832 bytes USB DPRAM for endpoint memory allocation Suspend Resume Interrupts CPU Reset possible on USB Bus Reset detection 48 MHz from PLL for Full speed Bus Operation USB Bus Connection Di...

Page 6: ...p Modes Idle ADC Noise Reduction Power save Power down Standby and Extended Standby I O and Packages All I O combine CMOS outputs and LVTTL inputs 26 Programmable I O Lines 44 lead TQFP Package 10x10mm 44 lead QFN Package 7x7mm Operating Voltages 2 7 5 5V Operating temperature Industrial 40 C to 85 C Maximum Frequency 8 MHz at 2 7V Industrial range 16 MHz at 4 5V Industrial range December 30 2015 ...

Page 7: ...MT DB U4 User Guide December 30 2015 7 http www mattairtech com ...

Page 8: ...dds two 3mm 5mm pad mounting holes adds a solder jumper to allow disconnection of the LED from pin D7 adds solder jumpers to allow connection of the xtal traces to two main header pins adds Arduino pin numbering to the screen printing and makes other various changes to improve the manufacturing process Revision A Revision B current December 30 2015 8 http www mattairtech com ...

Page 9: ...cted to the HWB jumper The jumper is connected to ground through a 240 ohm resistor The pin is sampled after all reset sources including power up If the pin is low HWB jumper installed then the bootloader is run If the pin is high HWB jumper removed then the user application is run This pin functions as a normal GPIO pin at all other times The 240 ohm resistor provides short circuit protection in ...

Page 10: ... the DFU bootloader then you can command FLIP or dfu programmer to jump to the application Then when running the application the reset button can be pressed to re enter the bootloader This is useful when writing and debugging firmware When the firmware is complete the jumper can be removed so that future resets will always run the application ISP Header The ISP header is configured by default to a...

Page 11: ...in software When using the Atmel DFU bootloader option JTAG will always be enabled It will then have to be disabled in software or by fuse setting to enable access to the four ADC channels Mounting Holes There are two grounded mounting holes They have a hole diameter of 3mm and the pad is 4 8mm Each one is located 6 2mm from the closest long edge of the board The hole nearest the USB connector is ...

Page 12: ... 6V to both the Vcc pin and the 3 3V pin which are now both inputs Alternatively the solder jumper J1 can be set to the 3 3V position so that only the Vcc pin need be connected Note that unlike the AT90USBXX2 or ATmegaXXU2 the internal 3 3V regulator cannot be used to power Vcc because the regulator is disabled on reset or power up Also note that if the bootloader is set to run HWB jumper installe...

Page 13: ...g between CDC and CDC HID will require re selecting the COM port More detailed memory usage at end of compilation see below Merged in upstream updates Summary Feature MT DB U6 MT DB U4 MT DB U2 MT DB U1 Microcontroller AT90USB64 AT90US B128 8 Bit AVR ATmega32U4 8 Bit AVR ATmega32U2 8 Bit AVR AT90USB162 8 Bit AVR Clock Speed 16 MHz 16 MHz 16 MHz 16 MHz Flash Memory 128 KB AT90USB128 64 KB AT90USB64...

Page 14: ...or Windows This may become automatic in a future release Include platform specific libraries You may need to manually include platform specific libraries such as SPI h Wire h and HID h EXCEPTION_FOR_57600 The MattairTech ArduinoCore avr uses a more accurate baud rate for 57600 than the stock arduino When using the USART to communicate with another Arduino define EXCEPTION_FOR_57600 New interrupt m...

Page 15: ... F4 O B6 25 25 TC1B 14 ADC3 14 F3 O O B5 24 24 TC1A 15 ADC2 15 F2 PWR IN B4 23 23 TC2A 16 ADC1 16 F1 B3 22 MISO 17 ADC0 17 F0 O O B2 21 MOSI 18 INT6 18 E6 O O B1 20 SCLK Aref O O B0 19 SS Vbus ISP 3 3V D _____ Vcc D 5V Gnd USB Gnd Pins 38 45 are on the PORT A header Pins 46 and 47 are the RTC crystal pins E4 and E5 in use by the RTC by default With RTC crystal removed there are 2 additional digita...

Page 16: ...D _____ Vcc D 5V Gnd USB Gnd Because of the unusual layout of the ATmega32U4 all pins can be used with analogRead 12 of these pins are actual analog inputs 1 used by LED the rest connect to the internal reference internal temperature sensor or ground MT DB U1 MT DB U2 AT90USB162 ATmega32U2 MattairTech MT DB U1 MT DB U2 AT90USB162 ATmega32U2 Comm Interrupt PWM Digital Digital Interrupt PWM Comm oth...

Page 17: ...ins can be configured with external interrupts 6 pins MT DB U6 5 pins MT DB U4 or 8 pins MT DB U2 MT DB U1 Available using the attachInterrupt function Serial 1 pair of pins can be configured for TTL serial I O MT DB U6 Serial1 pin 31 RX and pin 32 TX MT DB U4 Serial1 pin 20 RX and pin 21 TX MT DB U2 MT DB U1 Serial1 pin 15 RX and pin 16 TX SPI 3 or 4 pins can be configured for SPI I O SPI MT DB U...

Page 18: ...D2 2 There are several libraries included with Arduino Some of these need simple changes to work with MattairTech boards Usually only pin mappings need to be changed Serial Monitor To print to the Serial Monitor over USB use Serial Serial points to SerialUSB Serial1 is a UART Unlike most Arduino boards ie Uno USB AVR based boards do not automatically reset when the serial monitor is opened To see ...

Page 19: ...t is the output from the nm utility The values on the left are in bytes The letters stand for T t text D d data B b bss and everything else ie W resides in flash in most cases USB Technical Notes Note that USB CDC is required for auto reset into the bootloader to work otherwise manually press reset with jumper installed ATmegaxxU4 832 bytes DPRAM 1 control 64 byte max 1 two banks 256 byte max 5 tw...

Page 20: ...four USB composite device combinations that include CDC as well as a CDC only device Each supported combination has a unique USB VID PID pair and these are listed in the inf file Once the first device is installed the CDC only device future installations might be automatic otherwise you may direct the installer to the same inf file The drivers are signed and support both 32 and 64 bit versions of ...

Page 21: ...p as Not Configured but it will work fine 3 Continue with AVR Core Installation below AVR Core Installation To update from a previous version click on MattairTech AVR Boards in Boards Manager then click Update 1 The MattairTech AVR Core requires Arduino 1 6 7 2 In the Arduino IDE 1 6 7 click File Preferences 3 Click the button next to Additional Boards Manager URLs 4 Add https www mattairtech com ...

Page 22: ... Arduino auto reset or when the FLASH is empty Even with the jumper installed programming mode will NOT be entered if the reset was from the watchdog timer unless the boot key is enabled and the key matches as is the case with Arduino auto reset the Arduino core uses a watchdog reset to enter the bootloader The default CDC bootloader has the following compile time options defined define ENABLE_LED...

Page 23: ... like dev ttyACM0 2 See http www nongnu org avrdude user manual avrdude_4 html for details 3 Press the reset button with the jumper off to load the sketch 4 When using AVRDUDE standalone the jumper must be installed before pressing reset to run the bootloader Possible Future Additions Features for lower power consumption MSC Mass Storage USB Device Class Host mode CDC Better OS X support PCINT sup...

Page 24: ... c 2015 Arduino LLC All right reserved This library is free software you can redistribute it and or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation either version 2 1 of the License or at your option any later version This library is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warra...

Page 25: ...onment or directly with AVRDUDE Version 130410 or above is required to support the auto reset feature note that several boards that were shipped before 130626 still have the old bootloader If using a terminal emulator you must first disconnect before running the bootloader The bootloader enters programming mode only if the jumper is installed even when using Arduino auto reset The one exception is...

Page 26: ...s required to support the auto reset feature Note that several boards that were shipped after 130410 but before 130626 still have the old bootloader It is strongly recommended to use version 140502 or higher when using with Arduino The default CDC bootloader has the following compile time options defined define NO_LOCK_BYTE_WRITE_SUPPORT define ENABLE_LED_BOOT define ENABLE_LED_APPLICATION define ...

Page 27: ...t toward the actual bootloader directory Change it back to caterina when finished to re enable auto reset Example for Windows avrdude p m32u4 c avr109 P COM5 U flash w bitlashdemo_MT DB U4 hex Example for Linux avrdude p m32u4 c avr109 P dev ttyACM0 U flash w bitlashdemo_MT DB U4 hex Arduino environment Be sure to select the COM port Then upload your sketch with the Upload button December 30 2015 ...

Page 28: ...rd refers to the jumper function not to the actual AVR pin Also note that if you selected the Atmel DFU bootloader instead of the standard LUFA DFU bootloader you will need to add an external pullup resistor to pin E2 ie a 10Kohm resistor between E2 and Vcc and it must remain installed at all times Then connect the board to your computer via USB Because the HWB jumper is installed the bootloader w...

Page 29: ...cap onto the two pins marked HWB Then connect the board to your computer via USB The LED should be pulsing unless using the Atmel bootloader Now launch the FLIP utility Click on the chip icon far left and select the Atmega32U4 December 30 2015 29 http www mattairtech com ...

Page 30: ...river install wizard to the Program Files Atmel Flip 3 4 7 usb folder Once the driver is installed go back to step 1 Click on the File menu and open the appropriate hex file More information will appear about the program All four check boxes should be checked Be sure that erase is checked The firmware cannot be loaded unless the flash is erased first Now click on the Run button in the lower left o...

Page 31: ...ting power cycling Initiate reset by unchecking the reset box and pressing the Start Application button lower right Or simply press the reset button The firmware that was just loaded will now run dfu programmer dfu programmer is a command line utility used to program the ATmega32U4 that runs under Linux A DFU driver installation is not required Download version 0 5 4 or higher from http dfu progra...

Page 32: ...bitlash net type HELP 1706 bytes free print free bytes free 1702 bytes free pinMode 25 1 d25 1 x 255 d 0 function brighter if x 255 d 0 else a25 x snooze 2 saved function dimmer if x 0 d 1 else a25 x snooze 2 saved function pulseLED if d 0 dimmer else brighter saved ls function brighter if x 255 d 0 else a25 x snooze 2 function dimmer if x 0 d 1 else a25 x snooze 2 function pulseled if d 0 dimmer ...

Page 33: ...many examples that can be easily compiled for the ATmega32U4 See the CDC Bootloader section for details on installing the CDC Serial driver The old demo requires an ANSI terminal to allow drawing of the menu system If you see garbage on the terminal screen click on the configuration icon and change the emulation to ANSI or ANSIW After connecting a message that reads Press any Key is printed period...

Page 34: ...MT DB U4 User Guide Schematic Schematic December 30 2015 34 http www mattairtech com ...

Page 35: ...as the non RC variant The solder jumper J1 can become unsoldered when attaching headers 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 th...

Page 36: ...NSTRATION OR EVALUATION PURPOSES ONLY It is not a finished product and may not yet comply with some or any technical or legal requirements that are applicable to finished products including without limitation directives regarding electromagnetic compatibility recycling WEEE FCC CE or UL except as may be otherwise noted on the board kit MattairTech LLC supplied this board kit AS IS without any warr...

Page 37: ...d from Vbus However it is possible to supply an externally regulated voltage on the 3 3V 5V and or Vcc pins When doing this care must be taken to limit inrush current on these pins due to the low ESR of the ceramic capacitors Failure to do so may cause damaging inductive voltage spikes due to any wire inductance ie benchtop power supply leads Inrush current is normally controlled by the PTC fuse w...

Page 38: ...4KB 8KB SRAM 5V 500mA LDO regulator 3V 30V input Auto power source selection IC USB External 16MHz and 32 768KHz crystals Arduino compatible CDC or DFU bootloader MT DB X4 USB AVR XMEGA board ATxmega128A4U USB XMEGA AVR 128KB FLASH 8KB SRAM 2KB EEPROM 3 3V LDO regulator low quiescent current 16MHz and 32 768KHz crystals LED boot jumper PDI header Reset button mounting holes USB DFU bootloader prei...

Reviews: