You are viewing an older revision! See the latest version

m3pi preparation

Before you start using the mbed with your Pololu 3pi, you need to program the on board AVR with Pololu's "Serial Slave" example.

The easiest way is to use the binaries as described below. If you want to build your own then there are great instructions on at www.pololu.com with some handy links at m3pi-Development

The Easy Way

To do this the easy way you simply need to temporarily repurpose your mbed Microcontroller to be an AVR ISP programmer by using Aaron Berks mbedAVR programmer. This enables an AVR binary dragged onto mbed LocalFileSystem to be be programmed into the AVR over SPI - drag and drop programming for AVR :-)

You will need :

Information

The mbed AVR programmer only takes .bin files currently. As the mbed microcontroller would try to load a .bin file into the mbed itself, I have opted for the .avr extension. AVR Studio generates .hex files, but there are many HEX2BIN converters available.

Setting up your hardware

The hardware connections between the mbed and the 3pi are simple. On the 3pi side, there is just a standard 6 way AVR ISP header :

/media/uploads/chris/avr6wayisp.png

The connection to mbed is straight forward.

AVR ISPmbed
1 MISOp6
2 VCCn/c
3 SCKp7
4 MOSIp5
5 nRSTp8
6 GNDGND

As I am doing quite a lot of 3pi reflashing at the moment, I made myself a little breakout board on strip board, with a mbed socket and a 6 way AVR socket.


All wikipages