Uploading troubles to 1284p

@CrossRoads

Programming sketches via ICSP is possible, I've just never done it without a bootload programmer.
For example,

GitHub - WestfW/OptiLoader: Arduino sketch for burning new bootloaders
http://arduino.cc/forum/index.php/topic,68183.0.html see the vidoe in the thread

could likely be used, if it was modified to know where to get the file from.

Doesnt that video show how to bootload a Atmega chip with an Arduino? I can do that(I bootload this way only :slight_smile: ) but What I wanted to know was with the SAME setup used in the video can I upload programs as such Blink or anything else to an arduino? If so what all changes should I make?

"Whats the IDE data rate?" 115,200 from boards.txt.

So for me IDE data rate is 115200(As its written in my boards.txt)? Earlier you mentioned something like mismatch of speeds. What is the other comparing term I should check with?

What you need to know is the data rate the bootload code is using.

Any way to find this out?

@nick Thanx for that calculator :slight_smile:
This is what I got. I am using Maniacbug's optiloader.

Atmega chip detector.
Entered programming mode OK.
Signature = 1E 97 05 
Processor = ATmega1284P
Flash memory size = 262144
LFuse = FF 
HFuse = DE 
EFuse = FD 
Lock byte = CF 
Bootloader in use: Yes
EEPROM preserved through erase: No
Watchdog timer always on: No
Bootloader is 1024 bytes starting at 3FC00

Bootloader:

3FC00: 0F 92 CD B7 DE B7 11 24 84 B7 14 BE 81 FF F1 D0 
3FC10: 85 E0 80 93 81 00 82 E0 80 93 C0 00 88 E1 80 93 
3FC20: C1 00 86 E0 80 93 C2 00 80 E1 80 93 C4 00 8E E0 
3FC30: CA D0 20 9A 26 E0 80 E3 9C EF 31 E0 90 93 85 00 
3FC40: 80 93 84 00 36 BB B0 9B FE CF 18 9A A8 95 21 50 
3FC50: A9 F7 00 E0 10 E0 EE 24 E3 94 E1 E1 DE 2E F3 E0 
3FC60: FF 2E A5 D0 81 34 71 F4 A2 D0 89 83 B2 D0 89 81 
3FC70: 82 38 09 F4 8B C0 81 38 11 F4 84 E0 01 C0 83 E0 
3FC80: 8F D0 8B C0 82 34 11 F4 84 E1 03 C0 85 34 19 F4 
3FC90: 85 E0 A7 D0 82 C0 85 35 91 F4 89 D0 A8 2E BB 24 
3FCA0: 86 D0 08 2F 10 E0 10 2F 00 27 0A 29 1B 29 81 2F 
3FCB0: 88 1F 88 27 88 1F 8B BF 00 0F 11 1F 6D C0 86 35 
3FCC0: 21 F4 84 E0 8E D0 80 E0 DB CF 84 36 09 F0 40 C0 
3FCD0: 6E D0 6D D0 C8 2E 6B D0 80 EE 00 30 18 07 18 F4 
3FCE0: F8 01 F7 BE E8 95 A1 2C 51 E0 B5 2E 60 D0 F5 01 
3FCF0: 81 93 5F 01 CE 16 D1 F7 F0 EE 00 30 1F 07 18 F0 
3FD00: F8 01 F7 BE E8 95 65 D0 07 B6 00 FC FD CF F8 01 
3FD10: A0 E0 B1 E0 2C 91 30 E0 11 96 8C 91 11 97 90 E0 
3FD20: 98 2F 88 27 82 2B 93 2B 12 96 0C 01 E7 BE E8 95 
3FD30: 11 24 32 96 82 E0 A0 30 B8 07 61 F7 85 E0 F8 01 
3FD40: 87 BF E8 95 07 B6 00 FC FD CF D7 BE E8 95 25 C0 
3FD50: 84 37 A9 F4 2C D0 2B D0 B8 2E 29 D0 3A D0 CB 2C 
3FD60: 48 01 F4 01 86 91 1C D0 08 94 81 1C 91 1C CA 94 
3FD70: C1 F7 0F 5F 1F 4F BA 94 0B 0D 11 1D 0E C0 85 37 
3FD80: 39 F4 27 D0 8E E1 0C D0 87 E9 0A D0 85 E0 78 CF 
3FD90: 81 35 11 F4 88 E0 17 D0 1C D0 80 E1 01 D0 61 CF 
3FDA0: 90 91 C0 00 95 FF FC CF 80 93 C6 00 08 95 80 91 
3FDB0: C0 00 87 FF FC CF 80 91 C0 00 84 FD 01 C0 A8 95 
3FDC0: 80 91 C6 00 08 95 E0 E6 F0 E0 98 E1 90 83 80 83 
3FDD0: 08 95 ED DF 80 32 19 F0 88 E0 F5 DF FF CF 84 E1 
3FDE0: DF CF CF 93 C8 2F E3 DF C1 50 E9 F7 F2 DF CF 91 
3FDF0: 08 95 80 E0 E8 DF EE 27 FF 27 09 94 FF FF FF FF 
3FE00: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FE10: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FE20: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FE30: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FE40: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FE50: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FE60: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FE70: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FE80: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FE90: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FEA0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FEB0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FEC0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FED0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FEE0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FEF0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FF00: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FF10: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FF20: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FF30: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FF40: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FF50: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FF60: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FF70: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FF80: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FF90: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FFA0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FFB0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FFC0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FFD0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FFE0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FFF0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 

