* BC-USB-Kit Manual [#j9c628fb]
** Overview [#rd15abbe]
BC-USB-Kit is a USB-gadget development kit, which is equipped with a micro controller of Microchip Technology Inc, PIC24FJ128GB202 (hereafter PIC) as MCU (Micro Control Unit). To use IDE and other PIC development kits, which are provided by Microchip Technology Inc, you and develop and debug firmware for USB gadgets on BC-USB-Kit.~
Besides the USB connector, BC-USB-Kit is equipped with an EEPROM, a humidity and temperature sensor, a programable LED, and a programable switch. To use these on-board sensors, LED, and switch, you can develop an original USB gadget easily. Moreover, since BC-USB-Kit has expansion terminals (pins) including PIO and I2C, you can easily attach external sensors and display units for expanding the functions.~

** Specification [#o08a6dd8]
-Absolute Maximum Ratings
|                  |Value         |Memo                                  |h
|Power Supply Voltage          |-0.3~20V  |Use the power supply line on USB connector  (From 1 to 4 terminal (pin))|
|I/O Terminal Voltage (1)|-0.3~3.6V |Exclude 5V tolerant terminals  (pins) ※1           |
|I/O Terminal Voltage (2))|-0.3~5.5V |Apply only 5V tolerant terminals  (pins) ※1             |
|Operating Temperature          |0~80℃    |No dew condensation                          |
※1 For more information of 5V tolerant pins, please look at the section of “5. Pin Assignment.”~
Absolute maximum ratings do not mean the operational limit of BC-USB-Kit. These are actual limits of hardware. If values of inputs exceed the values of these ranges, some part or whole of BC-USB-Kit function would be failed permanently. The failures do not always happen as the values of inputs surpass the ranges. However, please set the input values carefully, and do not exceed the ranges momentally. ~
-Operating Ratings
|           |Minimum|Standard|Maximum|Memo|h
|Power supply voltage  (VBUS)|4   |5   |5.5 |V (BUS bus power supply voltage)|
|H level input voltage|2.3 |    |3.6 |V                  |
|L level input voltage|0   |    |0.9 |V                  |
|H level output voltage|2.8 |    |3.3 |V                  |
|L level output voltage|0   |    |3.3 |V                  |

** Simplified Block Diagram [#p7731897]
The simplified block diagram of BC-USB-Kit is shown below. ~
※ EEPROM and the humidity and temperature sensor is connected via  I2C.~
※ Because of Peripheral Pin Select (PPS), (re)mapping function of PIO, many devices can connect to the peripheral circuit, which is built into PIC.~
※ The modes that this USB 2.0 supports are Low Speed and Full Speed.~

** Names of Parts [#na8f9f5c]
The names of major parts of BC-USB-Kit~
|No|Name                   |Ref|Memo                                                  |h
|1 |ICSP Connection Terminals           |J2 |Terminals that are connected to ICD3 and PICKit3                  |
|2 |Reset Button         |SW1|A switch for resetting PIC                      |
|3 |User Programable Button           |SW2|A user programable switch              |
|4 |User Programable LED              |D1 |A user programable LED                   |
|5 |Expansion Terminals (Pins)         |J1 |To connect to other external devices for expansion             |
|~|~|~|J1 terminals are paired with the opposite side of pins  |
|6 |USBTypeA Connector (Male)|P1 |A connector that connects to a USB port of PC                 |
|7 |LED Power Indicator          |D2 |LED that indicates power supply |
|~|~|~|(users are not accessible)|
|8 |PIC Micro Controller            |U1 |PIC24FJ128GB202  micro controller                      |
|9 |EEPROM                 |U2 |1Mbits EEPROM via I2C access                       |
|10|Humidity & Temperature Sensor           |U3 |Humidity & temperature sensor via I2C access              |
※ LED power indicator (D2) eliminates as power is supplied.~
※ Reset Button (SW1) is connected to the reset of PIC. Once you push down the button, PIC is reset.~
※ Number 1 to 6 terminals (pins) at J1 are paralleled to Number 1 to 6 terminals (pins) at J2.~
   Please use only either pins at J1 or J2. (Never use both these pins of J1 and J2, simultaneously.)~
※ To use the terminals at J1 with a bread board, DIP-28P (a connection IC socket 28P) is required.~

** Pin (Terminals) Assignment [#l64efaa3]
BC-USB-Kit has a set of DIP-28 pin size connection terminals and a set of 6-pin pin-header size connection terminals.~
-DIP-28 pin (terminal) connector (J1)~
|#|Function/Name                                      |Memo                   |  |h
|1 |&font(o){MCLR};                                 |Parallel to J2              |  |
|2 |VIO                                             |Parallel to J2              |  |
|3 |GND                                             |Parallel to J2              |  |
|4 |PGED1                                           |Parallel to J2              |  |
|5 |PGEC1                                           |Parallel to J2              |  |
|6 |NC                                              |                       |  |
|7 |VIO                                             |                       |  |
|8 |SCL2                                            |Exclusive to I2C (2ch)          |  |
|9 |SDA2                                            |Exclusive to I2C (2ch)         |  |
|10|GND                                             |                       |  |
|11|TMS/RPB57/USBID/RB5                             |                       |●|
|12|NC                                              |                       |  |
|13|TDI/RPB7/CTED3/PMD5/INT0/RB7                    |(RB7)                  |●|
|14|GND                                             |                       |  |
|15|GND                                             |                       |  |
|16|TCK/RPB8/SCL1/CTED10/PMD4/RB8                   |(&font(o){UART - CTS};)|●|
|17|CVREFOUT/AN10/C3INB/RPB14/VBUSON/SCK1/CTED5/RB14|(&font(o){UART - RTS};)|  |
|18|GMD                                             |                       |  |
|19|AN11/RPB13/CTPLS/PMRD/RB13                      |(UART-RX)              |  |
|20|AN9/C3INA/RPB15/SCK2/CTED6/PMCS1/RB15           |(UART-TX)              |  |
|21|VIO                                             |                       |  |
|22|GMD                                             |                       |  |
|23|PGED3/VREF+/CVREF+/AN0/C3INC/RPA0/CTED1/PMD7/RA0|                       |  |
|24|PGED3/VREF-/CVREF-/AN1/RPA1/CTED2/PMD6/RA1      |                       |  |
|25|SOSCI/RPB4/RB4                                  |                       |●|
|26|SOSCI/RPB4/T1CK/CTED9/PMA1/RA4                  |                       |●|
|27|VIO                                             |                       |  |
|28|VBUS                                            |                       |  |
This mark “●” indicates that it is a 5V tolerate terminal.~
-6-pin pin header connector~
|#|Name           |Memo     |h
|1   |&font(o){MCLR};|Parallel to J1|
|2   |VIO            |Parallel to J1|
|3   |GND            |Parallel to J1|
|4   |PGED1          |Parallel to J1|
|5   |PGEC1          |Parallel to J1|
|6   |NC             |         |

-- From the number 1 to number 6 pin header of DIP-28 pin connector (J1) is parallel to the number 1 to number 6 terminal at J2.~
When you use a programming tool such as PICKit 3 and MPLAB ICD3, please connect only one tool to either J1 expansion terminals (#1~#6) or J2 communication terminals (#1~#6). Never use  both terminals with programming tools simultaneously. ~
-- VIO is the power supply line for the PIC micro controller and I/O signals.~
This power line supplied DC 5V from the power supply line of USB bus (VBUS).~
-- VBUS is the DC 5V line at the power supply line of USB bus.~
-- Power of BC-USB-Kit is supplied from the USB bus, which is attached to the USB connector of BC-USB-Kit.~
-- The functions of J1 are selected by Peripheral Pin Select (PPS), I/O pin mapping function of PIC24FJ.~
For more information, please read the manual and data sheet of PIC24FJ, which are available at the web site of Microchip Technology, Inc.~

** Expansion Terminals [#s439d135]
BC-USB-Kit has J1, a set of expansion terminals, and J2, a set of ICPS connection terminals.~
J1 terminals are expansion terminals and capable of ICSP function. J2 is specifically designed for ICSP connection.~
The through-holes of J1 expansion terminals are placed at the same size (location) as the 600mil-width DIP-28.~
To use J1 expansion terminals, you can solder the DIP-28 connection IC socket to J1 expansion terminals.~
To attach DIP-28P IC socket, J1 expansion terminals can work with a 2.54mm pitch universal board or a bread board.~

** ICSP [#b200604f]
ICSP terminals are allocated to J1 and J2 in parallel. ~
SW1 is attache to the reset terminal. To push it down, &font(o){MCLR}; becomes L level, and PIC will be reset. ~
As The ICSP connection terminals are available at some terminals of J1 expansion terminals and J2 ICSP connection terminals,~
connect PICKit3 or MPLAB ICD3 for programming and debugging firmwares.~
The number 1 ~ 6 terminals of J1 expansion terminals are parallel to J2 ICSP connection terminals.~
Please use either one set of ICSP terminals when you connect to either PICKit3 or MPLAB ICD3.~
Once you have attached at the one set of the terminals, DO NOT attach anything at the other set of ICSP terminals.~
If you had attached to both sets of ICSP terminals, the programming and debugging process become unstable, nor the whole system does not work at all.~

** USB [#c6053e43]
The USB connector of BC-USB-Kit supports USB 2.0.~
D-/D+ of the USB connector are attached to the PIC micro controller.~
To make the built-in USB module inside PIC effective, you can use the USB connection.~
USB connection speeds that the PIC micro controller supports are Low Speed and Full Speed. USB-ID is allocated to the 11 terminal at J1.~
USB-ID us not allocated to the on-board USB connector USB-ID.~
When you need to allocate USB-ID, please use the 11 terminal at J1 or implement R5 (0Ω) and fix USB-ID.~
If the voltage of power, which is supplied form the USB connector, exceeds the operating rating, the power supply is shut down by the over-voltage protection IC.~

** I2C [#v1fa071e]
BC-USB-Kit is equipped with EEPROM and the humidity and temperature sensor on board, and these are connected to built-in I2C2 module inside PIC.~
Because of these connections, the terminals of I2C2 are reserved to I2C devices and cannot be used for other devices.~
The lines of SDA/SCL are pulled up by a 3.3kΩ on board resister.~
To connect BC-USB-Kit to external devices, please use the listed four pin connectors at DIP-28. Since these pins are lined side by side, you can effortlessly access to the pins.~
EEPROM is a 1Mbit serial ROM. Its I2C device addresses are fixed at 0x50 and 0x51.~
The I2C device address of the humidity and temperature sensor is fixed at 0x40.~
When you add I2C devices externally,  please avoid these reserved I2C addresses.~
|Pin # at J1|Name|Memo       |h
| 7         |VIO |3.3V power supply   |
| 8         |SCL |I2C clock|
| 9         |SDA |I2C data|
|10         |GND |GND        |

** UART [#z135245c]
BC-USB-Kit uses UART at 3.3V -CMOS level.~
To use Peripheral Pin Select (PPS), I/O pin mapping function of PIC, the lines are allocated for devices.~
These terminals can be assigned for other functions if UART function and hardware flow are not specified at these terminals.~
To assign pins for UART, the mapping listed below is recommended. To use the mapping, you can access the pins, which are lined side by side.~
If you wish to use other pins, you can assign other pins to UART.~
To use UART1, please refer the configurations of resisters listed in the table below.~
|Pin# at J1|Name          |Resistor |Value|Memo|h
|15         |GND           |CENTER:-     |GND   |    |
|16         |&font(o){CTS};|RPINR18<13:8>|8     |    |
|17         |&font(o){RTS};|RPOR7<5:0>   |4     |    |
|18         |GND           |CENTER:-     |      |GND |
|19         |&font(o){RX}; |RPINR18<5:0> |13    |    |
|20         |&font(o){TX}; |RPOR7<13:8>  |3     |    |
|21         |VIO           |CENTER:-     |      |3.3V|

** Analog Input [#o1c64137]
To use ADC, which is built inside the PIC micro controller, BC-USB-Kit can do AD conversion.~
The pins listed below are assigned for analog inputs of BC-USB-Kit.~
Since the reference voltage terminals are assigned for other tasks, these are not available for BC-USB-Kit.~
|Pin# at J1|Name|h
|19         |AN7 |
|20         |AN9 |

** Secondary Oscillator [#g7f3a842]
BC-USB-Kit does not have any secondary oscillator.~
To use a secondary oscillator, please input 32768Hz clock at the 26 pin.~

** Primary Oscillator [#yb6afae6]
The 24MHz crystal oscillator is attached to OSCI/OSCO terminal.~
To use this on-board crystal oscillator for the USB function, please configure that 48MHz clock is provided for the USB module , which is built in the PIC micro controller.~
- 4MHz clock will be needed after it passes PLL Prescaler PLLDIV<3:0>.~
Therefore, ÷ 6  (PLLDIV<3:0> = 0101) is selected at PLL Presaler.~
- The frequency of System Clock, which is output from PLL, depends on how to handle 32MHz at CPU Divier CPDIV<1:0>.~

** Reference [#w1132e5a]
- [[PIC24FJ128GB204 FAMILY DataSheet:http://ww1.microchip.com/downloads/en/DeviceDoc/30005009b.pdf]]~
Microchip Technology Inc.
- [[16-bit MCU and DSC Programmer’s Reference Manual:http://ww1.microchip.com/downloads/en/DeviceDoc/70157F.pdf]]~
Microchip Technology Inc.
- [[MPLAB&#174; X IDE User Guide:http://ww1.microchip.com/downloads/jp/DeviceDoc/52027A_JP.pdf]]~
Microchip Technology Inc.
- [[Atmel AT24CM01 I2C-Compatible (2-wire) Serial EEPROM 1Mbit DATA SHEET:http://www.atmel.com/Images/Atmel-8812-SEEPROM-AT24CM01-Datasheet.pdf]]~
- [[Si7020-A10 I2C HUMIDITY AND TEMPERATURE SENSOR:http://www.silabs.com/Marcom%20Documents/Resources/Humidity-and-Temperature-Sensors.pdf]]~
Silicon Laboratories

** Schematics and Layout drawing [#k77e27da]
The schematics and layout drawing of BC-USB-Kit is listed at the end of Japanese version of BC-USB-Kit Manual)~

Also, PDF version of this article is also listed below. Please feel free to download it.~

* Revision History [#d38c7d47]
- 2015-04-02 This article is initially published

Front page   New List of pages Search Recent changes   RSS of recent changes