Beruflich Dokumente
Kultur Dokumente
Users Guide
1 - Overview
The nadP!" is a #icrocontroller board based on the Microchip P!"32, P!"2$ and dsP!" %a#ilies. !t is designed to be easy to use and suitable %or use by anyone %ro# beginners to ad&anced users %or e'peri#enting (ith electronics and e#bedded control syste#s. !t contains e&erything needed to start de&eloping e#bedded applications. !t is designed to pro&ide a lo( cost s#all control solution. !t is intended to introduce and de#onstrate the capabilities and %eatures o% P!"32, P!"2$ and dsP!" (ith on) chip USB OTG. The board also co#es (ith all the basic co#ponents needed %or the Microchip P!"32, P!"2$ and dsP!" %a#ilies, so you can use it straight out o% the bo'. *'cept %or a single connection to a co#puter, no additional hard(are or con%iguration is necessary. + , connection to a host co#puter supplies co##unications and po(er to the board. .or independent host)side , operation, the starter kit #ay be disconnected %ro# the P" and po(ered through D" Po(er /ack %or independent %unctionality. The starter kit pro&ides 83 !01 pins that support a nu#ber o% peripheral %unctions, such as ,+2T, P! and !2"3 ports and pulse (idth #odulated outputs. ,se o% these ad&anced peripherals re4uires an add on board to pro&ide the additional hard(are re4uired. Through the , - inter%ace, it can also be progra##ed (ithout the need o% a progra##er, as there is a built in Microchip boot loader. The starter kit can be po(ered &ia , -, an e'ternal D" po(er adapter, or batteries.
Page 2
2 - Features
P!"32, P!"2$ and dsP!" (ith on)chip , - 1T5 Microchip bootloader .ir#(are , - serial inter%ace easily can be used as , - host and , - de&ice 1n)board Micro , - "onnector 1n)board Micro D "ard holder 1n)board *'ternal Po(er "onnector 1n)board Po(er upply (itch 617 1.. 178 1n)board 9V regulator 1n)board 3.3V regulator 1n)board hield Po(er "onnector 1n)board 2* *T 6M":28 (itch 1n)board 5eneral purpose (itch 1n)board :*D Po(er upply indicator 1n)board 8 ,ser :*Ds, and 1'8 #ale0%e#ale pin header that pro&ides connections to these :*Ds Most o% the processor pins a&ailable, and the breakout pins can be soldered (ith standard 0.1;#ale0%e#ale header
to easily plug it into a #other board $ holes to %i' the board into a #other board 1n)board 8Mh< "rystal and t(o capacitors 1n)board 32.=>8?h< "rystal and t(o capacitors %or 2T""0Ti#er1 1n)board 1'> %ootprint %or !" P connection that pro&ides Microchip Debug Tool "onnector -oard i<e Inches (##) @ 3.94 6100.298 ' 2.39 6>0.A98
3 - Hardware Overview
The nadP!" board pro&ides the %ollo(ing hard(are %eatures@
Figure 3- 1
SnadPIC100 REV 1.01
Page 3
N .1
USB C nne!t r
This pro&ides 2 %unctionalities @ 1) connects to a , - port on the P" to pro&ide the co##unications port used by any application designed %or this reason 6e'. -ootloader8 to talk to the board as a de&ice. This can also be used to po(er the board (hen connected to the P". 2) (hile operating as an e#bedded host, it connects to a , - de&ice 6e'. USB F"as# dri$e% to pro&ide the bidirectional co##unications and pro&ides de&ice po(er. This , - "onnector is a #ini , - +"onnector ) 9 pins 6de%ault on)board8, also on)board %ootprint %or USB-B &e'a"e C nne!t r ) $ pins. 1nly one connector can be #ounted each ti#e. Bere is the sche#atic (
, -)- %e#ale
!n e#bedded host #ode like reading data %ro# , - .lash dri&e, another , - adapter (Figure 3- 4% is needed to connect the , - .lash dri&e.
Figure 3- 3
Figure 3- 4
Page 4
N .2
Figure 3- 5 Notes : - S(itching bet(een De&ice and Host modes only under software control. No Hardware change will be made on the board.
- (3) J2 is a Jumper pad NOT installed by default. shorting solder jumper pad if used. It is for monitoring VBUS power(PGOOD). - J1 is a Jumper installed by default, Shorting VBUSON (RB5) to EN (Enable) Pin of USB Power Switch IC. (TPS2051). - D2 is FMKA140 Schottky Diode 40V 1A.
) D2 is .M?+1$0 chottky Diode $0V 1+.
- R23 is used to pull-down VBUS pin in USB device/peripheral mode. NOT installed by default (its value is user decision), its importance is in application that uses USBID to detect VBUS when USB module is disabled.
N .3
Page 5
This connector pro&ides po(er to !01 e'pansion shields connected to the board @ - 2'2 pins @ 2 pins 3.3V D 2 pins 57D. - 2'2 pins @ 2 pins 9V D 2 pins 57D. - 3.3. is li#ited by /CP102+ 1/a2 +33'4% and by , - 6 /a2 133'48. - !n case *'ternal Po(er upply used 3.3V pins E /a2 +33'4. - !n case , - Po(er upply used 3.3V pins E /a2 133'4. - 9. is li#ited by 50/3+ 1/a2 +33'4%. - !n case , - Po(er upply used 9V pins E N P ,er. , - Po(er upply and *'t. Po(er upply can be used together only i% V-, 17 62-98 is pulled do(n, to not enabling , - Po(er (itch !" TP 2091 (hich is acti&e B!5B.
N .4
N . +
N . -
Figure 3- 7 N . 7
Voltage regulator for the 3.3V power supply. This power supply can provide up to 500mA of current. MCP1825 3.3V 500mA Positive Voltage Regulator used.
SnadPIC100 REV 1.01
Page 6
N . 0 N . ;
N . 13
Figure 3- 0 Notes : ) SPI2 used %or co##unicating (ith a D "ard@ S7I2, S7O2, SCK2 and SS2. ) =3 6/u#per Pad8 is installed by de%ault, card detection connected to RE8. R1 (100 Ohm) is used for protection purpose.
- The square besides R25 is a 1x pin header on the board used for card detection (CD) , use Dupont Wire Connector to connect it to any MCU pin if RE8 not used.
N . 11
Page 7
N . 12
--
N . 13
User 6*7
These are Test !01 :*Ds that consists o% 8 :*Ds and its circuit is sho(n belo(@
Figure 3- ; - :*D colour > May be any colour or #any colours. ) 2A, 210, 211, 212, 213, 21$, 219, 21> are current li#iting resistors %or :*Ds 1k. - Use Dupont Fire "onnectors to connect any :*D to any M", pin. N . 14
)eset Butt n
Page 8
N . 1+
)G1+ S,it!#
This is used %or general purpose, and used in case o% entering bootlooder #ode.
Figure 3- 11 N . 1-
2519 (itch
" C nne!t r
This connector is used to connect Microchip programmer/debugger tools, such as PICkit3. This allows the board to be used as a traditional microcontroller development board using the Microchip MPLABIDE. (Figure 3- 10)
N . 15
This are $ "onnectors 2'13 #ale0 %e#ale pin headers 60.1 inch standard 8that pro&ide !01 #icrocontrollerIs pins. ,ser is %ree to connect the pins according to their application. +ll the breakout pins are label clearly (ith their port na#e in one ide, and all the breakout pins are label clearly (ith their pin nu#ber in the other ide.
Figure 3-12
SnadPIC100 REV 1.01
Page 9
Notes : MCU Oscillator : RC12 and RC15 are connected with Crystal 8.00MHz RTC Oscillator : RC13 and RC14 are connected with Crystal 32.768KHz USB : D+, D-, and USBID are connected with Mini USB AB Connector
'ain 8r !ess r
This is the TK.P100 #icrocontroller that is the #ain processor %or the board.
Figure 3- 13
Page 10
N . 1;
RTC Jampers
23 B "es
These are 4 holes 3.6mm provided in each corner to fix the board on a mother board, exp. home made PCB, to expand the hardware, and test a user application-specific. This board was designed to fit perfectly on standard 100mil prototyping board. When you design you expansion board, just work in a grid of 0.05 inch (1.27mm), and you will realize that all dimensions are multiple of 0.05 inch (1.27mm).
Bere are all di#ensions @
Figure 3- 14
Page 11
Figure 4- 1
"o#ponents Values Kty Description . 19 2 $ 2 2 3 9 0 8 1 2 MDGT32$ 32.=>8k) CFPX21= .M?+1$0 1 1 2 0>03 capacitor. "apacitor@ cera#icL 10u.L 10VL 0809 Tantalu# "apacitor 10u% 10& 321> 0>03 capacitors 0>03 capacitors 0>03 resistors 0>03 resistors 0>03 resistors 6:*D current li#iting8 1T5 Card detection : RE8 used 1T5, (/2 71T !7 T+::*D) 8Mh< D)30pp#, 4p. 12.9p. chottky Diode $0V 1+
"1,"2,"3,"$,"9,">,"10,"13,"1=,"18," 100n.090V 1A,"20,"21,"23, "29 "12, "1$ "=, "8,"2$, "2> "11, "22 "19, "1> 2$, 29, 2> 2=,21=,218,21A,222,229,22>,R27,228 2A,210,211,212,213,21$,219,21> 223 /3 /1, /2 GT+:1 32.=>8k D2, DA
SnadPIC100 REV 1.01
Page 12
5 - Input/Output Connections
The P!"32 #icrocontroller can source or sink a #a'i#u# o% 18#+ on all digital !01 pins. Bo(e&er, to keep the output &oltage (ithin the speci%ied &oltage range 6V1: 0.$V, V1B 2.$V8 the pin current #ust be restricted to D=0)12#+. The #a'i#u# current that can be sourced or sunk across all !01 pins si#ultaneously is D0)200#+. The #a'i#u# &oltage that can be applied to any !01 pin is 9.9V. .or #ore detailed speci%ications, re%er to de&ice Data heet a&ailable %ro# the Microchip (eb site.
Figure 5- 1
The board pro&ides all !01 pins %ro# the #icrocontroller to pins on the input0output connectors,and provides Peripheral I/O Functions. These pins are labeled in the silk screen on the board to easily identify them : "onnectors 1, 2, 3, and 4 are 2'13 #ale0 %e#ale pin headers connectors that pro&ide 100 !01 #icrocontrollerIs pins. "onnector + is 1'> #ale0 %e#ale pin header that pro&ides Microchip Debug Tool "onnector . "onnector - is 1'8 #ale0 %e#ale pin header that pro&ides connections to user :*Ds . Dri&ing a pin high turns its :*D on, dri&ing it lo( turns it o%%. "onnector 5 is 2'2 #ale0 %e#ale pin header S#ie"d P ,er C nne!t r that pro&ides t(o pins connected to the .CC3.3 bus and t(o pins connected to GN7. "onnector 0 is 2'2 #ale0 %e#ale pin header S#ie"d P ,er C nne!t r that pro&ides t(o pins connected to the .CC+.3 bus and t(o pins connected to GN7. "onnector ; is 1'1 #ale0 %e#ale pin header that pro&ide S7 Card dete!ti n &un!ti na"it9.
Page 13
Shield Power Connector The PIC32 microcontroller is rated to use a maximum of 98mA of current when operating at 80Mhz. This allows up to ~400mA from the VCC3V3 bus and from the VCC5V0 bus to power external devices. The power connector, (Figure 3- 6 Shield Power Connector) , is used to provide power to shields connected to the board. 5V Compatibility The PIC32 microcontroller operates at 3.3V, and many Arduino shields are designed to operate at 5V. There are two issues to consider when dealing with 5V compatibility for 3.3V logic. The first is protection of 3.3V inputs from damage caused by 5V signals. The second is whether the 3.3V output is high enough to be recognized as a logic high value by a 5V input. The digital I/O pins on the PIC32 microcontroller are 5V tolerant. The analog capable I/O pins are not 5V tolerant, so applying 5V logic levels to any not 5V tolerant pin may damage the microcontroller! The minimum output high voltage of the PIC32 microcontroller is rated at 2.4V when sourcing 12mA of current. When driving a high impedance input (typical of CMOS logic) the output high voltage will be close to 3.3V. Some 5V devices will recognize this voltage as a logic high input, and some wont. Many 5V logic devices will work reliably with 3.3V inputs.
Page 14
Microchip Development Tool Compatibility The board can be used as a more traditional microcontroller development board using Microchip Development Tools. Unloaded connector Microchip Debug Tool Connector is used to connect to a Microchip development tool, such as the PICkit3. The holes are narrowed so that a standard, 100mil spaced, 6-pin header can be press fit to the board without the need to solder it in place. Any Microchip development tool that supports the microcontroller family, and can be connected via the same 6-pin interface as the PICkit3 can be used. Typically, a short six-wire cable can be used between the PICkit3 and the board. The Microchip MPLABIDE or the MPLABX IDE can be used to program and debug code running on the board. These programs can be downloaded from the Microchip web site. Using the Microchip development tools to program the board will cause the boot loader to be erased. To use the board with the boot loader again, it is necessary to program it back onto the board.
6 - Quick Start
With its pre-installed demo application, the Starter Kit is designed to be used straight out of the box. Except for a single connection to a computer, no additional hardware or configuration is necessary. Connect the Starter Kit with USB cable ( Figure 3- 3) to any available USB port on the PC or powered hub, open the power switch, the red power LED should light indicating the presence of power. Now, using Dupont wire(s) connect any port pin(s) of the MCU to any/many on board LED(s). The LED(s) should blink. This demo application blinks all ports pins of the MCU, each time only one port pin goes high to blink a LED. with Microchips HID bootloader -which allow you to load the program without any other programmer- and which is already programmed into the microcontroller - you can now easily load your program. But before doing so, you need to download the PC program from www.Microchip.com Do search for Microchip Application Libraries ,download and install. We used this version : MCHP_App_Lib_v2010_04_28_Installer.zip In folder USB Device Bootloaders you will find the PC program HIDBootLoader.exe. Execute it. You will see that the device was not detected, don't worry.. it is because you are not in bootloader mode. To be in bootloader mode, you should press both switches at the same time, and release RESET switches while keeping the other switch (RG15) pressed, and the PC program should detect it now, so release the last switch.. Now you can read, write, erase... the device using that PC program. You may need to export the demo application (blinking LED) for further use. you can compile your code with MPLAB C32 C Compiler and program the chip using HIDBootLoader.exe, but to ensure your code works, you should always include Linker Script in the project as shown at the figure below Figure 6 - 1:
Page 15
D!VP2 is used (hen there is 8Mh< crystal %or pri#ary 1scillator, and this is the case. The bootloader (hich is progra##ed in the chip is the sa#e %ound in Microchip +pplication :ibraries, but changed the s(itch to enter bootloader #ode (hich is connected to 2519 in our case.
Page 16
2(ectrostatic 3arnin! The board is shipped in a protecti&e anti)static package. The board #ust not be e'posed to high electrostatic potentials. + grounding strap or si#ilar protecti&e de&ice should be (orn (hen handling the board. +&oid touching the co#ponent pins or any other #etallic ele#ent.
Page 17
Page 18