MD5 sum of bootloader = 71 DD C2 84 64 C4 73 27 D2 33 01 1E FA E1 24 4B 

First 256 bytes of program memory:

0: 0C 94 87 00 0C 94 B2 00 0C 94 B2 00 0C 94 B2 00 
10: 0C 94 B2 00 0C 94 B2 00 0C 94 B2 00 0C 94 B2 00 
20: 0C 94 B2 00 0C 94 B2 00 0C 94 B2 00 0C 94 B2 00 
30: 0C 94 B2 00 0C 94 B2 00 0C 94 B2 00 0C 94 B2 00 
40: 0C 94 B2 00 0C 94 B2 00 0C 94 7B 12 0C 94 B2 00 
50: 0C 94 66 14 0C 94 FC 14 0C 94 B2 00 0C 94 B2 00 
60: 0C 94 B2 00 0C 94 B2 00 0C 94 B2 00 0C 94 B2 00 
70: 0C 94 9F 14 0C 94 49 15 0C 94 B2 00 0C 94 B2 00 
80: 0C 94 B2 00 0C 94 B2 00 0C 94 B2 00 00 00 21 00 
90: 24 00 27 00 2A 00 00 00 22 00 25 00 28 00 2B 00 
A0: 00 00 20 00 23 00 26 00 29 00 02 02 02 02 02 02 
B0: 02 02 04 04 04 04 04 04 04 04 03 03 03 03 03 03 
C0: 03 03 01 01 01 01 01 01 01 01 01 02 04 08 10 20 
D0: 40 80 01 02 04 08 10 20 40 80 01 02 04 08 10 20 
E0: 40 80 01 02 04 08 10 20 40 80 00 00 00 01 02 00 
F0: 08 09 00 00 00 00 04 03 07 06 00 00 00 00 00 00

Thanx Crossroads for clearing up the Reset pin doubt. :slight_smile:

What file, exactly, did you upload as your bootloader?

@nick
I followed the steps here.. Arduino on ATmega1284P | maniacbug
and followed the ArduinoISP tutorial and burnt that in arduino dumilanove and connected SCK,MOSI,MISO,RESET pins and gave burn bootloader option in IDE with "Mighty 1284p 16Mhz using optiboot" selected as board. I dont know which file exactly though...

I can see why people are enthusiastic about this chip. I've ordered one, and if all goes well, which I doubt, it will arrive before the weekend.

