Yoshihiro Asano

FabAcademy2016 from Fablab Kamakura

Embedded Programming



I graduated from my University, and going to join Master course!

Reading datasheet

I read through the datasheet of ATtiny.
I realized the difference of EEPROM, RAM.
ROM is stand for Read Only Memory,
and RAM is Random Access Memory.

Set up the enviornment

At first, I checked FabISP again.
If your raptop cannnot recognize,
it's be effective to open terminal and type "system_profiler SPUSBDataType".
→ Ex. Shino Onodera's page


Next, I want to check my new LED + switch board.
According to this instruction, I bought USB-FTDI cable.

Then, download some program files from class page.
  1. hello.ftdi.44.echo.c
  2. hello.ftdi.44.echo.c.make
  3. term.py

You cannot save them as .txt file.
from web page, you can save them as a program file.

By terminal, run 1 and 2 program.
but at first I cannnot run it, with "pyserial, ImportError: No module named serial".
It means I need python-serial module,and I typed "sudo easy_install pyserial".
→ Ex. Stack overflow's topic

Finally, run a python program with Serialport / boardrate.

I can see this window, but it turned to be freeze everytime when I type keyboard.
I don't know why and searching now...(probably caused by LED+switch board itself?)

And what is worse, my Mac's USB port might be broken.
It can detect only one cable... :-(
Anyway, I try to fix it and catch up.


改めて、作りたいのはこの基板。

二つとも認識するようになったのだが、まだうまくいかない
近藤さんや未央さんに教えてもらいながらやったこと
I made same board again, but the problem is not cleared.
I cannnot run the sample program, and test original one.

Retry and Summarize

In November, I retry to make the board and programming.
As I see, the board itself has no problem.
So I read makefile and c program again and again.

Finally, I re-download sample code, then I can get correct response!
I add LED blink function and rec it. Code is here


It is basic flow to write program via FabISP.
This chart is most easy to read.
  1. Put makefile and c file into same folder.
  2. Open terminal and access the folder.
  3. type "make -f ____.make".
    If c file have some error, alart message will be shown.
    So you can use this command as a debagger.
  4. Connect programmer and PC, programmer and your board.
    Maybe you have to supply power to the board.
  5. type "make -f ____.make program-[ ]-[ ]"

    Makefile has some option according to the type of programmer.
    In this time, I use FabISP as usbtiny device.
    [fuses] is first setup function.
The c program is written to micon by this flow.
This time Neil's code shows the key I typed.
I can see it in Arduino IDE serial monitor.(Python code still doesn't work..).