Arduino no longer shows up on a COM port.
I am working on a 200khz 50% waveform generator.
I was working on a sketch and then running the arduino over to my scope to find out where I am at.
I managed to get it to 250khz with this sketch and all was well.
#include <avr/io.h> #include <util/delay.h> int main(void) { pinMode(3, OUTPUT); // output pin for OCR2B pinMode(5, OUTPUT); // output pin for OCR0B // Set up the 250KHz output TCCR2A = _BV(COM2A1) | _BV(COM2B1) | _BV(WGM21) | _BV(WGM20); TCCR2B = _BV(WGM22) | _BV(CS20); OCR2A = 63; //This is the reset point out of 255 count setting the frequency to 200khz. //The higher the number in "OCR2A" the lower the Frequency. OCR2B = 0; //This sets the duration of the pulse, half of the above number is = to 50% on time. } // Set up 8MHz output //TCCR0A = _BV(COM0A1) | _BV(COM0B1) | _BV(WGM01) | _BV(WGM00); //TCCR0B = _BV(WGM02) | _BV(CS00); //OCR0A = 1; //OCR0B = 0; // Make the 250KHz rolling //while (1) { //_delay_us(5); // if ( OCR2B < 63 ) // OCR2B += 5; // else // OCR2B = 0; // } //}
It was working fine, I plugged it back in and changed line 14, to: "OCR2A = 51; //This is the reset point out of 255 count setting the frequency to 200kHz.".
And line 18 to "OCR2B = 26; //This sets the duration of the pulse, half of the above number is = to 50% on time.".
And now the led's light up on the board, but there is no out put on any pins. Also when I reconnect it to the USB, it will not show up on any com port...
I am running win 10, and I tried another Arduino on the same cord, and USB port and it works fine. I shows up on com4.
So before I try and upload this code to the new board does anyone see anything in the code that can harm the arduino?