Then I'll try it for myself.

I'll keep you posted. :slight_smile:

I can see why people are enthusiastic about this chip. I've ordered one, and if all goes well, which I doubt, it will arrive before the weekend.

If possible one those long tutorials for 1284p versions too... :wink:

It really does have fantastic potential. I don't understand why Arduino proper hasn't picked it up for an official board. I see it as more applicable than the Mega in many cases, and certainly easier to use in DIP format. For all you get (RAM, raw I/O, various dedicated hardware serial I/O, flash space), it's dirt cheap, too.

It really does have fantastic potential. I don't understand why Arduino proper hasn't picked it up for an official board. I see it as more applicable than the Mega in many cases, and certainly easier to use in DIP format. For all you get (RAM, raw I/O, various dedicated hardware serial I/O, flash space), it's dirt cheap, too.

+1 for that... :smiley: RAM + no. of I/O is what attracted me to it... still now couldnt get it to make it work smoothly though... :frowning:

I've been saying for ages that the 1284 is a natural for an Arduino and of course a few people are using them (or the 644). I've got a design on the drawing board at present that uses one.


Rob

Yes indeed, the 1284 makes a fine board!


(PL shows MIKROE589, list has been updated for the correct MIKROE483 with FT232 chip, waiting on ISP to refresh the website)
http://www.crossroadsfencing.com/BobuinoRev17/

some new pics being added too ...

"@crossroads which bootloader are u currently using?"

This one, which I think is what sets up with the maniacbug cores.

optiboot_atmega1284p.hex (1.47 KB)

Thanx :slight_smile:
Tried it out... Still getting not in sync errors... :frowning:

It didn't arrive, lol.

Well, you didn't say whose weekend, still have a small chance at getting it before My weekend - course, its going on 4:30pm, not much time left for UPS to make afternoon dropoffs ...

Chip arrived, got minimal board going. Details here:

Programming the bootloader:

Installing a sketch using the bootloader:

Good work nick... :slight_smile: Seems you to have got it working properly.. :slight_smile: Any troubles uploading til now?
I seem to have done all of these stuff mentioned earlier but still my problem still remains... :frowning: Anyways let me try doing it ditto as u mentioned in your tutorial...
@ nick
Tried uploading larger sketches? and Is the bootloader uploaded by your https://github.com/nickgammon/arduino_sketches/tree/master/Atmega_Board_Programmer same as the one provided by maniacbug?

Sorry Wrong link edited... :slight_smile:

Wow, that chip looks big in the first pic! Result of the camera angle I guess.

@nick
Freaking Hell!!! Ur bootloader hex file worked XD
did 10 uploads no troubles watsover.... :smiley: U are real life saver... :smiley: U solved the thing which was driving me nuts...
Did u change the bootloader?

One more thing... :slight_smile:

Now we'll install the bootloader upload sketch onto the Uno and run it (set the serial monitor to 115200 baud).

http://gammon.com.au/Arduino/Atmega_Board_Detector.zip

Plz edit the given link with the bootloader one in your tutorial page... :slight_smile:

000:
@ nick
Tried uploading larger sketches?

Not yet.

and Is the bootloader uploaded by your arduino_sketches/Atmega_Board_Programmer at master · nickgammon/arduino_sketches · GitHub same as the one provided by maniacbug?

It is the file optiboot_atmega1284p.hex from maniacbug's GitHub page. Slightly modified to change some of the consecutive 0xFF bytes to be 0x00 because of the problem with uploading a lot of consecutive 0xFFs to the Uno using the standard Optiboot (known bug there).

000:
Plz edit the given link with the bootloader one in your tutorial page... :slight_smile:

Fixed thx.

Freaking Hell!!! Ur bootloader hex file worked

Strange. I expected more teething problems. :wink:

Well, glad it worked.

000:
Did u change the bootloader?

Not apart from the change made so it would actually upload to the programming Uno.