Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| chipkit_uno32:chipkit_uno32_rev_c [2015/05/15 23:24] – [chipKIT Uno32 Hardware Description] Joshua Woldstad | chipkit_uno32:chipkit_uno32_rev_c [2022/10/04 11:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 509: | Line 509: | ||
| ====== Peripheral I/O Functions | ====== Peripheral I/O Functions | ||
| - | The PIC32 microcontroller on the Uno32 board | + | The PIC32 microcontroller on the Uno32 board provides a number of peripheral functions. The following peripherals are provided: |
| - | provides a number of peripheral functions. The | + | |
| - | following peripherals are provided: | + | ====UART port 1:==== Asynchronous serial port. Pin 0 |
| + | (RX), Pin 1 (TX). These pins are connected to | ||
| + | I/O connector J6 and are also connected to the | ||
| + | FT232R USB serial converter. It is possible to | ||
| + | use these pins to connect to an external serial device when not using the USB serial | ||
| + | interface. This uses UART1 (U1RX, U1TX) on | ||
| + | the PIC32 microcontroller. | ||
| + | |||
| + | ====UART port 2: ==== | ||
| + | Asynchronous serial port. Pin 39 | ||
| + | (RX), Pin 40 (TX). This uses UART2 (U2RX, | ||
| + | U2TX) on the PIC32 microcontroller. | ||
| + | |||
| + | ==== SPI: ==== | ||
| + | |||
| + | Synchronous serial port. Pin 10 (SS), Pin | ||
| + | 11 (MOSI), Pin 12 (MISO), Pin 13 (SCK). This | ||
| + | uses SPI2 (SS2, SDI2, SDO2, SCK2) on the | ||
| + | PIC32 microcontroller These signals also | ||
| + | appear on connector J8. | ||
| + | |||
| + | Jumpers JP5 and JP7 are used to select | ||
| + | whether the Uno32 operates as a Master | ||
| + | (transmit on MOSI, receive on MISO) or a | ||
| + | Slave (transmit on MISO, receive on MOSI) | ||
| + | device. The shorting blocks on JP5 and JP7 | ||
| + | are normally placed in the Master position for | ||
| + | the Uno32 to function as an SPI master. | ||
| + | |||
| + | Jumper JP4 is used to select PWM output or | ||
| + | the SPI SS function on Pin 10. The shorting | ||
| + | block on JP4 should be in the RD4 position to | ||
| + | select PWM output. It should be in the RG9 | ||
| + | position to select the SPI SS function.. JP4 will | ||
| + | normally be in the RD4 position. In general, the | ||
| + | only time it needs to be in the RG9 position is | ||
| + | when the Uno32 board is being used as an SPI | ||
| + | slave device. | ||
| + | |||
| + | ==== I²C: ==== | ||
| + | |||
| + | Synchronous serial interface. The PIC32 | ||
| + | microcontroller shares analog pins A4 and A5 | ||
| + | with the two I²C signals SDA and SCL. | ||
| + | Jumpers JP6 and JP8 are used to select | ||
| + | whether the analog pin functions or the I²C pin functions are being used. The shorting blocks | ||
| + | are placed in the A4/A5 position to select the | ||
| + | analog input function or general digital I/O. | ||
| + | They are placed in the RG3/RG2 position to | ||
| + | use the pins for I²C operation. This uses I²C1 | ||
| + | (SDA1, SCL1) on the PIC32 microcontroller. | ||
| + | |||
| + | **Note:** | ||
| + | |||
| + | The I²C bus uses open collector drivers | ||
| + | to allow multiple devices to drive the bus | ||
| + | signals. This means that pull-up resistors must | ||
| + | be provided to supply the logic high state for | ||
| + | the signals. These pull-up resistors are not on | ||
| + | the Uno32 board and must be provided | ||
| + | externally. The required resistance of the pullup | ||
| + | resistor to use depends on the total number | ||
| + | of devices on the bus, the length of wire, and | ||
| + | the clock speed being used. It essentially | ||
| + | depends on distributed capacitance on the | ||
| + | bus. The higher the distributed capacitance | ||
| + | and the faster the clock speed, the smaller the | ||
| + | resistance should be. Values typically used are | ||
| + | in the range of 2K to 10K ohms. | ||
| + | |||
| + | ==== PWM: ==== | ||
| + | |||
| + | Pulse width modulated output. Pins 3 | ||
| + | (OC1), 5 (OC2), 6 (OC3), 9 (OC4), and 10 | ||
| + | (OC5). | ||
| + | |||
| + | |||
| + | ==== External Interrupts: ==== | ||
| + | |||
| + | Pin 38 (INT0), Pin 2 | ||
| + | (INT1), Pin 7 (INT2), Pin 8 (INT3), Pin 35 | ||
| + | (INT4) | ||
| + | |||
| + | ==== User LEDs: ==== | ||
| + | |||
| + | Pin 13 (LD4), Pin 43 (LD5). Pin 13 | ||
| + | is shared between a connector pin and the | ||
| + | LED. Pin 43 only goes to the LED and not any | ||
| + | connector pin. Driving the pin high turns the | ||
| + | LED on, driving it low turns it off. | ||
| + | |||
| + | ====A/D Converter Reference: | ||
| + | |||
| + | Labeled A, the leftmost | ||
| + | outer pin on connector J5. This is used to | ||
| + | provide an external voltage reference to | ||
| + | determine the input voltage range of the | ||
| + | analog pins. The maximum voltage that can be | ||
| + | applied to this pin is 3.3V. This pin can also be | ||
| + | used as digital pin 42. | ||
| + | |||
| + | ==== RTCC: ==== | ||
| + | |||
| + | Real Time Clock Calendar. The PIC32 | ||
| + | microcontroller contains an RTCC circuit that | ||
| + | can be used to maintain time and date | ||
| + | information. The operation of the RTCC | ||
| + | requires a 32.768Khz frequency source. | ||
| + | Crystal X2 (not loaded), just above and to the | ||
| + | right of the PIC32 microcontroller IC, is | ||
| + | provided for you to solder a 32Khz watch | ||
| + | crystal. The Citizen CFS206-32.768KDZF-UB | ||
| + | crystal can be used in this location. | ||
| + | |||
| + | ==== RESET: ==== | ||
| + | |||
| + | The PIC32 microcontroller is reset by | ||
| + | bringing its MCLR pin low. The MCLR pin is | ||
| + | connected to the P32_RST net on the circuit | ||
| + | board. | ||
| + | |||
| + | As described earlier, reset of the PIC32 | ||
| + | microcontroller can be initiated by the USB serial converter. The USB serial converter | ||
| + | brings the DTR pin low to reset the | ||
| + | microcontroller. Jumper JP1 can be used to | ||
| + | enable/ | ||
| + | converter to initiate a reset. | ||
| + | |||
| + | The P32_RST net is connected to pin 1 of | ||
| + | connector J2. This allows circuitry on a shield | ||
| + | to reset the microcontroller, | ||
| + | the circuitry on the shield is reset at the same | ||
| + | time as the microcontroller. | ||
| + | Connector J8 provides access to the SPI bus. | ||
| + | Pin 5 provides access to the SPI Slave Select | ||
| + | signal (SS). | ||
| + | |||
| + | On Arduino boards, the corresponding | ||
| + | connector is also used as an in-system | ||
| + | programming connector as well as providing | ||
| + | access to some of the SPI signals. On Arduino | ||
| + | boards, pin 5 of this connector is connected to | ||
| + | the reset net. | ||
| + | |||
| + | Some Arduino shields, notably, the Ethernet | ||
| + | shield, connect pin 5 to the reset net on pin 1 | ||
| + | of connector J2. This causes the processor to | ||
| + | be reset each time an attempt is made to | ||
| + | access the SPI port. Jumper JP9 can be used | ||
| + | to break the connection between J8 pin 5 and | ||
| + | reset when using Arduino shields that make | ||
| + | this connection. JP9 has a cut-able trace on | ||
| + | the bottom of the board that can be cut to | ||
| + | break the connection between SPI SS and | ||
| + | reset. JP9 is not loaded at the factory. To | ||
| + | restore the connection, solder a two pin header | ||
| + | at the JP9 position and install a shorting block. | ||
| + | |||
| + | A reset button is at the upper left corner of the | ||
| + | board. Pressing this button resets the PIC32 | ||
| + | microcontroller. | ||
| + | |||
| + | |||
| + | ---- | ||
| + | |||
| + | ====== Microchip Development Tool Compatibility ====== | ||
| + | |||
| + | In addition to being used with the MPIDE, the | ||
| + | Uno32 board can be used as a more traditional | ||
| + | microcontroller development board using | ||
| + | Microchip Development Tools. | ||
| + | |||
| + | Unloaded connector JP3 on the left side of the | ||
| + | board is used to connect to a Microchip | ||
| + | development tool, such as the PICkit3™. The | ||
| + | holes for JP3 are staggered so that a standard | ||
| + | 100-mil 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 PIC32 microcontroller family, and can be | ||
| + | connected via the same 6-pin interface as the | ||
| + | PICkit3, can be used. | ||
| + | |||
| + | Typically, a right-angle male connector is used | ||
| + | in JP3 so that a PICkit3 can be attached | ||
| + | coplanar with the Uno32 board. The connector | ||
| + | can be loaded from the top, or it can be loaded | ||
| + | from the bottom. In either case the PICkit3 will | ||
| + | be upright (button and LEDs visible). | ||
| + | |||
| + | If JP3 is loaded from the top, the PICkit3 will | ||
| + | interfere with the USB connector and the | ||
| + | external power connector. A short six-wire | ||
| + | cable can be used between the PICkit3 and | ||
| + | the Uno32. If JP3 is loaded from the bottom, | ||
| + | the PICkit3 won’t interfere with the USB and | ||
| + | external power connectors. | ||
| + | |||
| + | The Digilent PICkit3 Programming Cable Kit | ||
| + | includes all necessary connectors and a cable | ||
| + | for connecting a PICkit3 to the Uno32. | ||
| + | The Microchip MPLAB® IDE or the MPLAB® X | ||
| + | IDE can be used to program and debug code | ||
| + | running on the Uno32 board. These programs | ||
| + | can be downloaded from the Microchip web | ||
| + | site. | ||
| + | |||
| + | Using the Microchip development tools to | ||
| + | program the Uno32 board will cause the boot | ||
| + | loader to be erased. To use the board with the | ||
| + | MPIDE again, it is necessary to program the | ||
| + | boot loader back onto the board. The boot | ||
| + | loader source code and compiled image can | ||
| + | be found in the MPIDE software download. | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ======Pinout Tables====== | ||
| + | |||
| + | The following tables give the relationship | ||
| + | between the chipKIT digital pin numbers, the | ||
| + | connector pin numbers and the microcontroller | ||
| + | pin numbers. | ||
| + | |||
| + | In the following tables, columns labeled | ||
| + | chipKIT pin # refer to the digital pin number. | ||
| + | This is the value that is passed to the | ||
| + | pinMode(), digitalRead(), | ||
| + | other functions to refer to the pin. | ||
| + | |||
| + | For most pins, this pin number will agree with | ||
| + | the pin number labeled on the board. For the | ||
| + | pins whose function can be switched using | ||
| + | jumpers, the pin number labeled on the board | ||
| + | is correct when the jumper is in the ‘normal’ | ||
| + | position. | ||
| + | |||
| + | For example: The normal position for JP4 is | ||
| + | the RD4 position. The digital pin number for | ||
| + | the microcontroller signal RD4 is 10. With JP4 | ||
| + | in the RD4 position, digital pin 10 is connected | ||
| + | to the pin labeled 10 on the board. The | ||
| + | alternate position for JP4 is the RG9 position. | ||
| + | The digital pin number for the microcontroller | ||
| + | signal RG9 is 44. With JP4 in the RG9 | ||
| + | position, digital pin 44 is connected to the pin | ||
| + | labeled 10 on the board, and digital pin 10 is | ||
| + | not connected. | ||
| + | |||
| + | The pin labeled 10 on the board is connected | ||
| + | to connector J5 pin 5. This is shown as J5-05 | ||
| + | in the following tables. In the ‘Pinout Table by | ||
| + | Shield Connector Pin’ table below, J5-05 is | ||
| + | shown has being either chipKIT pin # 10 or 44. | ||
| + | J5-04 is connected to chipKIT pin # 10 when | ||
| + | JP4 is in the RD4 position and is connected to | ||
| + | chipKIT pin # 44 when in the RG9 position. | ||
| + | |||
| + | |||
| + | ---- | ||
| + | |||
| + | ====== Pinout Table by Logical Pin Number ====== | ||
| + | | chipKIT Pin # | Connector Pin # | PIC32 Pin # | PIC32 Signal | ||
| + | | 0 | J6-01 | 34 | U1RX/ | ||
| + | | 1 | J6-03 | 33 | U1TX/ | ||
| + | | 2 | J6-05 | 42 | IC1/ | ||
| + | | 3 | J6-07 | 46 | OC1/ | ||
| + | | 4 | J6-09 | 59 | RF1 | ||
| + | | 5 | J6-11 | 49 | OC2/ | ||
| + | | 6 | J6-13 | 50 | OC3/ | ||
| + | | 7 | J6-15 | 43 | IC2/ | ||
| + | | 8 | J5-01 | 44 | IC3/ | ||
| + | | 9 | J5-03 | 51 | OC4/ | ||
| + | | 10 | J5-05 | 52 | PMWR/ | ||
| + | | 11 | J5-07 | 6 | SDO2/ | ||
| + | | 12 | J5-09 | 5 | SDI2/ | ||
| + | | 13 | J5-11 | 4 | SCK2/ | ||
| + | | 14/A0 | J7-01 | 14 | C2IN-/ | ||
| + | | 15/A1 | J7-03 | 12 | C1IN-/ | ||
| + | | 16/A2 | J7-05 | 21 | U2CTS/ | ||
| + | | 17/A3 | J7-07 | 23 | TMS/ | ||
| + | | 18/A4 | J7-09 | 27 | TCK/ | ||
| + | | 19/A5 | J7-11 | 29 | PMALH/ | ||
| + | | 20/A6 | J7-02 | 13 | C2IN+/ | ||
| + | | 21/A7 | J7-04 | 11 | C1IN+/ | ||
| + | | 22/A8 | J7-06 | 22 | PMA7/ | ||
| + | | 23/A9 | J7-08 | 24 | TDO/ | ||
| + | | 24/ | ||
| + | | 25/ | ||
| + | | 26 | J6-02 | 60 | PMD0/ | ||
| + | | 27 | J6-04 | 61 | PMD1/ | ||
| + | | 28 | J6-06 | 62 | PMD2/ | ||
| + | | 29 | J6-08 | 63 | PMD3/ | ||
| + | | 30 | J6-10 | 64 | PMD4/ | ||
| + | | 31 | J6-12 | 1 | PMD5/ | ||
| + | | 32 | J6-14 | 2 | PMD6/ | ||
| + | | 33 | J6-16 | 3 | PMD7/ | ||
| + | | 34 | J5-02 | 53 | PMRD/ | ||
| + | | 35 | J5-04 | 45 | IC4/ | ||
| + | | 36 | J5-06 | 54 | CN15/ | ||
| + | | 37 | J5-08 | 55 | CN16/ | ||
| + | | 38 | J5-10 | 35 | U1RTS/ | ||
| + | | 39 | J5-12 | 31 | PMA9/ | ||
| + | | 40 | J5-14 | 32 | PMA8/ | ||
| + | | 41 | J5-16 | 15 | PGC1/ | ||
| + | | 42 | J5-15 | 16 | PGED1/ | ||
| + | | 43 | N/A | 58 | RF0 | User LED LD5 | | ||
| + | | 44 | J5-05 | 8 | PMA2/ | ||
| + | | 45 | J7-09 | 36 | SDA1/ | ||
| + | | 46 | J7-11 | 37 | SCL1/ | ||

