Hi everyone, I have a little problem. I was trying to upload a bootloader then the sketch on a new 328P but failed.
First I used this tutorial Adafruit ISP Tutorial, which I have used in the past and it worked great, but I mistakenly didn't connect D9 on the arduino to pin 9 on the chip but the corresponding pin to D9(pin 15) on the chip, and it didn't work(I haven't tried to make the proper connections yet). I decided that it doesn't work because I have everything on the PCB so I decided to to follow another tutorial ArduinoISP, so I connected the chip with the crystal, capacitors and everything to a breadboard including a 10uF capacitor from reset to GND, and it still didn't work.
The next day I tried to upload the Arduino ISP sketch to the UNO and it gave me the following error:
avrdude: stk500_getsync(): not in sync: resp=0x00. I have seen this error before but only when I haven't had installed the USB drivers. The day before that I got another error which in the end was 0xe0 instead of 0x00 and I found out that I can fix it with pressing the reset button(but I still couldn't upload anything to the new chip).
I have searched through the forum and did the following:I deleted everything arduino related in my pc(program files and such), reinstalled the IDE,when I pluged the UNO in it showed me that the PC recognizes it, I made the loop test,I short-circuited the pins of the mega8u2, I changed the USB cable and I watched closely what happens with the RX,TX pins when trying to upload something, also I tried shift + upload but it gives me the usb not found error.
The RX and TX pins are acting like this: When I made the loop test when I press enter to send something both of them flash on once and I don't get a echo back. When I try to upload a program the RX pin only flashes 3 times.
I don't know what or if I have damaged on the board/chip but I'm 99,9% sure I haven't short circuited both my 328P(the one on the UNO and the new one) since the old one worked on the board. If it matters on the PCB I have, there is a crystal with capacitors and almost every pin is connected. I am not using pins 2 and 3, and pins 16 to 19 have a separate connector so they are not influenced by anything.
I hope someone can help me with this problem. As I said I have done this before successfully but now I just don't know what happened. (P.S. Worst case scenario, my new UNO, MEGA2560 and ProMini are coming in just 2 weeks
)