Pro Micro problem

Hello,
recently i wrote code in which playing with registers and i ended up with something bad.
I have Pro Micro board with leonardo bootloader and i wrote kinda code

in setup i have TIMSK = 0; (for FHT transformation)

then in loop i wrote

TIMSK0 = 0b00000111;

and there ended everything. when i plug pro micro in PC, it says that USB device isn;t recognized.
I thought of using ISP programmer, and reset (?) micro using my arduino via ISP header, but on pro micro there is no MOSI / MISO pins? is there any solution for my problem ?

It sounds like you need to reload the bootloader but that's kind of hard to do with no USB.

recently i wrote code in which playing with registers and i ended up with something bad.

Did you learn anything from the experience ?

Yes, don't do anything without knowing it and when risk factor is less than 10%, but on the other hand can you propose me some solution?

Yes. Buy another one. They're about $5.

Yeah, they are so cheap, but for my situation time plays big role, cause if i buy one, it will take about 10 days to receive, i'll use my arduino board, but it's too big for my proj.

so that's why i asked it, if there is any solution ?

Where are you located ? I've never heard of Gergia . Are you in Geogia, USA ?

Computer Store in Marietta, GA - Micro Center

here it is.

I think you're out of luck .
If you order online from Mouser in the USA, the SHIPPING alone will cost 45 EUROS and the delivery time frame is 2 to 4 days.

If i use my national delivery service, i’ll pay about $1 but it takes 10 days. I’m still interested in if i unmount my atmega32 chip and solder it to another board where i’ll use MISO/MOSI pins, can i refresh chip and all the bits on the atmega32?

https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/troubleshooting-and-faq

See the section: How Do I Reinstall the Bootloader?

Interesting read mrburnette.

To the OP’s question:

pin 15: SCK
pin 14:MISO
pin 16:MOSI

You know where the rest is. The above are from the board design file.

recently i wrote code in which playing with registers and i ended up with something bad.
I have Pro Micro board with leonardo bootloader and i wrote kinda code
in setup i have TIMSK = 0; (for FHT transformation)
then in loop i wrote
TIMSK0 = 0b00000111;
and there ended everything. when i plug pro micro in PC, it says that USB device isn;t recognized.

mrBurnette,
Is what the OP did in above statement from his initial post the same thing the "Unbrick" tutorial said not to do here?

Also, make sure your sketch doesn’t mess with the ATmega32U4’s PLLCSR register, or any other register that sets up USB functionality on the ATmega32U4.

mrBurnette,
Is what the OP did in above statement from his initial post

I would not call it the "same" but LUFA requires access to its interrupt service so that USB functionality is maintained. This is the same for V-USB implementation. Anyway,

I think Nick hit it with interrupts being queued in the above link discussion.

https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/troubleshooting-and-faq

link above helped me alot. thank you guys. all of you. finally my leonardo reseted and works as usual. thank you a lot.

You are welcome. I learned something too. I will get a micro sometime and play with it, now knowing how to fix bricked mcu.

That's great news. We like "Happy Endings" here, especially when the OP is considerate enough to come back and tell us how he fixed it. CONGRATULATIONS ! On your success in raising your micro from the dead AND on being cool enough to post the link that helped you do it. You off to a good start for a Newbie.

Also i almost forget the reason of the problem. my sketch's setup is something like that
TIMSK0 = 0;
ADCSRA = 0xe5; //free running mode
ADMUX = 0x40; //use adc0
DIDR0 = 0x01; //turn off digital input

and when i use delay(T); function it doesn't work, and i think that this is caused by TIMSK0 = 0; So i want to use delay(T); function and that's why i wrote 0b00000111; Is there possibility to make use of this function ?

At this point I think we need your entire program before we go any further.

i did that by adding #include <util/delay.h> and _delay_ms(10);

that is my code for 8 LED

sketch_mar19a.ino (3.09 KB)

It looks like you removed the code that bricked you micro ?

 TIMSK0 = 0b00000111;