1
\$\begingroup\$

I have an Arduino UNO (R3) with its main chip and main crystal oscillator accidentally destroyed, but everything else is working I presume.

I started learning PIC (16/18f) and was wondering if I could use the on-board FTDI Atmega 16u2 to program or speak serially to my PIC, as a separate FTDI chip would? (i.e. TX/RX pin headers -> appropriate pins for serial on PIC) Are there any caveats to using it, if so, compared to an FTDI? Would the USB interface work as-is with a computer and be recognised just as it was with the Arduino?

\$\endgroup\$
  • \$\begingroup\$ A link to the data sheet would help. \$\endgroup\$ – Andy aka Feb 19 '14 at 11:02
  • \$\begingroup\$ uhh, here's a schematic of the Arduino: arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf - I'm ignoring the PIC's capabilities, I'm just wondering if I can use the FTDI as if it were a separate chip, as if I purchased it for the PIC to have USB-serial interfacing - looks like maybe I can use it, looks like a separate crystal...but any caveats? \$\endgroup\$ – Alexander Feb 19 '14 at 11:03
  • \$\begingroup\$ There is no FTDI chip, the USB<->UART converter on board is an ATmega16U2 microcontroller. You can always buy a CP2102 converter board from ebay for less than $2. \$\endgroup\$ – alexan_e Feb 19 '14 at 11:05
  • 1
    \$\begingroup\$ The 16U2 is the line interface and MCU rolled into one. \$\endgroup\$ – Andy aka Feb 19 '14 at 11:06
  • \$\begingroup\$ Oh, hmm.. Would that interface work to speak to my PIC, as a separate FTDI chip would do? or is it more specific to the Arduino? \$\endgroup\$ – Alexander Feb 19 '14 at 11:18
3
\$\begingroup\$

We don't know if ATmega16U2 is damaged or not but assuming it isn't you can use it as a generic USB<->USB.

According to this FAQ

The Uno has changed that by exchanging the FT232RL chip with an atmega8u2 chip. There are a few things that are possible with this new chip but before we discuss that lets make it clear that by default, this chip acts identically to the FTDI chip that it replaces. It's just a USB-serial port!

One improvement in updating the chip is that, previously, Mac users needed to install FTDI drivers. The 8u2 imitates a 'generic' CDC serial device. So now, Mac users do not have to install a driver. Windows users still need to install the .INF file but luckily there are no drivers. This means there will be fewer problems with new versions of windows. There is no way to have a serial USB device that doesn't require an INF file in windows

So is will be enumerated as a virtual serial port, you just need to locate the port number in the hardware panel of the PC.

Also note that the Rx/Tx are connected to two pins of the header but at the same time are connected to the damaged MCU so maybe that will be a problem altough I doubt it.

(red/blue are the Rx/Tx lines) enter image description here

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Ah, awesome! looks like I can make an interesting PIC18duino for my needs and learning with bootloader and such. The two parts were desoldered by me and destroyed, unrelated damage to the actual board itself. Guess I can use the arduino-skeleton as a fat ftdi-clone for the time being, will accept tomorrow once tested and if it works. \$\endgroup\$ – Alexander Feb 19 '14 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.