Browse over 10,000 Electronics Projects using the Page Numbering provided at the bottom of each Page.

PIC to PC USB 2.0 interface with FT245BM

PIC to PC USB 2.0 interface with FT245BM

Here is how to interface a PIC18F452 to a PC via the USB port. The PIC captures the ambient temperature with a SPI sensor TC77. Its value is then transferred to the USB-interface.
The windows-pc (98, Me, 2000, XP, 2003) runs a program (C# application, Microsoft Visual Studio .NET 2003) to communicate with the USB interface, which transfers data to and from the PIC18F452.

The USB interface will have to be recognized as a device by Windows. Basically, there are two ways of doing this. Either with a VCP (Virtual COM Port) or with a D2XX (Direct) driver. We will use the D2XX driver here for its high speed. It is more complicated to start up than VCP, but why not going the extra mile?

The FT245BM chip comes with a fixed VID (0403) and PID (6001). We can override this with our own VID (ECDE), PID (0001), our own Product Description (TechDesign USB Device 017) and serial number (FEDC0001). These settings are stored in an external SPI EEPROM 93C46. To program these settings, FTDI made a utility called MProg EEPROM programming utility.

When plugging in for the first time and with a blank (or without) EEPROM, you will notice that the interface is seen as “USB device” and after its driver is installed, it will be recognized as a “FTDI FT8U2XX Device”. Now we can program the EEPROM with our custom settings. To do this, run MProg, open the file 017_USB_id.ept and program (choose “Device”, then “Program”). After this, unplug the interface briefly and plug it in again. It will now be recognized as a “TechDesign USB Device 017”. Acknowledge a couple of times to install it and you are done.

Note that this project will also work without an EEPROM, but in that case you will have to make do with the fixed VID & PID.

Visit Here for more.

 

More Articles to Read

Single-Sided USB Charger
Single-Sided USB Charger
A FPGA controlled RGB LED MATRIX for Incredible Effects – the Hardware
A FPGA controlled RGB LED MATRIX for Incredible Effects – the Hardware
Using Nanotimers to Reduce IoT System Power Consumption by an Order of Magnitude
Using Nanotimers to Reduce IoT System Power Consumption by an Order of Magnitude
Replace a microwave’s beeping with the Windows XP startup sound
Replace a microwave’s beeping with the Windows XP startup sound
A DIY Laser Scanning Microscope
A DIY Laser Scanning Microscope
Reverse-engineering the surprisingly advanced ALU of the 8008 microprocessor
Reverse-engineering the surprisingly advanced ALU of the 8008 microprocessor
ESP8266 LED lighting: QuinLED v2.6 PCB
ESP8266 LED lighting: QuinLED v2.6 PCB
Switching LVDS Graphics in a Laptop Computer
Switching LVDS Graphics in a Laptop Computer
Teleknitting: TV-based string art
Teleknitting: TV-based string art
DIY Bubble Machine
DIY Bubble Machine
Start your day with Nerf target practice!
Start your day with Nerf target practice!
Teardown of a Peaktech 6225A
Teardown of a Peaktech 6225A

Top




Shares