Assignment
This weeks assignment consist of reading the microcontroller data sheet (attiny) to understand the functioning of our microcontroller and program my board (hello world) to do something, with as many different programming languages and programming environments as possible.
Where I stand-
I have some experience in programming(Java and C) but when it come to Embedded programming, I still have a lot to learn.(By a lot, I mean everything).Electronics is not my strong suit and i dont know much about microcontrollers and their working.
The data sheet was of some help,But I still didnt understand much. Also we dont have anyone in our lab who have experience in electronis field, so i had to learn everythong by myself. I used the ATTiny 44a, so i mainly concentrated on its PIN diagram and working. Here's an image of the PIN placements of ATTINY44:
I used a FabISP and arduino software for programming the board.
The PINs of an ATtiny and arduino are not similar.There are some differences and hence while programming, change the PINSs on the ATtiny to the corresponding arduino PINs.This can be done by referencing the PIN diagrams of both ATtiny and arduino.
Here is a diagram of PINs of arduino with rerspect to that
of ATitny:
Connect the Hello Board to the FabISP and to the computer via FTDI cable.Make sure the FabISP is connected to the computer.
1- Installing Arduino and the ATtiny files
2- Connect the Helloworld board and FabISP to PC.
- Connect the FabISP to the Helloworld board using a connector.
- Power the fabISP using a micro USB cable connected to the
computer.
- Connect the Helloworld board to the computer using a FTDI
connector.
3- Programme the Board
- First we need to Burn Bootloader in the tools menu.Bootloader
is a piece of firmware in your microcontroller that allows installing new firmware using an external programmer.
I had a bit of trouble with bootloader burning.It kept showing the following error:
The problem was that the fabISP was not being detected in the PC. It took me a while to figure out the reason. I had actually programmed and tested the FabISP in Ubuntu and it was working fine. But in windows, FTDI driver was required for detecting the fabISP. You can download the FTDI driver
here
I burned bootloader again and this time,It was succesfull.
- Now comes the programming part. Ther was example programmes in
the arduino that can be loaded to the loaded to the board. I selected one such programme,named Blink programme.
- After programme writing, I compiled the program and since
there was no problems,uploaded the program to the board.
blink programmed from nizam on Vimeo.
The blink programme worked correctly, by detecting input from the switch.
Download Blink Program
Main Page