LESSON TEME: Embedded Programming
In this week, I output a electronic board, which I designed in a privious lesson, by using a Milling Machine. Then, I soldered several surface mount components on the board. Lastly, I wrote a C programming language code for blinking LED and streamed the code into the board by using an AVR writer.
Milling Electronic Board
At first, I made an electronic board I designed before by using a milling machine, Roland SRM-20, in Fablab Kyushu. Although I setup a correct parameter and using a correct size endmill, a part of the lines were not digged well. I don't know why the situation was happened. But no problem, I milled again to overwrite the same lines of the board by changing the Z parameter of the endmill with keeping X and Y the same paramaters. I did the remilling work 2 more time for getting enough trace lines. Then, I digged outline of the board, this work was no trable in which I could get it at one try ;-) Finally I obitained my own electronic board!
Several lines on the board were connecting each other, which lines shouldn't connect on my schematic design. So I separate the lines by using a cutter. Then, I tried soldering work. The work was not so hard in this time because I tried it in a previous lesson and I understood some tip to soler it. Lastly, I checked passage of electric current of each line on the board by using a tester.
C Programming and AVR Writing
I'm programmer, so not hard to understand mechanism of embedded programming and write such kind of code. I wote a code to blink a LED. I have coded the similar code on Arduino, but this was my first time to code C for AVR. It was a good opportunity to understand the mechanism in Arduino. Lastly, I connected my electronic board and an AVR writer. This time my board was recognized on my Mac!, the FabISP I made before was not recognized though. But an error was happened when I run a makefile to fuse the electronic board. I don't know why the error is happened, "Could not find USBTiny device ???", my Mac is recognized my electronic board, isn't it? An Instractor of Fablab Kyushu, Hisatsune-kun, tought me that I should annother MAKE command if I use AVRMark2 to write a code. I command another one and the fuse prossess is success and also success to write the blink code but... no blink the LED at all :-(