Go Down

Topic: Arduino Micro is a pain (Read 711 times) previous topic - next topic

ryardman

Feb 24, 2013, 06:33 pm Last Edit: Feb 24, 2013, 06:40 pm by ryardman Reason: 1
I have been using the Arduino UNO rev3 boards for weeks with no problems.  I recently purchased an Arduino Micro (AM) and have nothing but problems with it.

1. plugging the AM in to a USB com port makes my windows 7 (64bit) device mgr go a little crazy.
a. devmgr sees the AM and assigns it to com9, then refreshes and see it on com10, then refreshes again and see it on com9 again.

2. If I plug in the AM, then start Arduino IDE, the IDE locks up on starting. If I unplug the AM, the the IDE completes it loading.

3. If I plug the AM in to the USB port with nothing attached the AM, just the micro-usb plug, A-IDE sees it on com9.
a. then I upload a sketch, while it is uploading windows 7 is beeping as it loose sight of com9, them com10 is active, then com9 is active again and the sketch is done uploading.
b. Now I plug the AM back into my breadboard and open the serial monitor and it starts to work but then stops.

Why does the Arduino Micro act like this with the com ports, when the UNO does not?

I find the using the AM is a pain in the butt or just does not work at all.  Am I missing something here?

Note: the AM seems to work fine with the example Blink sketch.  But if I have any of the ICSP pins hooked to something, like a display, SD card or RF module, the AM just does not want to work properly.  Is the AM sharing the ICSP with the micro-usb plug?  Does the UNO have a separate set of serial pins and that's why using my same sketch works fine on the UNO?

Thanks
-=Ryan

Erdin

I don't know about the pins, you have to check that yourself.
http://arduino.cc/en/Main/ArduinoBoardMicro
http://arduino.cc/en/Main/arduinoBoardLeonardo
http://arduino.cc/en/Main/arduinoBoardUno

The COM port going on and off is normal. That is how it is designed.
The Arduino Leonardo and the Arduino Micro are for keyboard and mouse emulation.
The serial communication is a software serial port on the same USB connector as the emulated keyboard and mouse.

This "get started" page should explain it, http://arduino.cc/en/Guide/ArduinoLeonardo

James C4S


Why does the Arduino Micro act like this with the com ports, when the UNO does not?

Because their USB communication in implemented in very different ways.

The Uno (and most other) Arduino boards have a dedicated on-board usb to serial chip.  This means the moment it powers up, it looks like a Serial device.

The Micro (and Leonardo) are based on the ATmega32u4.  These microcontrollers have USB built-it USB hardware which wake up not knowing what to do.  So they appear as one type of USB device to the PC until the bootloader starts running, at which time, the chip re-enumerates as a Serial device.


Is the AM sharing the ICSP with the micro-usb plug?

No.


Does the UNO have a separate set of serial pins and that's why using my same sketch works fine on the UNO?

USB communication on the Micro/Leonardo uses no pins external (to the microcontroller).  The Uno's ATmega328, on the other hand, does use pins 0 and 1 to communicate with the on-board USB to Serial chip.  Neither has anything to do directly with the ICSP pins.



The Arduino Leonardo and the Arduino Micro are for keyboard and mouse emulation.

This is not the only function of the Micro/Leonardo.  It is just one of of functions that the Arduino Library implements making using of the ATmega32u4's flexible USB hardware.  The team saw that many people wanted to emulate a variety of USB devices. The Leonardo/Micro make it much easier to do this than compared to other Arduino boards.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

ryardman

Thanks guy for your replies!  These explanations help a bunch!

-=Ryan

James C4S

If you are using serial communication on the leonardo, add this after the begin.

while (!Serial); // Leonardo Only

It will pause execution until USB is ready.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Go Up