I have recently been reading up on the 1284P chip which
Looks like an impressive improvement to the Uno/328P.
Alot of comments out there about people having problems
With bootloaders Etc.
I am curious to find out some solid info on exactly what boot loader
To use for the 1284P that's fully working at 16mhz Xtal, and if its
Possible to burn a bootloader to it using the UNO as ISP, although I
Do have a genius g540 programmer as well.
Is there any loses using the 1284P with functionality e.g. Using the eeprom?
I have been reading up a lot on it and everything's still abit in the open. Just looking for
Solid info so I can crack on with projects.
I have 2 on the way in the post and I don't want to mess them up/brick them
When they cost £5 each. Which is still better than the arduino mega at £13 for the
This board does a lot - SPI to SD cards, I2C to RTC, dual serial to USB & RS232. Tested all the features on all boards shipped, and did additional testing later when it was discovered that the analog pins were sort of wrapped around by 1 position, which led to a pins_arduino.h tweak.
Analog pin wrapping: There was a problem with this line
// #define analogPinToChannel(p) ( (p) < NUM_ANALOG_INPUTS ? NUM_ANALOG_INPUTS - (p) : -1 )
that fixed with this line #define analogPinToChannel(p) ( (p) < NUM_ANALOG_INPUTS ? (NUM_ANALOG_INPUTS-1) - (p) : -1 ) // test to see if A0-A7 are off by 1
A0-A7 were responding as if A1-A8 were being accessed.
-1 was added in the middle to fix that. This may have been from flipping the analog pin assignments end for end so that the analog pin located near the middle of a DIP part could be routed direct to the A0 header, continuing out to A6 & A7 (added from Uno) at the corner of the board.
(vs the pins all crisscrossing as they got routed)
Mighty1284 might be the only bootloader available to burn. The copy I use may have been tweaked to have the SCK pin toggle like a Duemilanove/Uno does. I'm not sure what pin might toggle otherwise with the bootloader.
Once the bootloader is loaded, then loading sketches via serial interface is done just like any other Arduino board - external USB/Serial adapter, or on-board USB/Serial adapter.
FTDI based modules are readily available, I just received 2 in the mail yesterday, each came with a short USB A to USB- Mini B cable as well. tinyos electronics, www.tinyosshop.com? Haven't even opened them up yet.
CP2102 based modules work as well. Usually need a USB-A to USB-A male-female extension cable.
Or you can use your Uno. USB/Serial modules are so inexpensive I wouldn't bother.
Not sure where you are looking, I can assure you everything is labelled.
There was something about SPI that the pins_arduino.h takes care of too, like it was being called out twice & causing compile errors when Arduino went from -0023 to 1.0. Just needed a line commented out, you can see it under the diagram of the pinout in the file.
whats the reason for needing a bootloader on this mega chip? could you not have a bootloader but still use arduino IDE to program the uC?
Huh? The bootloader is what lets Arduino program the chip via the serial interface, just like all the other Arduino boards.
Yes, you can not have a bootloader and program the chip with an AVR ISP programmer using File:Upload Using Programmer, just like all the other Arduino boards. I use Atmel AVR ISP MKii myself.
I used to use this one http://www.mdfly.com/index.php?main_page=product_info&cPath=5&products_id=415
I was having problems after bootloading at some point and switched to the MKii. Later discovered a mismatch with bootload expected speed and PC speed during serial downloads was the culprit (I may have forgotten to set the fuses too) but I never went back to using the MDFLY programmer and can't find it at the moment.
This is the 1284 bootloader I use.
There might be a slight change from the 2/11/12 version to make the SCK pin blink vs some other pin.
I don't know what the standard one does.
You can see in boards.txt that the optiboot version is called out.
And now you mention it, I do have one of those USB AVR ISP
Dongles, yet I have never had it working. I never got any software
Or instructions on how to use it. I can't remember if it works on Win 7
I will give the bootloader stuff ago tomorrow. I received my 2
1284P chips earlier today.
I've burned a number of 1284(P) chips using the UNO as a programmer. Probably easier than messing with an AVR programmer if you're not already used to using one.
Also, if you don't have an FTDI cable/USB dongle, you can probably pull the 328 chip out of your UNO board and jumper to its USB port.
In case it's not obvious, exactly the same bootloader is used for several of the 1284 variants in the maniac boards.txt file. The different variants simply assign the D0..D31 and A0..A7 Arduino callouts to different physical pins on the 1284 chip. Only the Bobuino variant in the maniacbug library has errors in it, AFAIK, but Bob's probably got all of those fixed now.
If you're really compulsive, there were several interminably long threads on the 1284 in this section back in Feb 2013.
EDIT to previous:
Yeah, as Bob indicates I didn't quite make it clear: "The different variants simply assign the D0..D31 and A0..A7 Arduino callouts to different physical pins on the 1284 chip", and "that is done in the pins_arduino.h in the different variant folders" when the sketch is compiled.
So, the bootloader is used to upload the sketches, and doesn't do the pin assignments - that's done when the sketch is compiled. So, this way many variants with different pin-assignments can use the same bootloader.
You've got the greatest write-ups Nick, wish I had time to create that kind of depth & detail.
AVR ISP MKii is easy to use once you get the drivers in place for the IDE.
Read this thread for ways to set it up. http://forum.arduino.cc/index.php?topic=160226.msg1202909#msg1202909
You can download Atmel Studio if you like, I find under WinVista it takes ages to start up, so I stopped using it to set up 1284s.
Now I just:
Connect it to the SPI pins, reset, +5, Gnd (or plug it onto the ICSP header that you included in your design),
power up the board (can be a 3 AA battery pack even; MKii only monitors the power line unless you mod it to connect USB 5V pin to the 5V header pin),
select Tools:Board:your 1284 board type (I use Bobuino for mine),
and select Tools:Burn Bootloader. Takes a minute or so. That sets the fuses for 16 MHz operation too.
Then File:Upload Using Programmer if you want your sketch to start immediately after a Reset and not have any bootloader delay.
Atmel Studio does the fuses &lockbits & bootloader quicker, but all the time waiting for it to open offsets that.
Occasionally (alright, most times) I forget to burn the bootloader first and jump right into downloading a sketch, which then runs ridicuously slow and I frantically check my wiring & stuff, and after a halfhour I recall that I didn't do anything with the fuses. Am slowly getting better about remembering that!
Look in the boards.txt file in the library, and choose a board that uses the optibootloader, like Bob said. It doesn't matter which of those several boards you select to burn the bootloader. You really need to learn this stuff, at least for 1284 dev work, because the 1284 support isn't nearly as wrung out as for UNOs/mega2560/etc. Many libraries don't properly support 1284. You have to hack them yourself.
It also doesn't matter which of those boards you then select when compiling sketches. They'll all compile and run ok. The only difference is in the pin assignments, so later on you can choose a board that has the pin assignments you want to use - if you're breadboarding, etc.
For my own work, I used Bobuino or one of the other optiboot variants to burn the bootloader, but I modified the boards.txt file to match the special pinout I use on my own pcb layout.