Go Down

Topic: ATMega 1284 & Optiboot (Board Programmer) (Read 1 time) previous topic - next topic

retrolefty


im using an FTDI cable to upload sketches and anything ive tried at 25kb or larger i get the following error:


avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x62
avrdude: stk500_cmd(): programmer is out of sync

im going to try the rc filter suggested in the other thread sometime in the next day or so

Thanks


Let us know how it works out for you.

Lefty

forthekids

ugh....so ive tried just about all the tricks ive read about....ive tried different board types, different programming methods....even going to the RXD1 & TXD1 pins to see if those would work...nada

to recap:
bootloaded the 1284 using the Atmega Board Programmer sketch and my Uno Rev 3...had to change one of the sig bytes but got it to give me a successful bootload

i used the USB FTDI TTL-232R 3.3V cable i picked up from adafruit that i use to upload sketches to my boardinos with and connected via male header in breadboard to these pins:


Pin 1 (GND)     Gnd (blue)
Pin 2 (CTS)     not connected
Pin 3 (Vcc)     +5V (red)
Pin 4 (TxD      Pin 14 (RxD0) (white)
Pin 5 (RxD)     Pin 15 (TxD0) (orange)
Pin 6 (RTS)     To Reset via 0.1 uF capacitor (green)

i then installed the maniacbug-mighty-1284p download and selected the "Mighty 1284p 16MHz using Optiboot) board in the tools menu

this allows me to upload sketches up to around 20-25kb and then i get the following error messages:

avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x62
avrdude: stk500_cmd(): programmer is out of sync

ive since tried:

including LEDs on the RXD0 & TXD0 pins...nada
swapping to the XD1 pins...nada
selecting other boards in the tools menu....nada
installing a 10k ohm and .1 uF cap as a low pass filter on the RXD0 pin (cap from pin to ground, resistor in series to cable)
looking up the devcode for stk500 in the avrdude config file...its the same for all the similar ATMega chips
taking my 328p chip from my Uno, selecting the Arduino as ISP in the programmer menu under tools and then upload using programmer in the file menu

im clearly a noob at all this...but i thought i would be able to get this thing singing and can only make it grunt

the reason i went to the 1284 chip was more sketch space...my bad that i didnt pick up the 1284p chip but from what ive been learning, this isn't the real issue....its an atmega 1284(p) DIP issue...which bites

is there a solution that does exist? keep in mind, im not that talented, im very busy, and extremely lazy

any and all insight is welcomed!!!

THANKS!!

ps....i think the 64kb would be ok for my current projects...i just thought id be a little greedy with the 1284kb seeing how the chip cost is pretty close....should i just go with the 644p? are there known issues there too? i just need some space...

double PS...im using a 16 MHz crystal (digikey P/N X433-ND) if that means anything to the "out of sync" portion to the error code


oric_dan

Not sure this will fix things, but I see 2 very definite problems here,

"10k ohm and .1 uF cap as a low pass filter on the RXD0 pin" - s/b 100 pF cap, yours is
lightyears too large a value.

"(digikey P/N X433-ND) " - this is a "series" crystal, you must use a parallel crystal, which
calls for approx 20 pF caps.

[following is supposed to be low profile]
http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?freeText=325139&langId=-1&storeId=10001&productId=325139

http://www.digikey.com/product-detail/en/ECS-160-20-4X/X1103-ND/827594



forthekids

i will certainly try this....the new caps and crystals are on the next digikey order, thanks!

also on the list:

ceramic oscillator(s)...ive read things about these vs the crystals that may be worth the $2 to put a few in the box and investigate

ATMEGA644P-20PU-ND....what the heck, the $8 is worth my curiosity...would i use the same X1103-ND crystal for the 644P as well?

btw, why do both cut sheets of the two crystals you linked list a "series resistance" value? is this just a common spec to include, even for "parallel" crystals?

thanks!!


oric_dan

There is some info here about the different crystals, series-cut will operate at a slightly
different frequency than parallel-cut. Parallel-cut is what is always specified by uC
manufacturers.

http://www.foxonline.com/techfaqs.htm

You normally do not need a resistor in series or parallel with the crystal. I think some older
crystals needed series-R to prevent damage from over driving by the oscillator.

Some people use ceramic resonators all the time, but they have a 0.5% frequency tolerance,
while crystal tolerance is 20-50 PPM, which is 0.002-0.005%. So, crystals give better timing
accuracy.

Go Up