The Situation: So I have been using the Uno for 6 months now and everything has been fine. However, a day ago I connected my Uno to my laptop and I got an error after I uploaded saying that the sync AVR dude was wrong and it could not talk to my Uno. After looking at the ports menu in the software I realized that the computer was not reconizing my uno. Com4 which is the port on my laptop the uno connects to was not showing up.
My Attempts to solve the solution: Firstly, I tried hooking up the uno to my desktop computer, which reconizes the Uno on COM3. Amazingly this worked, I could upload code ect. So thinking that there was nothing wrong with hardware, I went back to my laptop to trouble shoot what happened.
Next, I hook into my laptop and guess what, it reconizes COM4, the port on my laptop, and I can upload code again. So, I am trying to run a program that uses interrupts to count clicks comming from some digitial logic synchrnous flops and a XOR Gate. To test this, I wanted to read the number of counts on the serial ports. I do this and upload the code, using my laptop. Guess what, the variable I called "Count", displays on the serial ouput as constantly incrementing eventhough I haven't triggered the count via the digitial hardware (FLOPS and XOR Gate). So, I start thinking there is something wrong with the serial communcation. Guess what, I start jiggling around with the USB cable that connects directly into the UNO board and the number that was incrementing like crazy (OVERFLOWING on the serial port) stops when I pressed the USB connector (HARD) into the connector on the UNO. So now I'm thinking it is connectivity issue but I'm only 50% confident. By the way, guess what, I have do this entire test with out even hooking up the Uno to any digital hardware at all, the USB cable is the only cable hooked into the UNO.
Next, I went back to my desktop to see if the same problems occur when I press the USB cable in (HARD) into the USB Connector on the UNO board. The number on the serial port would overflow (behave wrongly) when the USB cable was lose and would stop (Behave correctly) when I shoved the cable in (HARD). It seems like the Serial connection is going "IN AND OUT".
In addition, I notice that when the USB Cable is not shoved in (HARD) the computer (MY Laptop) does not reconized the UNO in COM4 at all, but when the USB cable is shoved in (HARD) is does reconize the Uno at COM4. Also, I have noticed that certain USB ports on my Laptop work better than others when it comes to getting the lap top to work.
My main problem is that I can isolate the problem to my lap top because it occured on both my desktop and laptop. Additionaly, this entire thing is very strange because I was using the UNO with out anyissues about 1.5 -2 weeks ago and had not problems like this what so ever.
I'm almost sure this is not a software issue because I have written similar code before to read a rotary encoder.
Anways I think maybe there is loose cable? I need to know if this has happend to anyone else before, I hope its not a hardware issue. Any suggestions? Thank you