W7 ¦ Embedded programming
Assignment for week 7
- read a microcontroller data sheet
- program your board to do something, with as many different programming languages and programming environments as possible
- Link to this week’s home work page
Data Sheet
I began by looking through the Ttiny44 microcontroller´s datasheet found at the homeworks page. There I found the necessary information on the pins that I needed later on when programming. Some of the abbreviation were more easily understood than others. Some needed deciphering.
Programming
Since I am totally new to programming I thought it best to find some tutorials on programming. I started looking at Youtube. I found it difficult to find courses that suited me. They either were way too advanced or they went into such detail but skipped the basics. I ended of watching the playlist: Free Online Programming Course in C for Beginner by Carl Herold
That was a good introduction into binary numbers. I found it a bit repetitious at times and even though it was basic computer science it failed to communicate to me the overall picture. But I learned a lot about binary and pointers!
The best course for me turned out to be Foundations of Programming: Fundamentals with Simon Allardice on Lynda.com
I can't recommend it highly enough for someone like me how is an absolute beginner in programming. It is 4 hours 15 min. It explained to me a bit of the history of programming and how it has evolved. It also helped me gain the necessary vocabulary and an understanding of the basic concepts.
From there I started watching C Essential Training with Isac Artzi
I Have not finished the course which is 7 hours and 22 min. But I aim to finishes that sometime soon. Everything is very well explained and the pace is just right for me, not too slow or too fast.
What help me the most to get comfortable with the whole electronics side of things, programming and understanding all the lingo was watching and following the Arduino Course for Absolute Beginners on Youtube from Open Source Hardware Group
Again I would recommend this to all who are taking the first steps into electronics and find themselves in the deep end. I used an Arduino from my son but I guess that it would also be useful to watch without following the steps. It gave me the soft introduction I needed and I gained a lot better understanding and more confidence in the whole process of dealing with a Ttiny44.
Programming the Ttiny44
My computer has problem with the WinAVR compiler. The WinAVR seems work fine on Windows 7 and 8 but not 8.1. (see week 10 for the solution to the probem.)
Therefore I followed the steps in the tutorial from HighLowTec. There they show a way to use the Arduino software to communicate with the Ttiny44.
All went well and I managed to get the LED and button to work together. One thing to mention is to remember to add a line of code in setup that activates the internal pullUp resistor of the button pin.