NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Support Forum » Can not upload program to the MCU
January 10, 2011 by Troghar |
Hi everyone, I've been playing with the nerdkit for a couple of hours now. I put the kit together and tried uploading and running a couple of the examples provided. Everything was fine until the MCU stopped listening for the program uploads for some mysterious reason. Last program I uploaded was the temperature sensor project and it still works perfectly so I don't think I damaged a component. The only thing I can think of that I did differently is, I used minicom to look at the data MCU spits out to the serial port. I was able to read the temperature readings through the serial port but lost my ability to send programs to the unit. I doubt there's a relation there but as I said that's the only thing that I did differently. This is my whole setup. My power supply is not the prettiest thing in the world but I'm just starting up and I put it together with the parts I salvaged from here and there. This is a close-up to my breadboard When I program the MCU, I simply connect pin 14 to ground and power-cycle the device. When I do that I see two horizontal bars (sort of) on the LCR. Then I simply do a "make" to compile and upload the program which was working just fine. Now all I get is an error message like this: avrdude -c avr109 -p m168 -b 115200 -P /dev/ttyUSB0 -U flash:w:tempsensor.hex:a Connecting to programmer: .avrdude: butterfly_recv(): programmer is not responding make: *** [tempsensor-upload] Error 1 Although it's not related, this is a picture of a little harness I made to hookup the LCD to the breadboard - I think it makes life a little bit easier. Any suggestions will be much appreciated, Thanks |
---|---|
January 10, 2011 by mongo |
change this part "/dev/ttyUSB0 " to "com4" If 4 doesn't work, try 3. You will need to do that in all of the source code and config files. I think the baud rate might be off too but I don't recall. (Haven't done anything with my NK since June due to a laptop crash.) The plugs made from perfboard is the same thing I did. Makes it much neater and easier to use. |
January 10, 2011 by mrkvickasteve |
how are you grounding pin 14? I used the supplied switch and it broke the first day, now I use a jumper wire. second if you are using a PC, you have to change the parameters in the make file like mango said. I just check the com port in device manager before I even assign the com port in the make file to avoid guessing. |
January 10, 2011 by mrkvickasteve |
I am sorry MONGO |
January 11, 2011 by Rick_S |
Another thing to look into, it appears you have the red wire from your usb connector in the pin 1 slot with the jumper to the power (5V) rail and the black wire from the USB is not connected to anything. The following is important if you have the current USB-Serial adapter that NK Provides. (Which it appears you do)
Also, what the prior two stated about changing the /dev/USB0 to comX (with X being the com port number) if you are using a PC is spot on. Great photo's by the way and I like your creativity on the custom cable connectors. They look like they'd work out well. Rick |
January 11, 2011 by Troghar |
First of all, thank you all for your suggestions. Mongo, I'm on a linux box (sorry I forgot to mention) and /dev/ttyUSB0 had been working just fine from the get go. And it still works when I listen to what MCU spits out (while the temp sensor app is running on it). Same type of a deal with the BaudRate. It was working fine the way it is. mrkvickasteve, I was using one of the supplied switches to begin with. But when this problem came up I started using a jumper cable and I connect it directly to ground when I want to send a program. I also checked the switch for continuity though, seems like it works just fine. Plus, I see the two horizontal black bars on the LCD which (if I'm not wrong) means the MCU goes into programming mode. I might be wrong on this. Rick_S, I was going to take a picture of the USB connector but my camera ran out of batteries and I forgot to mention that the RED wire is actually not connected to pin 1. I know, in that picture it looks like it is, but there's no pin on the other side of the connector that connects to pin 1 of the MCU. Thanks for noticing the BLACK wire though. I have no idea how I forgot that. When it was working, it was connected to the ground that's for sure and I'm pretty sure I had it connected to the ground when it stopped working too. But I'll definitely double-check that tonight. Hopefully that's the problem. Again, thank you all... |
January 11, 2011 by Troghar |
Not grounding the BLACK serial cable was the problem. Thanks for catching that Rick_S. |
January 11, 2011 by mongo |
OK... I didn't know about the Linux part... Some times I forget that not everyone is using the same platform. |
Please log in to post a reply.
Did you know that you need to think about wires differently when you're transmitting signals more than a few inches? Learn more...
|