Digilent 410-302P User Manual

1300 Henley Cour t
Pullman, WA 99163
509.334.6306
www.digilentinc.com
ChipKIT™WiFire™ Board Reference Manual

Pre-Produ ction Limited Quantity Release

The first manufacturing build of the chipKIT WiFire board was produced using the PIC32MZ2048ECG100 – A4 engineering silicon provided by Microchip®. The use of engineering silicon enables early adopters to get a head start on their designs. The engineering silicon was only available in limited quantities, thus limiting the initial number of chipKIT WiFire boards built. The functionality of the engineering silicon on the chipKIT WiFire board will be substantially the same as production silicon for the vast majority of designs. Most projects built on a pre­production chipKIT WiFire board will work without modification on a production board. However, as with any engineering silicon, there is the potential for some minor variation. For more detailed information on the behavior of the engineering silicon used on the board, please refer to the errata that can be downloaded from
www.digilentinc.com/wifire http://www.microchip.com/wwwproducts/Devices.aspx?product=PIC32MZ2048ECH144#documentation.
or to get the most up to date errata from

Overview

The chipKIT WiFire is based on the popular Arduino™ open-source hardware prototyping platform and adds the performance of the Microchip PIC32MZ microcontroller. The WiFire has a WiFi MRF24 and SD card on the board, both with dedicated SPI signals. The WiFire board takes advantage of the powerful PIC32MZ2048ECG microcontroller. This microcontroller features a 32-bit MIPS processor core running at 200 MHz, 2MB of flash program memory, and 512K of SRAM data memory. The WiFire can be programmed using the Multi-Platform Integrated Development Environment (MPIDE), an environment based on the original Arduino IDE, modified to support PIC32. It contains everything needed to start developing embedded applications. The WiFire features a USB serial port interface for connection to the MPIDE and can be powered via USB or by an external power supply. In addition, the WiFire is fully compatible with the advanced Microchip MPLAB®X IDE and works with all MPLAB X compatible in-system programmer/debuggers, such as the Microchip PICkit™3 or the Digilent® chipKIT PGM. The WiFire is easy to use and suitable for both beginners and advanced users experimenting with electronics and embedded control systems.
Note: The Microchip PIC32MZ processor is a new generation microcontroller incorporating a very complex, aggressively ambitious analog to digital converter (ADC) design. The ADC uses a high speed pipelined architecture that does not lend itself well to multichannel applications or low speed sampling applications. As a result, the ADC does not meet Microchip’s original design specification. Consequently, the ADC performance is not as good as on the previous Microchip PIC32MX processors. For detailed information on the PIC32MZ ADC performance and limitations, please refer to the errata that can be downloaded from www.digilentinc.com/wifire to date errata from
http://www.microchip.com/wwwproducts/Devices.aspx?product=PIC32MZ2048ECH144#documentation.
or get the most up
DOC#: 502-273
Other produc t and company names mentioned may be trademarks of their respective owners.
Copyright Digilent, Inc. All rights reserved.
Page 1 of 23
WiFire Reference Manual
Microchip PIC32MZ2048ECG microcontroller
1
2 3 6 5 7 4 8 9 10
11
13
12
14
15
16
17
18
19
20
21
22
23
24
26
25
27
The analogRead() function in MPIDE was updated to mitigate the complexities and to improve the accuracy of the PIC32MZ ADC by careful selection of sampling times and oversampling of the input. These optimizations are only available when calling analogRead(); the raw ADC performance will be obtained if the peripheral is referenced directly.
(200 MHz 32-bit MIPS, 2MB Flash, 512K SRAM)
Microchip MRF24WG0MA WiFi module
Micro SD card connector
USB 2.0 Hi-Speed OTG controller with A and
micro-AB connectors
50 MHz SPI
43 available I/O pins
four user LEDs
PC connection uses a USB A > mini B cable
(not included)
12 analog inputs
3.3V operating voltage
200Mhz operating frequency
7V to 15V input voltage (recommended)
ChipKIT WiFire
30V input voltage (maximum)
0V to 3.3V analog input voltage range
High efficiency, switching 3.3V power supply
providing low power operation

