Going Beyond Arduino part 1

This is Part one of probably three. but that might change.

I love Arduino, you should love Arduino, we all should love Arduino. Good that's settled then. But if Arduino is so good why would I want to go away from this.

Like a lot of things I start playing with, I want to take them apart,explore them deeper and find out how they work, even if that means things get broken in the process. With Arduino that started when I started listening to the Embedded.FM podcast. If you don't listen to Embedded.FM I really recommend it, Elecia and Chris cover everything from Hacking BB8 toys, through STEM education to the control of quadcopters and satellites, with the occasional cat interview thrown in for good measure.

Right, back to Basics and a few terms explained. The Arduino is a microcontroller board. A microcontroller is a simple computer that has all the components that are normally all on separate chips and connected together on one single chip.

To make programming easier the microcontrollers on Arduino boards are pre-programmed with a bootloader. The bootloader is a small program that runs on the microcontroller to allow the code to be sent straight from your computer to the microcontroller without any additional hardware needed.

My motivation when I started with this was to completely remove the Arduino environment. This meant no bootloader, no Arduino IDE or libraries and to write the code in C.

The first step I took was to buy a ATTiny85 microcontroller. These are the chips that are found on Adafruit Gemma, they are simple and cheap enough to not have to worry if things went wrong.

After getting the ATTiny85 working I started playing with the chips on an existing Arduino board that were already programmed with the bootloader and also through up other surprises I didn't know about. I'll cover those in a future part, when I start to

Before I begin its worth mentioning that all the hardware and software I'm talking about is relevant to the Atmel AVR chips which power the majority of Arduino boards. There are some boards that use ARM or Intel chips. I haven't explored these boards yet.

To program the microcontroller without the Arduino environment two things are needed a programmer to talk to the microcontroller and software to send the code to the microntroller.

There a lots of different hardware programmers available, its possible to set up an existing Arduino board to program.
This is the one I have,
USBASP Programmer

it plugs in to the USB port, includes a cable and adapter to convert the header on the cable from 10 pins to 6 pins. The other small device in the centre of the cable is a breadboard adapter from Adafruit that makes using the programmer with breadboard easy.

Searching for usbasp on ebay will turn up loads of these, some the bare boards and some in the nice green enclosure like mine.

The software needed to send the programs from your computer is called AVRDUDE. There might be other software for doing this but I'm not aware of any.

For installing AVRDUDE Limor Fried (Lady Ada of Adafruit) has tutorials for Windows, Mac and Linux. 

I installed AVRDUDE by installing Crosspack as suggested.

Its worth having a read of all of Lady Ada's AVR Programming tutorial. I found it really useful.

So thats the beginning covered, the chips,the hardware and the software. Next time we'll build a simple circuit and program the ATTiny85 using the USBASP programmer and AVRDUDE.

Leave a Reply

Your email address will not be published. Required fields are marked *