Embedded Programming


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

interesting facts about microcontrollers;

ATtiny 44 was introduced in Dec 2005 to optimize manufacturing process and reduce current consumption. ATtiny 44A was introduced in Dec 2008 and is identical in functionality but differ in electrical characteristics. They were produced with seperate datasheets microcontroller data sheet.

About ATtiny44A:

1) It is a chip with 14 pins; including VCC and GND
2) Port B (PB3:PB0) is a 4-bit bi-directional I/O port with internal pull-up resistors
3) RESET (PB3) A low level on this pin for longer than the minimum pulse length will generate a reset 4) Port A (PA7:PA0) is a 8-bit bi-directional I/O port with internal pull-up resistors
5) Port A has alternate functions as analog inputs for the ADC, analog comparator, timer/counter, SPI and pin change interrupt
6) CPU(central processing unit) ensures correct program execution by accessing memories, performing calculations, controlling peripherals, and handling interrupts
7) it has three types of memory Flash stores the compiled program even when the power is off
8) SRAM saves temporarily variables while calculating
9) EEPROM is for data storage
10) ATtiny44A features successive approximation Analog-to-Digital Converter (ADC). It generates a 10-bit result which is presented in the ADC Data Registers, ADCH and ADCL. ADCL presents only the low byte of the ADC conversion result and ADCH presents only the high byte. ADCL is read first, then ADCH. When ADCH is read, ADC access to the ADCH and ADCL Registers is re-enabled and a new result is provided.


Note: What is a Watchdog Oscillator (found under item 6: Clock System in data sheet)is a safety feature and an electronic timer designed to detect and recover malfunctions. Check out this blog for more details.


Specifying Clock Sources:
Under 6.2 (Clock Sources) of the datasheet, Flash Fuse bits are selectable according to clock source represented in the table (table 6-1) shown. These clocking sources determine the stability of oscillation operations (timing or delays) before instruction execution begins, be it when the CPU wakes up or when starting from a reset.

The objective was to program the Hello board made with an ATtiny44 chip in week 06 via Fabisp made in week 03 using Arduino IDE.

1. download Arduino

2. download entire zip for Attiny board and place into a new folder called 'hardware' MacintoshHD/Users/Documents/Arduino/Hardware/attiny NB: imp to call last folder 'attiny'

3. Under tools option in arduino choose Board:"ATtiny"; Processor: "ATtiny44"; Clock "20Mhz (external)T

To connect the the Helloboard to the Attiny; an ISP cable was made. It is important that you know where ground is so that and to connect them together.The Attiny has a mini usb connector for power; and the Hello board has an FTDI connection which connects via usb to the computer.







Note: pins on Attiny micro controller have different following pins on arduino (therefore this conversion needs to be made). Also dont forget to press 'burnbootloader' in tools.




I spent most of the rest of the week practicing circuitry and programming via 123dcircuits which also has a simulator.

|problems encountered this week:

When making the Helloboard i found some missing connections which needed to be corrected in eagle schematics. 1. Button; being a digital input would need to be connected to the micro-controller to program via arduino. 2. SCK in the ISP needed to be connected to pa 4/pin 9 on the micro-controller. See hello.ftdi.44 . This was corrected using external wires and still worked in the end! (see above)


|Download files

|Brief MIT

|Lecture Neil Gershelfeld

Copyright © Joe Galea 2016