1 ChipKIT WiFire Hardware Overview

The WiFire has the following hardware features:
Copyright Digilent, Inc. All rights reserved. Other produc t and company names mentioned may be trademarks of their respective owners.
Page 2 of 23
WiFire Reference Manual
I2C
Call Out Component Description Call Out Component Description
1 IC3- Microchip MRF24WG0MA WiFi Module 15 JP8- Hos USB Bus Power Enable
2 User Buttons 16 JP7- USB Overcurrent Detect
3 JP1- Microchip Debug Tool Connector 17 J8- Analog and Digital Signal Connector
4 J6-
Signals 18 JP9- 3.3v / 5.0v Shield Voltage Select
5 BTN3- Reset 19 J5- Shield Power Connector
6 JP2- Reset Disable 20 J17- 5.0V Regulator Configuration
7 J7- Digital Signal Connector 21 J16- Power Select Jumper
8 PIC32 Microcontroller 22 J13- Micro SD Connector
9 Potentiometer 23 J15- External Power Connector
10 J10- Digital Signal Connector 24 J14- External Power Connector
11 User LEDs 25 J4- USB- UART Handshaking Signals
12 JP6- USB Host or OTG Select 26 USB connector for USB Serial Converter
13 J9- SPI Connector 27 Serial Communication LEDs
14 J12- USB Connectors
Table 1. chipKIT hardware description.

2 MPIDE and USB Serial Communications

The WiFire board is designed to be used with the MPIDE; the MPIDE development platform was created by modifying the Arduino IDE and is backwards-compatible with the Arduino IDE. Links for where to obtain the MPIDE installation files, as well as instructions for installing MPIDE, can be found at www.chipkit.net/started.
The MPIDE uses a serial communications port to communicate with a boot loader running on the WiFire board. The serial port on the WiFire board is implemented using an FTDI FT232RQ USB serial converter. Before attempting to use the MPIDE to communicate with the WiFire, the appropriate USB device driver must be installed.
The WiFire board uses a standard mini-USB connector. Generally, a USB A to mini-B cable is used for connection to a USB port on the PC.
When the MPIDE needs to communicate with the WiFire board, the board is reset and starts running the boot loader. The MPIDE then establishes communications with the boot loader and uploads the program to the board.
When the MPIDE opens the serial communications connection on the PC, the DTR pin on the FT232RQ chip is driven low. This pin is coupled through a capacitor to the MCLR pin on the PIC32 microcontroller. Driving the MCLR line low resets the microcontroller, which restarts the execution with the boot loader.
This automatic reset action (when the serial communications connection is opened) can be disabled. To disable this operation, there is a jumper labeled JP2, which can be disconnected. JP2 is normally shorted, but if the shorting block is removed, the automatic reset operation will be disabled.
Two red LEDs (LD5 and LD6) will blink when data is being sent or received between the WiFire and the PC over the serial connection.
Copyright Digilent, Inc. All rights reserved. Other produc t and company names mentioned may be trademarks of their respective owners.
Page 3 of 23
WiFire Reference Manual
The header connector J4 provides access to the other serial handshaking signals provided by the FT232RQ. Connector J4 is not loaded at the factory and can be installed by the user to access these signals.

3 Power Supply

