Pages: [1]   Go Down
Author Topic: "Arduino Micro" + ICSP + Serial Class  (Read 227 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there!

I'm using Arduino Micro1, and I've write the sketch below...

Code:
void setup() {
  Serial.begin(9600);
  while (!Serial);
}

void loop() {
  Serial.print("a");
  delay(1000);
}

It works fine when I upload using the button "->" on IDE: "a", "a", "a"... on serial monitor. But it fails when I upload using my programmer (an usbasp2): the sketch is uploaded successfully, but no "a", at all.

I think that is due to the fact that the "Serial" class is implemented "inside" the bootloader3. And when I use the programmer, it's gone, right?

Is there some way to make it works? I need overwrite the bootloader, but I need, as well, serial communication with the computer through the USB connector.


Thanks!

1http://produto.mercadolivre.com.br/MLB-551587630-gravador-avr-usbasp-atmel-cabo-adaptador-arduino-_JM
2http://arduino.cc/en/Main/arduinoBoardMicro
3http://arduino.cc/en/Guide/ArduinoLeonardoMicro?from=Guide.ArduinoLeonardo#toc6
« Last Edit: May 01, 2014, 03:31:46 pm by marcosmoran » Logged

Atlanta, USA
Offline Offline
Edison Member
*
Karma: 56
Posts: 1848
AKA: Ray Burne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I think that is due to the fact that the "Serial" class is implemented "inside" the bootloader3. And when I use the programmer, it's gone, right?

Is there some way to make it works? I need overwrite the bootloader, but I need, as well, serial communication with the computer through the USB connector.

You could look into incorporating LUFA directly in your code as a library.  If you do try this, you may need your own VID/PID pair if this is a commercial effort.

I understand that Dean has some examples in the LUFA downloads.  Docs are here:
http://www.fourwalledcubicle.com/files/LUFA/Doc/
Logged

Pages: [1]   Go Up
Jump to: