* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download µPAD Proto Base Manual 1773KB May 14 2015 09:31:12 AM
Survey
Document related concepts
Transcript
µPAD: Proto Base Manual Last Updated May 13, 2015 Electronics and Robotics LLC ootbrobotics.com Table of Contents WARNING: READ BEFORE PROCEDING! ...................................................................................................... 7 Overview ..................................................................................................................... Error! Bookmark not defined. µPAD Base Connection .......................................................................................................................................... 8 Analog ..................................................................................................................................................................... 8 Amplifier Circuit .................................................................................................................................................. 8 Amplifier Calculations ..................................................................................................................................... 9 Analog/PORTB Selector(s) ................................................................................................................................. 10 Single ended vs. Differential ............................................................................................................................... 10 Single Ended Conversion Considerations ........................................................................................................... 10 PORTB ADC Pin Mapping ................................................................................................................................. 11 Xmega Digital Pins ............................................................................................................................................... 12 CPLD .................................................................................................................................................................... 15 CPLD/MCU Selectors ........................................................................................................................................ 16 Breadboard Area .................................................................................................................................................. 16 Keyboard Area ..................................................................................................................................................... 17 LCD Interface ....................................................................................................................................................... 17 Electronics and Robotics LLC ootbrobotics.com Figure 1: Board Top Un-Assembled Electronics and Robotics LLC ootbrobotics.com Figure 2: Board Top Fully Assembled Electronics and Robotics LLC ootbrobotics.com Figure 3: Bottom Board Fully Assembled Electronics and Robotics LLC ootbrobotics.com Figure 4: µPAD Top Electronics and Robotics LLC Figure 5: µPAD Bottom ootbrobotics.com 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 µPAD from the µPAD Proto Base J2 pictured in Figure 1. This connector can be sheared off the PCB if handled roughly. Electronics and Robotics LLC ootbrobotics.com µPAD Base Connection The µPAD Proto Base connects directly to the µPAD through connector J2 which can be seen in Figure 1. All electrical signals from the µPAD to the µPAD Proto Base pass through this connection. Analog The µPAD Proto Base has an external analog front end circuit which allows the µPAD to read signals between 0 to 5V, when using the µPADβs precision 2.5V external reference. Amplifier Circuit The following circuit displayed in Figure 4 is the analog front end for ADC input 4 of PORTB. Figure 4: Analog Front End Electronics and Robotics LLC ootbrobotics.com Amplifier Calculations The following calculations assumes an ideal op-amp Assumption: Vi+ = ViGiven: ADC4 = VIN AFE4 = VOUT Equations: ππ+ = πππ β π 9 500 πππ = πππ β = π 11 + π 9 1500 3 πππ’π‘ β ππ+ ππ+ β 0 = π 5 π 7 πππ’π‘ β ππ+ ππ+ β 0 = 500 1000 πππ’π‘ β ππ+ ππ+ β 0 = 1 2 πππ’π‘ = 3ππ+ 2 With a substitution of Vi+ πππ’π‘ = 3 πππ β 2 3 The end relationship is thenβ¦ πππ’π‘ = πππ 2 Note: The amplifier circuit(s) utilizes 1% resistors throughout Electronics and Robotics LLC ootbrobotics.com Analog/PORTB Selector(s) The Analog/PORTB selector(s) can be found in the upper right corner of Figure 3. This group of 4 selectors is used to control whether PORTB pins 4-7 are connected to their respective analog front end circuits, or their respective PORTB breakout connections in J9 pictured in Figure 2. Each pin 4-7 can be individually configured per its respective selector. In Figure 3 all pins, 4-7, are connected to their respective analog front end circuit. Single ended vs. Differential Analog to Digital Converters are devices that convert a voltages to numeric values that a processor can use for calculations etc. There are two kinds of ADCs differential and single ended. Voltage inherently is a differential measurement. It is the electric potential difference of two nodes, which in this context are referred to as the positive and negative inputs. In the case off single ended converters the negative input of the ADC is internally connected to circuit GND. Differential converters however have a dedicated negative input in addition to a positive one. Differential converters are particularly useful when measuring voltages independent or circuit GND. The µPADβs Xmega is capable of taking both single ended and differential measurements. However differential type measurements yield more accurate results. For this reason the µPAD was designed with a solder jumper SJ1, visible in Figure 5, to measure circuit GND directly with the Xmega pin PORTB 1. If you wish to take differential measurements you should solder the pads of SJ1 together. The µPAD will need to be removed from the µPAD Proto Base to solder this jumper. Single ended conversions can be taken with or without soldering the SJ1 jumper. Single Ended Conversion Considerations The µPADβs Xmega is inaccurate at measuring circuit GND internally, which is why the differential interface is more accurate. That being said if single ended measurements are to be performed signed conversions are recommended again for accuracy. When using singed vs. unsigned measurements the top bit of the ADC conversion is used to indicate the measured voltage as positive or negative. Simply put signed mode measurements, though more accurate, have half the resolution of unsigned measurements. Electronics and Robotics LLC ootbrobotics.com PORTB ADC Pin Mapping Table 1 below displays the pin mapping used for various types of conversions with the Xmega ADC. It is important to note that differential measurements without gain and differential measurements with gain have positive and negative inputs flipped. In particular measurements taken with gain will be return negative values. This physical limitation can be easily adjusted for in software. Table 1: ADC Pin Mapping PORTB Pin Single Ended Pin Function DIFF Pin Function DIFF GAIN Pin Function 0 AREF AREF AREF 1 - ADC1 NEG (GND REF ) ADC1 POS (GND REF) 2 - - - 3 - - - 4 - ADC4 POS ADC4 NEG 5 - ADC5 POS ADC5 NEG 6 - ADC6 POS ADC6 NEG 7 - ADC7 POS ADC7 NEG Electronics and Robotics LLC ootbrobotics.com Xmega Digital Pins The µPAD has several Digital pins serving various purposes. The following table describes these pins and their functions. Reference Figure 2 for the reference designators. Table 2: Digital Pin Mapping Reference Designator Pin Number Signal Name Function J5 0 PORTF 7 GPIO J5 1 PORTF 6 GPIO J5 2 PORTF 5 GPIO J5 3 PORTF 4 GPIO J5 4 PORTF 3 GPIO J5 5 PORTF 2 GPIO J5 6 PORTF 1 GPIO J5 7 PORTF 0 GPIO J6 0 ADDR 82 EBI ADDR J6 1 ADDR 92 EBI ADDR J6 2 ADDR 102 EBI ADDR J6 3 ADDR 112 EBI ADDR J6 4 ADDR 122 EBI ADDR J6 5 ADDR 132 EBI ADDR J6 6 ADDR 142 EBI ADDR J6 7 ADDR 152 EBI ADDR J7 0 GND Power J7 1 WE GPIO,EBI CTRL Electronics and Robotics LLC ootbrobotics.com J7 2 RE GPIO,EBI CTRL J7 3 ALE GPIO,EBI CTRL J7 4 CS0 GPIO,EBI CTRL J7 5 CS1 GPIO,EBI CTRL J7 6 CS2 GPIO,EBI CTRL J7 7 CS3 GPIO,EBI CTRL J9 0 3.3V Power J9 1 PORTB 2 GPIO, DAC J9 2 PORTB 3 GPIO, DAC J9 3 PORTB 41 GPIO J9 4 PORTB 51 GPIO J9 5 PORTB 61 GPIO J9 6 PORTB 71 GPIO J9 7 GND Power J10 0 PORTE 0 GPIO J10 1 PORTE 1 GPIO J10 2 PORTE 2 GPIO J10 3 PORTE 3 GPIO J10 4 PORTE 4 GPIO J10 5 PORTE 5 GPIO J10 6 PORTE 6 GPIO J10 7 PORTE 7 GPIO J11 0 ADDR 0 GPIO,EBI ADDR Electronics and Robotics LLC ootbrobotics.com J11 1 ADDR 1 GPIO,EBI ADDR J11 2 ADDR 2 GPIO,EBI ADDR J11 3 ADDR 3 GPIO,EBI ADDR J11 4 ADDR 4 GPIO,EBI ADDR J11 5 ADDR 5 GPIO,EBI ADDR J11 6 ADDR 6 GPIO,EBI ADDR J11 7 ADDR 7 GPIO,EBI ADDR J12 0 DATA 0 GPIO,EBI DATA J12 1 DATA 1 GPIO,EBI DATA J12 2 DATA 2 GPIO,EBI DATA J12 3 DATA 3 GPIO,EBI DATA J12 4 DATA 4 GPIO,EBI DATA J12 5 DATA 5 GPIO,EBI DATA J12 6 DATA 6 GPIO,EBI DATA J12 7 DATA 7 GPIO,EBI DATA 1) These pins must be selected as digital pins using the PORTB/Analog selector(s) 2) These are latched address signals. Electronics and Robotics LLC ootbrobotics.com CPLD The µPAD Proto Board contains a 44 pin PLCC socket (U2) intended for a MAX 3000 series CPLD. This socket can be viewed in Figure 2. Through this device logic such as memory mapping can be implemented. Table 3: CPLD GPIO Signal Mapping Reference Designator Header pin CPLD Pin J8 1 24 J8 2 26 J8 3 29 J8 4 34 J8 5 37 J8 6 39 J8 7 GCLK1 J8 8 5 J13 1 27 J13 2 28 J13 3 31 J13 4 33 J13 5 41 J13 6 40 J13 7 GCLK2 J13 8 4 Electronics and Robotics LLC ootbrobotics.com CPLD/MCU Selectors J3 is used to bridge significant signals of the Xmegaβs External Bus Interface (EBI) over to the CPLD for performing address decoding. Table 4: MCU/CPLD Selector Mapping Signal Name CPLD Pin ADDR 15 8 ADDR 14 6 ADDR 13 9 ADDR 12 11 CS3 12 CS2 14 CS1 16 CS0 19 ALE 18 RE 21 WE 20 Breadboard Area The breadboard area of the µPAD Proto Base is designed for use with DIP and other through whole components. The breadboard area is displayed at the bottom of Figure 2. Vertical dashes in the silk screen denote shorts between holes. Electronics and Robotics LLC ootbrobotics.com Keyboard Area The µPAD Proto Base was designed to connect to a keypad breakout board via a 2x5 pin cable. This cable connects at J23 labeled βKeypad Inputβ, and is displayed in Figure 2. In order to read from the keypad either rows or columns will need to be pulled high or low. J20 is used to house a 10 pin SIP resistor as well as a 10 pin header for wire wrapping. The label for J20 is most easily found in Figure 1, but the header soldered to it can be viewed in Figure 3. J21 and J22 are used to connect keypad signals to a SIP resistor located at J20. The keypad signals are directly connected to J22. The reference designator and the signal names therein are viewable in Figure 2. J21 pins, as indicated by horizontal dashes, are shorted horizontally with the pins in J20 (best viewed in Figure 1). Jumpers can be used with J22 and J21 to connect keypad signals to a SIP resistor. LCD Interface The µPAD has dedicated mounts and electrical connections for a character LCD. The signal pins of the LCD are wire wrap accessible via J29. Each of the LCD signals are labeled. J29 is just visible below the LCD in Figure 2. Electronics and Robotics LLC ootbrobotics.com