The Mighty 1284p

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.

1284p chipWhy 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.

tmp4AFFFollow instructions and you get this on your IDE bottom right when you’ve set the right board..

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.

DIY Arduino or “UberBareBoard”

If you’ve been reading my other blogs recently you’ll know that I’ve rekindled my interest in electronics, once blown away by our government and their anti-small-business gold-plated CE regulations. The good thing about hobbies is that you don’t have to CARE about such things.

And so it was that I started looking at processor boards out there to make use of the popular Arduino design. I say design, it’s really very little more than a manufacturer’s minimum demonstration – but the important thing is the volume of support software out there – in particular ethernet software making it possible to create Internet-enabled devices such as my “EtherStat” unit which has now been on test for the past couple of weeks without a hitch.

UberBareBoardNone of the boards out there are without issue and so three of us collectively decided we’d have our own board and I took on the design job.

Armed with Eagle PCB package with which I’m well familiar (though I had some catching up to do) and a little imagination I set off putting this together -  I should at this time thank friends Jonathan and Aidan for the encouragement and also the latter for checking my work and generating the “gerber” files etc.

The result – here it is..I nicknamed it ”UberBareBoard” as it has everything except the kitchen sink in it (feel  free to zoom in on any of these images which should expand or “lightbox” if you click on them).

The board follows the same form factor as the original Arduino though that was only by chance as I spotted an open-source version of the board outline and connectors. Having put several commercial boards together into various test projects, I came across the same problems every time – not enough power connectors, regulator getting hot, parts too close together, same pins used multiple times- and so what you see here is fairly simple but with sufficient extra pins to make life easy for lash-ups.

In the bare-board image above you’ll see on the front-left a 10-way connector – that’s for the cheap Chinese radio boards. Lower left there’s a 6-way connection – that’s pretty standard as are the outer connectors giving access to the 19 I/O pins and power and ground. Note top left the regulator is mounted flat on copper board to dissipate heat and there’s room for a standard power connector (standard that is unless you’re Maplins who have a HOPELESS and hopelessly over-priced selection of connectors).

Populated UberBareBoardAt this point it’s probably better to look at the populated board. Front right you’ll see a LED which is attached to D13, a far better place than making a power led as you can see the board working on power up (it flickers). Over on the right I’ve left room for a 3-pin infra-red receiver and a LED to go with that. Top right is the reset button, left from there the standard programming connector and left again (ie upper middle) you’ll see a power (+5 and GND) connector and a 2-pin battery connector. Relevant diode and charge resistor are fitted. The empty socket is for a 24c256 chip (64K EEPROM) and centre front you’ll see 2 diodes, they’re to drop the 5v supply sufficiently to use with the radio or Ethernet modules.

Mass production? No, we scoured the web for cheap UK prototype suppliers and ended up sending off to China for a set of 10 prototypes at a reasonable price – somewhat over a fiver each – and this for fully tinned, masked, cut to size prototypes of production quality. I’ll be using these guys again – turnover was little over a week.

I’m happy to say that apart from not having sufficiently small 1k resistors to mount them horizontally (that’s what I get for using standard library parts and not checking) and getting the mounting hole layers wrong (hence no mounting holes, quickly corrected with a drill) the boards work perfectly – and I have lots of plans for them.

DIY Arduino

While waiting for the first Raspberry Pi to arrive, I’m continuing to work with Arduino clones. I use the name repeatedly just as it’s familiar to those in the field, but essentially we’re simply talking about a minimal ATMEL-based processor board with reset and power components. Having discovered that the Chinese do prototype boards quite cheaply and quickly I figured I’d have a go at doing my own. The Eagle PCB package is free for anyone wanting to have a go up to a certain size board. I’ve used this package over the years but not for a decade so it’s nice to see they’re still in operation and obviously they are very popular with the hobby community.

Anyway, here’s the board so far. This is a “jack of all trades” board as I put stuff in that “might come in handy”.

As you can see, it has it’s own proper 5v regulator (fastened down with some heatsink area) and power connector, standard Arduino-type general connectors and the usual microchip, xtal and a crude 3.6v supply via a couple of diodes. The connectors include the normal programming connector, ICSP and one (lower left) specifically for the cheap Chinese RF modules. ~I’ve also put in a 24c65 socket there as the Atmel chip has only 1k of EEPROM for storing logs etc. and the socket I’ve added lets you add a 24c65 or 24c256 chip for up to 64KB of logging or other storage (can’t use for programs).

The next step is to find out the realities of actually getting prototypes made in China. I looked all over the UK and I might be missing something but there’s no-one here to even remotely compete on prototypes – these work out at around a fiver each for 10-off which means if I’ve made a mistake it’s not going to break the bank – but it’ll be weeks before they turn up – so more information at the time… I’ve jokingly called the board “UberBareBoard”… I’ll find out how super it is (or not) when they arrive.


MyDuino !


On the subject of iPads -  has anyone noticed the utter lack of anything new and exciting recently – same with iPhone – it’s as it people are running out of ideas. A good old fashioned (but not old) adventure would be nice, not one of those silly “guess the hidden objects” but a proper adventure…

Arduino and I2C–the 24C65

The 24c65 is a great little 8-pin serial EEprom chip with 8k of  EPROM in it – so if you want some extra memory to store stuff in your Arduino board or similar – this would appear to be a nice chip – except that the standard Arduino library uses 7-bit addressing.

WHAT????? Yup, it’s for small devices with a few memory locations – whereas accessing several KB of addresses needs a 16 bit address! Also the Arduino library is a tad, erm, LARGE so off I went to find a replacement.

I stumbled on this…  and that’s nice, a tight library for controlling EEPROMs but again this does not handle the larger variety… but down at the bottom of the blog, somewhat hidden in with my stupid questions is this… An EEPROM library with 16 bit addressing. Not only THAT but if you compile it into a little “Hello World” writer and reader, you are looking at 3234 bytes including the library. NICE!

Check out this code – it’s a bit rubbish as the printout doesn’t check for zero at the end of the string…. but it works… there is also the 24C256 which gives you 64k to play with…. that’s a lot of logging!!!  I’m sure it would not take too long to write some wrapper routines around this lot. Incidentally the chips have 3 address lines normally tied to ground – so you can fasten up to 8 of them together – so addressing half a meg of data would be no big deal and with a tiny library.

By default internal pullups are enabled so you don’t even need resistors if the leads are short – just power (will work regardless if you’re on 5v or 3v3), ground and 2 pins – that’s A4 and A5. What could be easier. Incidentally you DO need that delay after the first write (which takes much longer than a read – or the second one will fail – there is no check that I can see. (I tried I2c.available() and it just locked up). You can write up to 32 bytes at a time as that is the internal buffer size of the chip – if you wanted to write more, a simple function call would easily split the data up.


#include <I2C.h>

void setup()
I2c.write(0x50,1000,"Replaced here");
I2c.write(0x50,2000,"and replaced here");

void loop()
while (I2c.available())
while (I2c.available())