Geoffrey Desborough Fab Academy

Week 7

Week 7 Downloads

Assignment - Read a microcontroller data sheet. Program your board to do something, with as many different programming languages and programming environments as possible.

This weekÕs task was to programme a board to make it do something. So from making the Hello echo Board from last week I wanted to use this. This week was going to be quite a bit different because we had already made the physical circuit board and now was time for it to be programmed. So we wanted to make sure everything was soldered right and the board was not going to short circuit when it was powered on.

I first started by looking at the data sheet and doing a quick google search of the Attiny micro controller chip to see what other information I could find.

Attiny data sheet is:

The AVR is a modified Harvard architecture 8-bit RISC single-chip micro controller, which was developed by Atmel in 1996. The AVR was one of the first micro controller families to use on-chip flash memory for program storage, as opposed to one-time programmable ROM, EPROM, or EEPROM used by other micro controllers at the time.Ó

Quote fromWikipedia Attiny Reference

Some important pieces of information taken from the data sheet.

Bit - A bit is the basic unit of information in computing and digital communications. A bit can have only one of two values, and may therefore be physically implemented with a two-state device. These values are most commonly represented as either a 0or1. The term bit is a portmanteau of binary digit.

Status Register - Is a hardware register that contains information about the state of the processor. Individual bits are implicitly or explicitly read and/or written by the machine code instructions executing on the processor.

CPU - A central processing unit (CPU) is the electronic circuitry within a computer that carries out the instructions of a computer program by performing the basic arithmetic, logical, control and input/output (I/O) operations specified by the instructions.

ALU - An arithmetic logic unit (ALU) is a digital electronic circuit that performs arithmetic and bitwise logical operations on integer binary numbers.

SRAM - Static random-access memory (SRAM or static RAM) is a type of semiconductor memory that uses bistable latching circuitry to store each bit. The term static differentiates it from dynamic RAM (DRAM) which must be periodically refreshed. SRAM exhibits data remanence, but it is still volatile in the conventional sense that data is eventually lost when the memory is not powered.

I followed the Anna's tutorial to installing Arduino and followed the instructions closely and everything went according to plan.

Annas Tutorial

So a quick summary of her tutorial was

Getting the software (Arduino)

- Download from Ardunio Website

ATtiny 44A Microcontroller Pin-Outs

- I found the button template and made sure I had the correct pins labelled which is very important when programming, I used this awesome chart which helped me make sure that I had the right numbers lined up in Aurdino.

chart

Installing ATtiny support in Arduino

Power and Connect the Boards

- Connect the ISP board to the Hello Board through their 2x3 headers. Making sure that you have the pins around the right way and the ground (negative) and VCC (positive) match up.

- Plug in the mini usb and plug into computer.

- I used the FTDI cable to provide power

Configuring the ATtiny to run at 20 MHz

Select your Programmer

- If you are using the FabISP or a AVR from in the lab

Burn the Boot loader

- Tools > Burn boot loader

Program the ATtiny

Loading Code Example

I wanted the led to fade off and on and found some examples off some code that I thought would work I slightly adjusted it so it faded at the speed that I wanted and when I uploaded the code it all worked! I couldn't be happier that I had made this board from scratch and it works!!

Here is a little video of the board working!