The WiFire is designed to be powered via USB (J1), from an external power supply (J14 or J15), or from the USB OTG receptacle (J11). Jumper block J16 is used to select which power supply is used. The power supply voltage selected by J16 is applied to the unregulated power bus, VU.
In order to operate the WiFire as a USB device powered from the USB serial interface (connector J1), place a shorting block in the UART position of jumper block J16. To operate the WiFire from an external power supply, attach the power supply to either J14 or J15 and place a shorting block in the EXT position of J16. Be sure to observe correct polarity when connecting a power supply to J14, as a reversed connection could damage the board. To operate the WiFire as a USB powered device from the USB OTG connector (J11), place a shorting block on the USB position of J16. This will normally only be done when running a sketch on the board that programs it to operate as a USB device. The power supply section in the WiFire provides two voltage regulators, a 3.3V regulator and a 5V regulator. All systems on the WiFire board itself operate at 3.3V and are powered by the 3.3V regulator. The 5V regulator is used to provide power for external circuits, such as shields, that require 5V for operation and to supply USB 5.0V when the WiFire is used as a USB Host. The 5V regulator can be completely disabled if it is not needed for a given application.
When a shield is used, connector J5 provides power to the shield. Connector J5 pin 8 provides VIN as applied by the external power source J14 or J15. If no power is provided to J14 or J15, VIN will not be powered. For most shields, pin 5 on connector J5 would provide 5.0V to the shield; however, the WiFire is not 5v tolerant and it would be very easy for a shield to destroy an input if 5.0V were applied to the PIC32MZ. For this reason, JP9 was added to control the voltage supplied to the shield’s 5V source. By default, JP9 is loaded to supply only 3.3V on the 5.0V pin so that the shield does not get 5V and thus cannot inadvertently apply 5.0V to any input to the WiFire. If the shield requires 5.0V to operate, the shield will not work when 3.3V is applied; JP9 must be selected to provide 5.0V for the shield to work. However, extreme caution should be used when selecting 5.0V on JP9 to ensure that the shield will observe IOREF and not supply 5.0V to any input to the WiFire; as this will damage the input to the PIC32MZ on the WiFire.
The WiFire board is designed for low power operation and efficient use of battery power; a switching mode voltage regulator is used for the 3.3V power supply. This switching mode regulator is made up of a Microchip MCP16301 and associated circuitry, which can operate on input voltages from 4V to 30V with up to 96% efficiency, and is rated for 600mA total current output. The MCP16301 has internal short circuit protection and thermal protection. The 3.3V regulator takes its input from the unregulated power bus, VU, and produces its output on the VCC3V3 power bus. The VCC3V3 bus provides power to all on-board systems and is available at the shield power connector (J5) to provide 3.3V power to external circuitry, such as shields.
The 5V regulator section provides a low dropout linear regulator. The 5.0 regulator is provided for powering external circuitry that needs a 5V power supply, such as providing for USB 5.0V when the WiFire is used as a USB host, or to provide 5.0V to the shield on J5 with JP9 selected to 5.0v. This voltage regulator uses an On Semiconductor NCP1117LP. The NCP1117LP is rated for an output current of 1A. The dropout voltage of the NCP1117LP is a maximum of 1.4V at 1A output current. The maximum input voltage of the NCP1117LP is 18V. The recommended maximum operating voltage is 15V. However, if the 5.0V regulator is completely disable by removing all jumpers on J17, the external input voltage applied to J14 or J15 may be as high as the 30V as limited by the switching mode 3.3V regulator.
Copyright Digilent, Inc. All rights reserved. Other produc t and company names mentioned may be trademarks of their respective owners.
Page 4 of 23
WiFire Reference Manual
LDO OutLDO In
VU 5V0
GNDEN Ext
Signal provided to enable an external voltage regulator, if one is being used. This would allow
accessible using digital pin 50.
LDO OutLDO In
VU 5V0
GNDEN Ext
The input voltage to the 5V regulator is taken from the VU bus, and the output is placed on the VCC5V0 power bus. There is a reverse polarity protection diode in the external power supply circuit. Considering the diode drop plus the forward drop across the regulator, the minimum input voltage to the regulator should be 7V to produce a reliable 5V output.
For input voltages above 9V, the regulator will get extremely hot when drawing high currents. The NCP1117LP has output short circuit protection as well as internal thermal protection and will shut down automatically to prevent damage.
The 5V regulator selection on JP17 provides four 5V power configurations:
1) 5V regulator completely disabled and no 5V power available;
2) 5V regulator bypassed and 5V provided from an external 5V power supply, such as USB;
3) on-board 5V regulator used to provide 5V power;
4) External 5V regulator used to regulate VU and provide 5V power.
Jumper block J17 is used to select these various options and the following diagrams describe the use of J16. This diagram shows the arrangement of the signals on J17:
Signals Description
LDO In The input to the on-board linear regulator.
LDO Out The output of the on-board regulator.
VU The unregulated input voltage selected by the jumper setting jumper block J16.
5V0 The connection to the VCC5V0 power bus on the WiFire board.
the sketch running on the WiFire to turn on/off the external voltage regulator. When used with
EN Ext
an external voltage regulator, this allows the board to go into an extremely low power operating mode. This signal is connected to Port D, bit 13 (RD13) on the PIC32 microcontroller. This is
GND Connection to the digital ground bus on the WiFire board.
Table 2. Description of signals on J17.
To completely disable operation of the on-board linear regulator, remove all shorting blocks from J17. To use the on-board 5V regulator, use the provided shorting blocks to connect VU to LDO In, and to connect LDO Out to 5V0, as follows:
Note: In this case, when J16 is in the EXT position, and J17 is jumpered to regulate the external input, do not apply more than 18V; this can destroy the 5.0V regulator.
To bypass the on-board 5V regulator when powering the board from an externally regulator 5V power supply, such as USB, Use one of the provided shorting blocks to connect VU to 5V0, as follows:
Copyright Digilent, Inc. All rights reserved. Other produc t and company names mentioned may be trademarks of their respective owners.
Page 5 of 23
WiFire Reference Manual
LDO OutLDO In
VU 5V0
GNDEN Ext
An external 5V regulator can be used. This would be desirable, for example, when operating from batteries. An external switching mode 5V regulator could be used to provide higher power efficiency than the on-board linear regulator. In this case, use wires as appropriate to connect VU to the unregulated input of the external regulator. Connect the regulated 5V output to 5V0. Connect GND to the ground connection of the external regulator. Optionally, connect EN Ext to the enable input control of the external regulator, if available. This allows the external regulator to be turned off for low power operation. Digital pin 50 is then used to turn on/off the external regulator.
The PIC32MZ microcontroller is rated to use a maximum of 60mA of current when operating at 200 MHz. The MRF24WG0MA WiFi module typically consumes a maximum of 237mA when transmitting. This allows approximately 303mA of current to power the remaining 3.3V circuitry on the WiFire board and external circuitry powered from the VCC3V3 bus. No circuitry on the WiFire board is powered from the VCC5V0 power bus, leaving all current available from the 5V regulator to power external circuitry and the USB 5.0V power bus when the WiFire is used as a USB Host.
The POWER connector (J5) is used to power shields connected to the WiFire board. Pin 1 is unconnected, the following pins are provided on this connector:
IOREF (pin 2): This pin is tied to the VCC3V3 bus.
RST (pin 3): This connects to the MCLR pin on the PIC32 microcontroller and can be used to reset the
PIC32.
3V3 (pin 4): This routes the 3.3V power bus to shields.
5V0 (pin 5): This routes 3.3V or 5.0V power to shields depending on the position of JP9.
GND (pin 6, 7): This provides a common ground connection between the WiFire and the shields. This
common ground is also accessible on connectors J2 and J3.
VIN (pin 8): This connects to the voltage provided at the external power supply connectors (J14 and
J15). This can be used to provide unregulated input power to the shield. It can also be used to power the WiFire board from the shield instead of from the external power connector. If no power is supplied at J14 or J15 or from the shield, VIN will not have any power on it.

