Week 9 Embedded Programming

by Moritz Begle


Posted on March 30, 2013 at 15:00 PM


Assignment:

Read a microcontroller data sheet - DOC8183

Program your board to do something, with as many different programming languages and programming environments as possible - Board Design

Class Context: http://academy.cba.mit.edu/classes/embedded_progra…

Software

Before you can start programming & connecting the microcontroller to the FABISP, make sure that the FTDI drivers are installed.

  1. Arduino IDE Software: http://arduino.cc/es/main/software
  2. Arduino ATtiny hardware Library: https://github.com/damellis/attiny/archive/master.…
  3. FTDI Drivers: http://www.ftdichip.com/FTDrivers.htm

After installing the software you follow the Tutorial: http://highlowtech.org/?p=1695

Arduino to programme the Microcontroller:

- Connect the ISP programmer with your Hello board using your ISP connector cable.

- go to Tools > Board menu > ATtiny44 (20 Mhz Clock)

- go to Tools > Programmer menu > USBtinyISP

- go to Tools > select Burn Bootloader

Through the circuit plan or datasheet you can figuere out, to which Pin your LED & button is attached to.

Stating with a simple Blink code which can be found in the Examples of arduino, I added diffrent blink programs to the skript. with the switch button you smoothly can change between the diffrent programs as the code is not working with delays. Sometimes you need to do two things at once. For example you might want to blink an LED (or some other time-sensitive function) while reading a button press or other input. In this case, you can't use delay(), or you'd stop everything else the program while the LED blinked. The program might miss the button press if it happens during the delay(). This sketch demonstrates how to blink the LED without using delay(). It keeps track of the last time the Arduino turned the LED on or off. Then, each time through loop(), it checks if a long enough interval has passed. If it has, it toggles the LED on or off.

The full code you will find here


Blog Search

Keywords

Web development; blogs; content management; videoconference;remote dektop; project management