I bought an atmega328p chip a while ago and made my own diy arduino on a breadboard. Im using an avrisp mkII to burn the bootloader through arduino and all seems fine up until that point.
Problem is the led on pin 13 starts to blink right away without delay and I do not get three blinks first when pressing the reset button as im supposed to according to some research.
Tmhe tough one that I cant figure out is that I dont get any communication/response when trying to upload sketches through my ftdj usb-serial cable. arduino allows me to select it from the serial port menu. I have added an led to each the rx and tx pins to see if there is activity when pressing upload but there is not and I have tried pressing the reset button at different time intervals to no avail.
I then added a wire from the rst pin on the cable (green) to pin 1 on the chip to make it "auto-reset" compatable.
Im running ubuntu 10.10
Arduino0022
Any help is greatly appreciated.
Im a newbie to arduino so forgive me for any dumb/obvious things I'm overlooking.
Problem is the led on pin 13 starts to blink right away without delay
Blinking without delay? So the LED is on solid?
Sorrry should have been a little clearer... The blinking sketch runs right away. One sec on one sec off... When I add power to the board there supposed to be a three quick flashes of the led and 6-10 sec delay "bootloading" (not sure which order) befors the sketch is run. I read somewhere that when burning bootloader itll blink the led like the 'blink' sketch as a visual tnat the bootloader burned successfully.... I also get a msg saying there was no response from the programmer when tryimg t ok upload a sketch... Which is tied into the no co,munication problem
Is arduino sending data to the chip first and then waits for a response or vise versa?
Just to have everyone on the same page and know what my set-up is. I followed the instructions from this guy. With the addition to the led's for the rx and tx pins...
Instead of using the usb-serial board I'm using a FTDI usb-serial cable that I got from sparkfun. Its a ttl-232R-3v3.
When I add power to the board there supposed to be a three quick flashes of the led
I believe that depends on the bootloader you installed. Which bootloader did you install?
If you use the "FTDI cable" you have a problem. At least on linux the avrdude version that comes with the IDE doesn't toggle the RTS line (and that's what the cable uses).
I hope that the 1.0 release of the IDE will have the updated avrdude 5.11 and will use '-c arduino' for uploads. This lets avrdude reset the chip directly and it will toggle both RTS and DTR both on windows and on linux.
You also need a construct like this to reset the chip, not just a straight wire.
Thanks for the tip. I'll make those alterations. I tried several 328 bootloaders but I'm focusing more on the duemilanove with 328 chip in it.
Is there a way to update/ work around to make the ftdi cable toggle the rts and dts lines?... For the time being, I don't mind uploading sketches via arvisp mkII but I need a little bit of guidance on how to do that, or at least point me to the thread on how to do this.
Regarding avrdude and linux.
I've just tested it with my FTDI cable and upload works with IDE 0022. It seems they have moved DTR/RTS toggling into the IDE itself, so it should work no matter what avrdude does. I know a few years ago it didn't work with the cable. Maybe that will be replaced by avrdude 5.11 altogether. If you run 5.11 by hand with '-c arduino' as the programmer type, it will work with the cable as well.
So I guess your only problem was the reset capacitor.
Just a quick update. I have added the reset cap. to my board and Successfully uploaded the Arduino UNO bootloader. Now when I press reset, the pin 13 led flashes 3 times very quick which means it uploaded the way it supposed to. Now my problem is not getting communication through my ftdi cable as before. It looks like it auto resets and the chip sends data to the usb-serial cable but the tx wire (orange) stays lit constantly the moment the usb cable is plugged in. there is not activity on that led. Any suggestions or should I just try a Different/new usb-serial cable?
PROBLEM SOLVED-
I did some more research and tinkering around on my makeshift arduino board. My wiring I found was 100% right. Bootloader did what it supposed to but what I previously hadn't done was install libftdi-dev (Thought it was already include in linux Kernel 2.4 or greater) I installed it never the less.
I had an LED on the TX line of the FTDI cable (RX on the board) in line with a 220 ohm resistor. Apparently, from my understanding and making sense of things. This was enough to take away enough signal strength from that line that the chip wouldn't respond, since the usb-serial I'm using is 3.3v.
I removed the LED from the ORANGE TX pin of the 6 pin breakout of the cable. Made sure that arduino still 'auto-reset' (to verify proper connection/communication) Hit the Upload button and woala. It worked.
Thanks a bunch MADWORM for the tip about the reset capacitor. Now I don't even have to manual reset to upload a new sketch (Except for the very first time to initialise communication at start-up)