Go Down

Topic: "Arduino Micro" + ICSP + Serial Class (Read 234 times) previous topic - next topic

mrburnette

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/

marcosmoran

#1
May 01, 2014, 10:28 pm Last Edit: May 01, 2014, 10:31 pm by marcosmoran Reason: 1
Hi there!

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

Code: [Select]

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

Go Up