4 5V Compatibility

The PIC32 microcontroller operates at 3.3V. The original Arduino boards operate at 5V, as do many Arduino shields.
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, whereas the analog capable I/O pins are not 5V tolerant. There are 48 analog capable I/O pins on the PIC32MZ, and this applies to most GPIO pins on the processor. Historically, clamp diodes and current limiting resistors have been used to protect the analog capable I/O from being damaged; but because of the large number of analog capable I/Os, and because clamp diodes and resistors will limit the maximum speed at which these I/Os will operate, it was decided that the WiFire would not be 5V tolerant. Instead, JP9 was added to allow for the 5V0 bus to the shield to be selectable between 3.3V or
5.0V. If 5.0V is selected, great care must be used to ensure that no input to the PIC32MZ exceeds 3.6V; as that will damage the PIC32MZ.
Copyright Digilent, Inc. All rights reserved. Other produc t and company names mentioned may be trademarks of their respective owners.
Page 6 of 23
WiFire Reference Manual
The minimum high-voltage output 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 won’t. Many 5V logic devices will work reliably with 3.3V inputs.

5 Input/ Output Connections

The WiFire board provides 43 of the I/O pins from the PIC32 microcontroller at pins on the input/output connectors J6, J7, J8, J9, and J10.
The PIC32 microcontroller can source or sink a maximum of 15mA on all digital I/O pins; however, some pins can source or sink 25mA or even 33mA; check with the PIC32MZ datasheet for more information. To keep the output voltage within the specified output voltage range (V 10mA on the 15mA pins, or for the higher current pins check the PIC32MZ datasheet for the maximum currents. The maximum current that can be sourced or sunk across all I/O pins simultaneously is +/-150mA. The maximum voltage that can be applied to any I/O pin is 3.6V. For more detailed specifications, refer to the PIC32MZ datasheet available from www.microchip.com
.
Connectors J7 and J10 are 2x8 female pin header connectors that provide digital I/O signals. The outer row of pins (closer to the board edge) corresponds to the I/O connector pins on an Arduino Uno or Duemilanove board. The inner row of pins provides access to the extra I/O signals provided by the PIC32 microcontroller.
Connector J8 is a 2x6 female pin header connector that provides access to the analog input pins on the microcontroller. The outer row of pins corresponds to the six analog pins on an Arduino Uno or Duemilanove. The inner row of pins is for the additional I/O signals provided by the PIC32 microcontroller. The analog pins on J8 can also be used as digital I/O pins.
The chipKIT/Arduino system uses logical pin numbers to identify digital I/O pins on the connectors. The logical pin numbers for the I/O pins on the WiFire are 0-42. These pin numbers are labeled in the silk screen on the board. Additional pins 43-70 allow access to the on board components such as the uSD, MRF24 WiFi radio, User LEDs / BTNs, and POT.
Pin numbers 0-13 are the outer row of pins on J10 and J7, from right to left. Pin numbers 14-19 are the outer row of pins on J8, from left to right. Pins 20-25 are the inner row of pins on J8, from left to right. Pin numbers 26-41 are the inner row of pins on J10 and J7, from right to left. Pin 42 is the pin labeled A on J7. This pin is normally the reference voltage for the microcontroller’s A/D converter, but can also be used as a digital I/O pin.
In addition to the connector pin, Pin 13 also connects to the user LED LD1. Pin 43, 44, and 45 connect to user LEDs LD2, LD3, and LD4. Pins 43-45 do not attach to any connector. Pins 46 and 47 connect to Buttons BTN1 and BTN2 and do not attach to any connector.
The analog inputs on connector J8 are assigned pin numbers. The outer row of pins on J8 is analog inputs A0-A5. The inner row of pins is A6-A11. These pins are also assigned digital pin numbers; A0-A5 are digital pins 14-19, and A6-A11 are 20-25.
0.4V, VOH 2.4V) the pin current must be restricted to +/-
OL
Copyright Digilent, Inc. All rights reserved. Other produc t and company names mentioned may be trademarks of their respective owners.
Page 7 of 23
Loading...
+ 16 hidden pages