Comments: Pro Micro & Fio V3 Hookup Guide

Pages

Comments 24 comments

  • ——————– Tech Support Tips/Troubleshooting/Common Issues ——————–

    Bricked Pro Micro? (i.e. your Pro Micro disappeared from your Device Manager)

    Having trouble uploading and you are using the watchdog timers? Well, the watchdog timer might be interfering with your Atmega32U4’s CDC driver. The timing probably is causing the Pro Micro to not enumerate properly with your computer after uploading your code. I do not use watchdog timers but from customer cases that I have seen, the Atmega32U4s have issues uploading after using the watchdog timers. To recover, try using the double reset method as explained through here https://learn.sparkfun.com/tutorials/pro-micro–fio-v3-hookup-guide/troubleshooting-and-faq .

    Here is a more in depth tip on recovering Atmega32U4s with different bootloaders:

    5V/16MHz Pro Micro [ https://www.sparkfun.com/products/12640#comment-55dde917757b7f86028b4567 ]

    3.3V/8Mhz Pro Micro [ https://www.sparkfun.com/products/12587#comment-55dde9bfce395f63078b4568 ]

    3.3V/8MHz LilyPad Arduino - USB [ https://www.sparkfun.com/products/12049#comment-5776e6e2757b7f46478b4567 ]

    Pro Micro Not Executing Code w/ Remote Power?

    If your Pro Micro works on a computer but does not when you power it remotely with a external power supply, it’s possible there is a piece of code waiting for a a serial connection before the rest of the code executes. Makes sure that you do not have this in your code when the the Atmega32U4 is not connecting to a computer’s COM port:

    setup():
        while(!Serial);
    

    This might work on an Arduino Mega2560, but the CDC port of the Atmega32U4’s design might be causing the microcontroller to get stuck in the loop.

    Issues Installing the Drivers?

    I just tested a 5V Pro Micro on a Windows 10 and I did not have any issues installing the drivers. The driver files do not indicate it is for Windows 10 but it somehow was able to still work. I recommend trying to follow the instructions listed on the hookup guide for more information => https://learn.sparkfun.com/tutorials/pro-micro–fio-v3-hookup-guide#installing-windows . The only difference is that you are using signed drivers. Therefore, there will not be a pop up window with a warning message that shows up. By unzipping the downloaded files, you will find the signed drivers probably in a location similar to this:

    C:\...\Arduino_Boards-master\Arduino_Boards-master\sparkfun\avr\signed_driver
    

    Try using the latest drivers in GitHub if you still have issues => https://github.com/sparkfun/SF32u4_boards/tree/master/sparkfun/avr/signed_driver

    USB Port Issues and Drivers

    You can have issues using the Pro Micro if you are connecting to a USB3 port. The drivers will not install correctly unless they use a computer with USB2.0 port.

    There was an issue when a customer was using it on a Windows 7 64-bit OS. When connecting to a USB3 port the Pro Micro can report the hardware ID as:

    USB\VID_1B4F&PID_9206
    

    When connected to a USB2 port the Pro Micros should report the hardware ID as:

    5V/16MHz

    USB\VID_1B4F&PID_9206&REV_0100&MI_00
    USB\VID_1B4F&PID_9206&MI_00
    

    3.3V/8MHz

    USB\VID_1B4F&PID_9204&REV_0100&MI_00
    USB\VID_1B4F&PID_9204&MI_00
    

    The current version of the SparkFun FioV3 should be:

    USB\VID_1B4F&PID_F101&REV_0100&MI_00
    USB\VID_1B4F&PID_F101&MI_00
    

    Arduino Error

    If your Pro Micros were working initially and then you have this error output after updating to Arduino v1.6.9, you might need to uninstall/delete the preferences.txt file:

    .
    .
    .
    exec: "avr-g++": executable file not found in %PATH%
    Error compiling for board SparkFun Pro Micro 5V/16MHz
    

    There was a case where a customer had to reinstall Arduino IDE v1.6.9 a few times before getting their code to compile

    “To clean uninstall or reinstall, after doing Windows Uninstall, you have to rename or delete the preferences.txt file. Its path is given at the bottom of the File->Preferences dialog…”

    Pro Micro with Visual Studio

    An alternative to programming the Arduino IDE is using Visual Studio. A customer was able to upload code to their Pro Micros using Visual Studio. Here are some tips from the customer:

    “The Visual Studio IDE (C++ installation with Visual Micro Arduino add-on) is significantly easier to use than stock Arduino IDE. Furthermore, unlike Arduino which compiles all files every time, Visual Studio recompiles only changed source files, greatly speeding up the debug/test cycle. The Visual Micro Arduino add-on will work with the ProMicro provided ProMicro already works with the Arduino IDE (Arduino 1.0.6 is known to work with ProMicro and with VS2010). The Visual Micro add-on requires Arduino software to be installed because it invokes their gnu cross-compiler and linker. For BlinkProMicro to run: a) do not select a programmer as suggested by the Visual Micro site, and b) to see serial data appear in the monitor, be sure to check DTR at the bottom of the monitor window.”

    Problems Opening a COM port on Linux

    There was a customer that had an issue on their Ubuntu Linux preventing them from accessing the enumerated port when a Pro Micro was connected. There is a fix by configurating some settings. Check below for more information:

    “On Ubuntu Linux, the modem manager was grabbing the Pro Micro as soon as it was plugged in, preventing anything else, such as the Arduino IDE from being able to open the port. This is apparently a known issue, but I had to go search it down, as there is no mention of it here…

    Fix:

    sudo echo 'ATTRS{idVendor}=="1b4f", ENV{ID_MM_DEVICE_IGNORE}="1"' > /etc/udev/rules.d/77-arduino.rules
    

    I found the explanation and fix on http://starter-kit.nettigo.eu/2015/serial-port-busy-for-avrdude-on-ubuntu-with-arduino-leonardo-eth/"

    Issues Uploading on Linux

    If you have problems uploading code with this error using the Pro Micro on a Linux machine:

     avrdude: ser_recv(): programmer is not responding
     avrdude: butterfly_recv(): programmer is not responding
    

    try following these instructions from Arduino => http://forum.arduino.cc/index.php?topic=217910.0. They need to change some udev rules. There was a customer had the same problem but got it working after changing the settings.

    Arduino IDE Automatically changing COM ports

    If you are using a device with the Atmega32U4 (like the Pro Micro or Arduino Fios) Arduino v1.6.3 will keep the same COM port after uploading. If you upload code using Arduino v1.6.5, the IDE will switch the COM port automatically when it is in bootloader mode. Once the sketch runs, the Arduino IDE v1.6.5 will not automatically switch it back to the COM port that the sketch runs on. You need to manually select the COM port if you want to upload or use the serial monitor.

    Uploading with XBee Attached to FioV3

    When an XBee is attached to the FioV3, you are able to still upload code. Looking at the Eagle files, the USB data lines are tied to the USB data pins of the Atmega32U4. This should be a separate line compared to the hardware UART lines that the XBee is attached to. The Atmega32U4 communicates with the hardware UART pins with the serial and serial1 functions. I tested this case 4 times and was able to still upload code to the FioV3 and connect to the XBee through the XCTU.

    Sending Characters through XBees with FioV3’s Header Sockets

    Not seeing serial data when an XBee is attached to the FioV3? Make sure to use the correct function as stated in Example 1 of this tutorial. Feel free to use this modified serial passthrough code based on some of Jim’s example codes [ https://github.com/bboyho/Atmega32U4Serial_Passthrough/blob/master/Atmega32U4Serial_Passthrough.ino ].

    • Old FioV3 Drivers

      If you are having issues installing the driver files from the GitHub repository, it’s possible that you have an older version of the FioV3 [ https://www.sparkfun.com/products/retired/11017 ]. If you look at the older FioV3’s “hardware ID” in the device manager, it can show up as:

      USB\VID_1B4F&PID_0004&REV_0100&MI_00
      USB\VID_1B4F&PID_0004&MI_00
      

      This indicates that it was using the older bootloader. Try using the old drivers [ http://cdn.sparkfun.com/datasheets/Dev/Arduino/Boards/Fiov3-10-8-12.zip ]. The SparkFun FioV3.inf unsigned driver file will include the old FioV3’s VID and PID.

      Using Old Board Add-On

      Arduino v1.0.6 would be the best to use with the older FioV3 add-on files. I tested it on Arduino v1.6.5 but I was not able to see the board files due to the different structure requirements. One problem that I had initially was that I was not able to upload code with the Fiov3-10-8-12 add-on that was available. You need to make sure to uncomment the “Fio v3 (Diskloader)” board definition. Just go to the boards.txt file located in the …Fiov3-10-8-12\FioV3 folder and remove the “#” between lines 27-41:

      fiov3L.name=Fio v3 (Diskloader)
      fiov3L.upload.protocol=arduino
      fiov3L.upload.maximum_size=28672
      fiov3L.upload.speed=1200
      fiov3L.bootloader.low_fuses=0xde
      fiov3L.bootloader.high_fuses=0xd8
      fiov3L.bootloader.extended_fuses=0xcb
      fiov3L.bootloader.path=diskloader-Fio
      fiov3L.bootloader.file=DiskLoader-Fiov3.hex
      fiov3L.bootloader.unlock_bits=0×3F
      fiov3L.bootloader.lock_bits=0×2F
      fiov3L.build.mcu=atmega32u4
      fiov3L.build.f_cpu=8000000L
      fiov3L.build.core=arduino-old
      fiov3L.build.variant=fiov3
      

      Installing the New FioV3 Bootloader

      If you want to upgrade to the latest firmware and use the old FioV3 with the new Arduino IDEs, you can reinstall the Caterina-fio.hex bootloader on a FioV3 using an AVR MKII Programmer. The fuse bits are the same so you do not need to configure them on the old FioV3. You just needs to connect the AVR programmer to the ICSP pins of the FioV3, erase the flash that is in the firmware (this should happen automatically when flashing the new firmware), flash the Caterina-fio.hex file, and then set the lock bits to 0xCF:

      FioV3’s Hardware ID After Reinstalling

      The unsigned driver that was used in Fiov3-10-8-12 should still work and the FioV3’s hardware IDs will display on your device manager as:

      USB\VID_1B4F&PID_F100&REV_0001
      USB\VID_1B4F&PID_F100
      

      You can also use the sparkfun.inf signed drivers that are listed in the GitHub repostory [ https://github.com/sparkfun/Arduino_Boards/tree/master/sparkfun/avr/signed_driver. Just make sure to uninstall and delete the driver before reinstalling the new drivers.

      Board Add-On with New FioV3 Bootloader

      After reinstalling the bootloader, I uploaded example code to the FioV3. Both the GitHub repository FioV3 add-on using Arduino v1.6.5 [called SparkFun Fio v3https://github.com/sparkfun/Arduino_Boards/blob/master/sparkfun/avr/boards.txt ] and the older Fiov3-10-8-12 add-on using Arduino v.1.0.6 [ called Fio v3 (Leonardo) ] was able to upload the example code.

  • With Arduino 1.6.6, the Arduino add-on package that is linked by this tutorial has some deprecated path variables that can be fixed, but you can avoid this issue by following the instructions for the adding sparkfun’s boards to the board manager and using that to install the Arduino add-on here: https://github.com/sparkfun/Arduino_Boards

  • The V1.3B (Pro_Micro_v13b.pdf) schematic identifies D9 shared with A8, but the Hookup Guide shows D9 shared with A9, and D8 shared with A8. There is no A9 on the schematic. Can anyone help clear up the confusion please? Thanks

    • Sorry about the confusion. I remember digging into the port names, pin numbers, Arduino board definitions and following traces around the board files trying to figure that out because the schematics were so confusing (we are working on cleaning those up). The result ended up in the Graphical Datasheets. But the short answer is D9=A9 and D8=A8

  • Correction to guide: TXLED1 turns off LED… not on…

  • Hi,

    i ve a little problem with the pro micro. it always connects as usb-hid-device :

    Bus 001 Device 089: ID 2341:8036 Arduino SA Leonardo (CDC ACM, HID)
    

    when i double shorten rst & gnd it will be for 8seconds:

    Bus 001 Device 092: ID 2341:0036 Arduino SA
    

    but there is no /dev/ttyUSBx so i cant select a port in ARDUINO 1.6.8 (tools\port\serial ports are grayed there are only tools\port\“/dev/ttyUSB0, /dev/ttyUSB1”) if i connect a arduino uno or via ftdi an arduino mini i’ll get “/dev/ttyUSB2” and i can program it.

    i also tried this: sudo echo ‘ATTRS{idVendor}==“1b4f”, ENV{ID_MM_DEVICE_IGNORE}=“1”’ > /etc/udev/rules.d/77-arduino.rules but no success =(

    i can see with dmesg how the MICRO switches (disconnect after 8sec and reconnect as HID-Device). Perhaps i forgot a special kernel option (make menuconfig)

    thanks for help

  • Hello, I am not quite sure why, but the current release of the Arduino IDE (1.6.7) is throwing the following error:

    exit status 1 ‘Keyboard’ not found. Does your sketch include the line ‘#include <Keyboard.h>’?

    Thoughts?

    • Figured it out. The example code assumes you don’t have to include any libraries. It says that in the text above the sample code. That appears not to be the case.

      Make sure you add:

      include “Keyboard.h”

      to your sketch.

  • Is there any way to get the Pro Micro to work with 64 bit Windows 7? The only drivers I can find are for 32 bit systems.

    • The drivers should work fine on either. I think most machines at SparkFun are 64-bit Windows 7 and we haven’t had any problems. If you are having problems getting the posted drivers to work email techsupport@sparkfun.com and they can help you get it working.

      • When I try to install the drivers suggested I get, “Windows has determined the driver software for your device is up to date.” or “The folder specified doesn’t contain a compatible software driver…”

  • my mac is not recognizing the fio v3. I am running yosemite - any ideas on how I can get it to recognize?

  • I goofed :-(, excellent tuto !

  • What is the type of the USB connector? There are several types of the mini and micro. Thanks

  • I’m a bit confused on the FIO hookup guide. I was under the impression the I2C connections are on A4 & A5. Though the image shows them on D2 & D3. Which is correct?

    • D2 and D3 is correct for this version of the FIO; it uses the ATmega32U4, which has those pins assigned to I2C.

      You’re right that any Arduino that uses an ATmega328 (like the Uno, Pro Mini, Pro, etc.) would have the I2C pins on A4/A5.

      • So a got a couple of the Sparkfun 32U4 v3 FIOs, imagine my disappointment when I noticed what appeared to be a slam dunk for mounting an Adafruit ADC 16 bit analog board straight on top, only to find the SDA and SCL were swapped!

        Any suggestions for swapping the pins short of artful soldering of a miniature metal helix?

  • It looks like pins 14 and 17 are swapped on the hookup guide (hopefully not swapped on the board!).

    Can you confirm/deny this is the case?

    • Ahhhh…. The short answer is all the boards work correctly. Somewhere along the line something got mislabled (it might be on the actual part). I think the current boards/schematics are all correct though. On the Fio the ISP header works, on the Pro Micro the SPI pins are all there. Otherwise I suggest ignoring the labels and just seeing what works.

      • I should clarify: the blue pin numbers on the hookup guide (not the board) look swapped. So maybe just needs a photoshop on the image to avoid confusion. Suspect the board is fine and the graphic is just mistaken.

  • As mentioned in this tutorial the Arduino add files on do not work for Arduino V1.5. I have fixed this and put up a set of files that work with Arduino V1.5.5 These are available from http://www.forward.com.au/pfod/ArduinoProgramming/FioV3/index.html


If you've found a bug or have other constructive feedback for our tutorial authors, please send us your feedback!