Problems with Serial Programming

First post! Be gentle!! :cold_sweat:

I’ve breadboarded a ATMEGA328 and managed to bootload it (using the UNO) but I am having terrible troubles loading any sketches to it. Thinking I’d possibly cocked up the bootloader / chip I jumpered it to the socket on the uno and managed to program it, however this is not ideal as I really want it to be re-programable in situ once its installed.

I’ve been using a CP2102 based, usb to serial converter to attempt the programming..

Used the following diagram,

http://www.miconbkk.com/shop/m/miconbkk/img-lib/spd_20120411163027_b.jpg

It seems to reset, but immediately goes back into the ‘blink’ program that I programmed using the uno, and I get the error; avrdude: stk500_getsync(): not in sync: resp=0x00.

Any ideas chaps!? I’ve already checked the CP2102 is working (looped the TX>RX) and the DTR seems ok as its reseting. Is there any particular setting the IDE needs to be set to use the CP2102 > Serial (apart from setting the correct usb port!) :roll_eyes:

Many thanks in advance!

Matt :.

... I jumpered it to the socket on the uno and managed to program it ...

OK, I'll be gentle, and welcome to the forum!

What is this "it" of which you speak?

Stuff about minimal breadboards here:

sorry managed to program the ATM328P.

Checked out suggested page and looks like i am doing everything right, I am thinking could be the USB > Serial converter (the same error presents itself when I remove the TX/RX lines). Anyone else have any experiance with the CP2102 chipset adaptors with the arduino IDE??

Any help would be appreciated...

Regards

Matt

Where is that orange wire on the right going? The one connected to pin 2 of the chip.

Sorry its not very clear is it! Plus the colours dont match at the CP2102 end!!

Orange (pin2) > TXD on CP2102
Yellow (pin3) > RXD on CP2102

Regards

Matt

Is that capacitor in series with reset really 0.1 uF?

Yes, already swapped it out with another just to make sure it too! :frowning:

I rebuilt it following carefully http://shrimping.it/blog/shrimp/shrimpduino_bb_minimal/ and seem to have made some progress, managed to program it a few times!

Programmed the blink sketch and noticed that the LED was flashing in a very non-uniform manner. Could the crystal be a bit duff??

@bromatt..

No, I would assume that the wire is not connected properly.. try change it and tell us if you still have the same problem...

Anyone else have any experiance with the CP2102 chipset adaptors with the arduino IDE??

Yes, lots of people have problems getting it to work out.

Most of those adapters have a pin called "RESET" which has nothing to do with resetting the Arduino. You have to find a via on the breakout board that is connected to the DTR pin of the CP2102 and carefully solder a wire to it. Or, manually reset your arduino when programming.

@bromatt I recently experienced a blown/broken crystal, which didn't behave as you describe - the circuit simply didn't function. However, I don't know if there's any weird behaviour before one fails completely.

Without seeing the circuit in action, it sounds like it might be resetting for some reason, such as a temporary load which affects the voltage. If I'm right, the variation in blinking is therefore to do with it restarting the whole program again. I've seen this happen in unprotected circuits controlling motors, and it may reveal latent issues with having some contacts which are not conducting well for some reason (perhaps corrosion in the breadboard connections).

Protection from variations in load is one primary reason, as well as stable analog reference voltages, for the differences between the minimal programmable circuit at...
http://shrimping.it/blog/shrimp/shrimpduino_bb_minimal/
...and the more practical, protected circuit at...
http://shrimping.it/blog/shrimp/shrimpduino_bb/
...which is recommended for any substantial physical computing work.

Try the more protected circuit instead, and be sure everything is cleanly contacting.

Sort of Apropos the subject, Is there any real difference between the FTDI232, CP2102 and the PL2303 USB to TTL Adapters. I'd not given the subject much thought until this thread but for some reason (I own all) this question 'popped' up and I was wondering what if any difference there was practically and particularly. I will be doing a small pcb and I own a couple of the FTDI chips in a 'usable' (SSOP) package so my thought was that If there is a good reason to avoid any of the devices in particular... Which?. Jumpers are ok for this job as it is a picture frame with a 328 and a 3.2" Itead display and the pictures can be loaded onto the SD card and simply be 'plugged' in. If there is an advantage beyond immediate possession of the FTDI device I will include it on the board, If not then I will place a connector footprint rather than an IC footprint.

Doc

Hi Guys, Sorry for not keeping upto-date life does get in the way sometimes! :slight_smile:

The original breadboarded layout I have pulled apart as I was practising getting 2x TLC5940 daisy-chained, I did notice some weird behaviour out of the breadboard (flickering led's) so I suspect that it might not be upto scratch so that is definitely one avenue - I'm going to give the 'shrimped' (am I using the correct terminology) another go, but this time going to build it on strip-board / matrix board - in t-he meantime however I purchased a RBBB Arduino http://shop.moderndevice.com/products/rbbb-kit from ebay - and put it together, works perfectly BUT still the CP2102 module refuses to play ball, but programs perfectly using RX/RT/RESET BLAH BLAH jumpered from a chipless Uno.

Doc: Differences,
FTDI232 - is the one that's used on the Uno itself! Works!! (at least from the uno)
CP2102 - the one I have - very cheap! Works?? People say it does, I have faith!!
PL2303 - Pass! Never seen one.

There all USB > Serial Bridges - electronically they shouldn't make a jot of difference, i think the trade off is support/price/reliability..Given the choice again, i would go for the FTDI232! :stuck_out_tongue:

Matt

Bad serial data will not cause flickering (aside from the regular 3 flashes after a reset). You've got a bad contact somewhere, possibly on the CP2102 interface. You tested the RX/TX loopback already, so it may be just the 5V output pin that's dodgy. Try powering the breadboard from a separate 5V supply (not forgetting to common the grounds).

I've used the serial adapter on the Uno to program a chip on another board (the Serial backpack that Liudr sells on Inmojo) and I've used the FTDI device to program 2 Pro Mini's and I've used a PL2303 to read a GPS device for Windows. I have no reason to believe that any of the methods/devices aren't interchangeable... providing you get the reset to the object device properly connected however this is the extent of my knowledge... So IF there is feedback that is more appropriate...

Doc