i have a pro micro 3.3v/8Mhz (DEV-10999).
I have installed all the drivers etc., and the IDE 1.0.1 as per info on forums and the board has been working absolutely fine for some time.
However, i recently had an upload failure, and now i can no longer upload at all. If i try and upload a sketch it gets approx 80% of the way in then hangs.
Eventually i get a message:
Binary sketch size: 4,368 bytes (of a 28,672 byte maximum)
avrdude: ser_send(): write error: sorry no info avail
I have tried all the obvious fixes (board is set correct in the IDE, serial port is set correct, i have re-booted the PC, i have deleted and re-installed the SparkFun ProMicro8MHz driver etc).
The exact same setup will successfully program a Pro Micro 5v/16MHz board (once i switch the board & com port in the IDE).
The program i uploaded is listed below - a first attempt to do something with timers and interrupts. A modified version of code i found on the web. Could it have screwed the pro micro up??? (e.g i notice i left the wrong interrupt vector in there). Can anyone give me any help to get it going again?
Many Thanks,
Paul.
#include <avr/interrupt.h>
#include <avr/io.h>
int ledPin = 17;
int int_counter = 0;
volatile int second = 0;
int oldSecond = 0;
long starttime = 0;
ISR(TIMER2_OVF_vect) {
TCNT1 = 0;
int_counter += 1;
if (int_counter == 1000) {
second+=1;
int_counter = 0;
}
};
void setup() {
Serial.begin(115200);
Serial.println(“Initializing timerinterrupt”);
TCCR1A = 0x0;
TCCR1B = _BV(CS11);
TCCR1C = 0x0;
TIMSK1 = _BV(OCIE1A);
OCR1A = 1000;
TCNT1 = 0;
sei();
starttime = millis();
}
void loop() {
if (oldSecond != second) {
Serial.print(second);
Serial.print(". ->");
Serial.print(millis() - starttime);
Serial.println(".");
digitalWrite(ledPin, HIGH);
delay(100);
digitalWrite(ledPin, LOW);
oldSecond = second;
}
}