実験実習の授業用のプログラムを書いてみた

学校で使ってるDIOボードのライブラリと引数レベルで互換性を持たせた。
初期化とかデータの書き込みが表示されるので実機無しテストにはもってこい。

$ ./lcd_1
Info: DIO Board Init.
      portA: write mode
      portB: write mode
      portC: read  mode
Write: dec:  4 hex:0x04 bin:00000100 char: => portB
Write: dec:  1 hex:0x01 bin:00000001 char: => portA
Write: dec:  0 hex:0x00 bin:00000000 char: => portB
Write: dec:  4 hex:0x04 bin:00000100 char: => portB
Write: dec:  2 hex:0x02 bin:00000010 char: => portA
Write: dec:  0 hex:0x00 bin:00000000 char: => portB
Write: dec:  4 hex:0x04 bin:00000100 char: => portB
Write: dec: 48 hex:0x30 bin:00110000 char:0 => portA
Write: dec:  0 hex:0x00 bin:00000000 char: => portB
Write: dec:  4 hex:0x04 bin:00000100 char: => portB
Write: dec: 14 hex:0x0E bin:00001110 char: => portA
Write: dec:  0 hex:0x00 bin:00000000 char: => portB
Write: dec:  4 hex:0x04 bin:00000100 char: => portB
Write: dec:  6 hex:0x06 bin:00000110 char: => portA
Write: dec:  0 hex:0x00 bin:00000000 char: => portB
Write: dec:  6 hex:0x06 bin:00000110 char: => portB
Write: dec: 65 hex:0x41 bin:01000001 char:A => portA
Write: dec:  0 hex:0x00 bin:00000000 char: => portB
Write: dec:  6 hex:0x06 bin:00000110 char: => portB