The 1284p is the next step up from the ATMega328 chip powering many of the “Arduino” type microcontroller boards and their many clones.
Why another chip? Well, anyone who has used the ATMega328 knows that it’s a great controller chip but the lack of RAM soon gets very tiring. Also if you’re messing with things like Ethernet and maybe you want a Real Time Clock, perhaps access toSD memory, the libraries have a habit of filling your FLASH memory much faster than you’d like.
Why the 1284p? That’s simple – there are only so many of these chips in DIP format – that is the old 0.1” pin format that is easy to use for prototyping – the other upgraded chips are surface mount and a PAIN to solder.
The 328 chip has 32Kbytes of FLASH (for your programs), 1K of EPROM (for storing data permanently) and 2K of RAM (for variables). The likes of the Ethernet code EATS up the RAM in no time. Finally, it’s also quite easy to run out of Interrupts and port bits.
Don’t get me wrong, the 328 is a great general purpose chip but it has it’s limits. A problem with many other chips is the cost – by the time you’ve finished you may as well have bought a Raspberry Pi and the idea surely is to keep costs low.
Well, the 328 can be as cheap as a couple of pounds or so… and the 1284p can be had for double that. What do you get for your money?
- 128K Flash (ie 4 times as much)
- 16K RAM (ie 8 times as much – MOST welcome)
- 4K EEPROM(4 times as much)
- 32 pins as against 23
- 3 interrupts as against 2
- 8 analog ports as against 6
- 2 UARTS as against 1
As you can see in the diagram above, putting together a prototype board is a snap (provided you have a TTL-USB converter which I use for all my kits.)
Here is the information you need. If you’re starting from scratch you need the Arduino IDE, the TTL to USB converter (for programming) and a few bits and pieces for your prototype – information for that is all here.
The standard BLINK test which flashes a LED once a second, when modified to use output 16 – will flash physical pin 22 on and off as per my photo demo above.
Thanks here to Aidan Ruff for pointing me in the right direction and supplying the test chip – which will soon end up in some long-abandoned project (because I ran out of room in the ‘328). Magic.