µpad: Microprocessor for Academic Development Last Updated May 13, 2015
Figure 1: µpad Top Figure 2:µPAD Bottom
Table of Contents WARNING: READ BEFORE PROCEDING!... 4 Overview... Error! Bookmark not defined. On Board Features... 5 Smart Power Switching... 5 Indicators... 5 Power Indicators... 5 Status LED... 5 RGB Indicator... 5 External Power (EXP) Indicator... 5 USB Serial Indicators... 6 Real Time Clock Oscillator... 6 USB... 6 USB Serial... 6 Native USB... 6 Mezzanine Connectors... 6 Shield Connections... 9 Shield Connection Signals... 9 Electrical Characteristics... 11 µpad Power... 12 3.3V and 5.0V Supplies... 12 Precision Analog Reference... 12 Powering the µpad... 12 External Power Considerations... 12 Programming the µpad... 13 Interfacing with the USB to Serial Bridge... 13 Downloading the FTDI Device Driver... 13
WARNING: READ BEFORE PROCEDING! 1. It is possible to damage your µpad irreparably through the use of poor software. PORTB 0 and PORTB 1 pins serve special functions. PORTB 0 is the input for the precision 2.5V analog reference, and PORTB 1 is the Circuit GND reference input for differential analog measurements. If you set the direction register for PORTB pins 0 or 1 you risk destroying your board! Always use caution when using PORTB of the µpad s Xmega!!! 2. Use caution when connecting and disconnecting the programmer from J1 pictured in Figure 1. This connector can be sheared off the PCB if handled roughly. 3. Treat your Atmel ICE programmer s USB connector with the utmost care! The USB connector of these devices have proven weak, and can be broken off by the slightest rough handling. Do your best to not put strain or force your USB cable into the device!
On Board Features Smart Power Switching The µpad was designed to be powered in many different ways. The two primary methods are through the USB connector, or via an external power source. If both a USB and external power connection are provided, the external source is switched to automatically. There are three inlets for external power to the µpad. The board can be powered via the barrel jack J7 (pictured in Figure 1), the shield VIN connection, or the base connector s VIN signal. Therefore the µpad can be self-powered or receive power from an accessory shield or base. Indicators Power Indicators The µpad has LED indicators for each of the primary power sources 5V (D2) and 3.3V (D1). These LEDs should be lit when power is given to the µpad. Status LED The µpad features a general purpose status LED (D8) connected to the PORTH3 pin of the microcontroller. RGB Indicator The µpad features a super bright tri-color, Red Green and Blue (RGB) LED indicator (D5). RGB LEDs are special because they contain three discrete LEDs each of which a primary color of visible light. Through the use of PWM thousands of distinct colors can be created! Table 1: RGB LED Mapping Color Board Pin PWM Red PORTD 0 TCD0: CCA Green PORTD 1 TCD0: CCB TCD0: CCC or CCD (SW)* Blue PORTD 4 or TCD1: CCA *The Blue LED is not connected to a hardware PWM channel of TCD0. However through the use of two interrupts this functionality can be implemented. The use of a compare interrupt via CCC or CCD to toggle the LED signal, and a timer overflow interrupt to reset the pin to the initial pin state is recommended. External Power (EXP) Indicator When the µpad if fed an external power source the EXP LED (D4) will light to indicate the µpad is being powered externally as opposed to receiving USB power. The external power connection takes precedence over the USB connection. So if both sources are present the external source will be selected.
USB Serial Indicators The USB to serial bridge indicates whenever data is received or transmitted visually via RX (D6) and TX (D7) LEDs. TX in this context refers to data being sent from the µpad to a USB serial host, and vice versa for RX. Real Time Clock Oscillator The µpad has an external 32.768 KHz Real Time Clock (RTC) Oscillator. This frequency is significant due to the relationship of 32768 = 2 15. This means that a 15-bit counter fed a clock of this frequency will overflow precisely in 1 second intervals. USB The µpad has two distinct USB devices contained therein. There is a dedicated USB to serial bridge, and there is the native USB peripheral of the Xmega microcontroller. The USB switch featured on the µpad can be used to enable USB communication, as well as select between the two devices. Only one USB device can be used at a time. Table 2: USB Switch Mapping and Config Signal Name Xmega Pin Description USB_SW_EN PORTQ 1 USB_SW_SEL PORTQ 3 Low = Enabled High = Disabled LOW = USB Serial HIGH = USB Native USB Serial The µpad has a dedicated USB to serial bridge, a FT-230X. This device simply pipes UART data to and from USARTD0 over USB. Native USB Through the use of the Xmega s native USB peripheral the µpad can be made into many different USB devices. The µpad could become a mass storage device, a human interface device, a USB serial port etc. You are advised to consult the LUFA lib for inspiration. Mezzanine Connectors Table 3: Base Connector Signals Base Connector (J100) Pin Numbers Signal Name Function 1 PORTF 7 I/O,SCK,TXD1 2 PORTF 6 I/O.MISO,RXD1 3 PORTF 5 I/O,MOSI,XCK1,OC1B
4 PORTF 4 I/O, SS,OC1A 5 PORTF 3 I/O,TXD0,OC0D 6 PORTF 2 I/O,RXD0,OC0C 7 PORTF 1 I/O,SCL,XCK0,OC0B 8 PORTF 0 I/O,SDA,OC0A 9 PORTE 0 I/O,SDA, OC0ALS,OC0A 10 PORTE 1 I/O,SCL,XCK0,OC0AHS,OC0B 11 PORTE 2 I/O,RXD0, OC0BLS,OC0C 12 PORTE 3 I/O,TXD0,OCBHS,OC0D 13 PORTE 4 I/O, SS,OC1A, OC0CLS 14 PORTE 5 I/O,MOSI,XCK1,OC1B,OC0CHS 15 PORTE 6 I/O,MISO,RXD1, OC0DLS 16 PORTE 7 I/O,EVOUT, CLK PER, SCK,TXD1,OC0DHS 17 PORTB 2 I/O,DAC0,AC,ADC 18 PORTB 3 I/O,DAC1,AC,ADC 19 PORTB 4 I/O,TMS,AC,ADC 20 PORTB 5 I/O,TDI,AC,ADC 21 PORTB 6 I/O,TCK,AC,ADC 22 PORTB 7 I/O,TDO,AC,ADC 23 VIN Power In Connection 24 GND GND Connection 25 GND GND Connection 26 PORTK 7 I/O,ADD7,ADD15 1 27 PORTK 6 I/O,ADD6,ADD14 1 28 PORTK 5 I/O,ADD5,ADD13 1
29 PORTK 4 I/O,ADD4,ADD12 1 30 PORTK 3 I/O,ADD3,ADD11 1 31 PORTK 2 I/O,ADD2,ADD10 1 32 PORTK 1 I/O,ADD1,ADD9 1 33 PORTK 0 I/O,ADD0,ADD8 1 34 PORTJ 7 I/O,DATA7 35 PORTJ 6 I/O,DATA6 36 PORTJ 5 I/O,DATA5 37 PORTJ 4 I/O,DATA4 38 PORTJ 3 I/O,DATA3 39 PORTJ 2 I/O,DATA2 40 PORTJ 1 I/O,DATA1 41 PORTJ 0 I/O,DATA0 42 PORTH 7 I/O,CS3 43 PORTH 6 I/O,CS2 44 PORTH 5 I/O,CS1 45 PORTH 4 I/O,CS0 46 PORTH 2 I/O,ALE1 47 PORTH 1 I/O,RE 48 PORTH 0 I/O,WE 49 5V Power Out Connection 50 3.3V Power Out Connection 1) These signals utilize external circuitry based upon ALE (Address Latch Enable)
Shield Connections In addition to the base board mezzanine connection the µpad is designed to accept shields which are generally small scale application specific accessory boards Shield Connection Signals The µpad has four 8 pin shield sockets consisting of J2, J3, J4, and J5. J2 Signal Name Function 0 PORTA 0 I/O,AREF,AC,ADC 1 PORTA 1 I/O, AC,ADC 2 PORTA 2 I/O,DAC,AC,ADC 3 PORTA 3 I/O, DAC,AC,ADC 4 PORTA 4 I/O,AC,ADC 5 PORTA 5 I/O,AC,ADC 6 PORTA 6 I/O,AC,ADC 7 PORTA 7 I/O,AC,ADC J3 Signal Name Function 0 PORTC 0 I/O,SDA, OC0ALS,OC0A 1 PORTC 1 I/O,SCL,XCK0,OC0AHS,OC0B 2 PORTC 2 I/O,RXD0, OC0BLS,OC0C 3 PORTC 3 I/O,TXD0,OCBHS,OC0D 4 PORTC 4 I/O, SS,OC1A, OC0CLS 5 PORTC 5 I/O,MOSI,XCK1,OC1B,OC0CHS 6 PORTC 6 I/O,MISO,RXD1, OC0DLS 7 PORTC 7 I/O,EVOUT, CLK PER, SCK,TXD1,OC0DHS
J4 Signal Name Function 0 VIN Power In 1 5V Power Out 2 3.3V Power Out 3 RST Xmega Reset and PDI Signal 4 PDI PDI Signal 5 2.5V Reference Out 6 GND Power 7 GND Power J5 Signal Name Function 0 PORTF 0 I/O,SDA,OC0A 1 PORTF 1 I/O,SCL,XCK0,OC0B 2 PORTF 2 I/O,RXD0,OC0C 3 PORTF 3 I/O,TXD0,OC0D 4 PORTF 4 I/O,,OC1A 5 PORTF 5 I/O,MOSI,XCK1,OC1B 6 PORTF 6 I/O.MISO,RXD1 7 PORTF 7 I/O,SCK,TXD1
Electrical Characteristics Table 4: Absolute Maximum Ratings Item Min Nom Max Unit VIN 5.5 V If the VIN receives a power signal beyond this value failures of the µpad s components will occur Table 5: General Characteristics Item Min Nom Max Unit 3.3V Tolerance 3.201 3.3 3.399 V 5.0V Tolerance 4.85 5.0 5.15 V 2.5V Ref Tolerance 2.490 2.50 2.510 V VIN Range 3.1 5.0 V 2.5V Rail Current 1 15 ma 3.3V Rail Current 300 ma 5.0V Current 275 ma µpad Idle current 25 ma RTC Crystal Frequency -30 30 ppm 1) It is not recommended to power external circuits using the 2.5V reference.
µpad Power The µpad has an involved network of power supplies that serve several purposes 3.3V and 5.0V Supplies The primary system supplies of the µpad are the 3.3V and 5.0V rails. These voltage rails are sourced by buckboost switching regulators. Buck boost meaning that these supplies are able to create their desired voltage outputs when the voltage input to the regulators is either above or below the intended output(s). This principle is why the µpad can be powered externally by power sources between 3.1 and 5.0V. Such a range allows for power sources such as 3.7V lithium batteries, USB cables, 3x alkaline batteries etc. Precision Analog Reference The µpad has an external 2.5V precision reference for use with analog applications, such as the on board ADCs and DACs. This reference is also accessible via the J4 Shield connector. Powering external circuits with this supply is not recommended, since the current sourcing capabilities of the 2.5V reference is very small. Powering the µpad The µpad is designed to be powered via USB and external sources. As for the external sources there are 3 VIN connections present on the board. The first is J7, the barrel jack pictured in Figure 1. The jack is wired center positive, and it accepts 2.1mm ID by 5.5mm OD plugs. The second VIN connection of the µpad is found on J4 pictured in Figure 1. This connection allows shields to power the µpad. The last VIN connection is on the base connector. This connection allows µpad bases to power the µpad. The µpad features smart and hot swappable power switching between supplies. Whenever an external source is connected it will automatically be selected as the preferred power input. Therefore if the system were running on USB power, the board would automatically switch over to external power when an external source was connected. The EXP LED (D4) will light to indicate when the external source has been selected. External Power Considerations Since the µpad accepts VIN signals from the on-board barrel jack, shields and bases it is important to ensure no more than one device is sourcing the VIN signal. Failure to do so could cause the µpad to be damaged.
Programming the µpad The µpad is designed to be programmed and debugged using the PDI protocol. The program header of the µpad is J1, and can be viewed in Figure 1. Notice that there is a white dot next to this connector. This dot designates pin one on the program header. When connecting a programmer such as the Atmel Ice, pin 1 of the connector, indicated by a red wire, should be positioned next to the dot. Take care when programming the µpad that the program header does not get pulled or otherwise stressed in the process. Since the connector is surface mount it is possible to tear the connections off the PCB. Interfacing with the USB to Serial Bridge In order to use the USB to Serial Bridge from FTDI it is necessary to first obtain drivers for the device. You will also need a PC terminal program to use. X-CTU Legacy serves this purpose well. Downloading the FTDI Device Driver To obtain the device drivers for your FTDI device follow this link. Once downloaded your system will be able to recognize the FTDI device as a com port. Use your device manager in order to determine what com port has been assigned to your device.