Wednesday, August 3, 2011

PIC24 USB + Serial Development Board

Two main emphasis of this board are USB and Serial as well as using socketed components.  The 28-pin PIC24FJ64GB002 can perform as either a USB host or USB device, using jumpers to select between the connected USB socket.  The USB jumpers are also configured so when the PIC is USB host using the USB-A connector to attach a thumb drive, the USB-B connector may be configured to attach to an FTDI FT232RL chip to act as USB serial.  Using a USB-A to USB-B adapter, both the PIC and the FTDI chips could be active as USB devices. 

Two serial channels are jumpered for either RS-485 or RS-232 (DB-9 connectors not shown), or the second serial channel can be jumpered to the FTDI USB serial connection.  As configured here, RS-485 uses RX/TX with RTS to select whether reading or writing.  RS-232 can use RX/TX with CTS/RTS.  The ICSP (in circuit serial programming) connection in the lower left works with ICD or PICKit programmers, and shares the lines that provide CTS/RTS, so jumpers are provided to choose between those functions.  The PIC24 has quite a few 5V tolerant inputs, but I ran out of enough of them, so a 5V/3V3 logic level conversion board is socketed to read the CTS lines at 3.3V from the 5V MAX232 and MAX233

Voltage regulators are included to power 3.3V and 5V buses, accepting power from USB or 7V-12V external power.  Each module has a power jumper to effectively disable them.  The USB sockets have jumpers to selectively attach power to the 5V bus.

One SPI channel is also configured, allowing connection of features such as a micro SD card and/or SPI Ethernet.  This board specifically supports connection of a Microchip's PICtail Ethernet (ENC28J60) board.   


  1. Hi DaveVW,

    I am presently working with PICtail Ethernet board. I am confused with the pin configuration on J2 port. So can you please help me to sort it out.

    1. Looking at the Ethernet PICtail Daughter Board Info Sheet, and from memory, the important pins are:

      Ethernet CS = RB3,
      EEPROM CS = RB4,
      SCK = RC3,
      SO = RC4,
      SI = RC5

      Make sure the chip selects (Ethernet CS and EEPROM CS) are not both grounded, nor either left disconnected. Pull the unused EEPROM CS high to disable the EEPROM. RESET can probably be left disconnected, best to pull high if unsure.

      Also make sure to power and ground the board using one of several methods, and be sure to have a common ground between your boards. Common power would be good too. The Ethernet board can source power to your circuit.

    2. Link should have been Ethernet PICtail Daughter Board Info Sheet and note that the pins for the 14x2 connector seem reversed that farthest away row is now closest row when you traverse one from the silkscreen on the PICtail PCB to the end of the right angle connector, so be careful to connect the right pins.

  2. Thank you for your reply and help...
    One more doubt is in determining MAC address of ENC28J60.

    First three bytes are 00 04 A3
    For last three bytes it says to determine it from the sticker on the back side.

    But the board has two stickers ..
    One says
    [ Ethernet ID ]
    [ 9916 ]

    and the other says
    [Assy# 02-01841-R5 Serial# BUR113713017]

    which number should i use to determine MAC address?

    1. 9916 decimal is 26 BC hex,
      so resulting MAC is 00 04 A3 00 26 BC

      Weird process, I know.

  3. I am developing a usb host interface to read a pendrive , do you have an example in mplab about this ?

    1. Microchip has had a library of examples you can install and use in MPLAB. USB drive should be one of them.