MPC-816 BBS

縮小画像はクリックで拡大表示します。
#69 MPC-816, MIF-816, MIO-816, MIO-248 I/Oポート番号
acceleng 2005年2月15日(火) 9:55 関連: I/O
SW(),ON,OFFはbit単位で扱う関数・コマンドです。
IN(),OUTはbyte単位です。
ボードとI/Oポート番号の関係は下表のようになります。

 -----------------------------------------------------
| board  |      input        |        output          |
|        | bit         byte  | bit             byte   |
|-----------------------------------------------------|
|MPC-816 | SW   0~7    IN 0  | ON/OFF   0~7    OUT 0  |
|        | SW   8~15   IN 1  |                        |
|-----------------------------------------------------|
|MIF-816 | SW  16~23   IN 2  | ON/OFF   8~15   OUT 1  |
|        | SW  24~31   IN 3  |                        |
|-----------------------------------------------------|
|MIO-816 | SW  32~39   IN 4  | ON/OFF  16~23   OUT 2  |
|  #1    | SW  40~47   IN 5  |                        |
|-----------------------------------------------------|
|MIO-816 | SW  48~55   IN 6  | ON/OFF  24~31   OUT 3  |
|  #2    | SW  56~63   IN 7  |                        |
|-----------------------------------------------------|
|MIO-816 | SW  64~71   IN 8  | ON/OFF  32~39   OUT 4  |
|  #3    | SW  72~79   IN 9  |                        |
|-----------------------------------------------------|
|MIO-816 | SW  80~87   IN 10 | ON/OFF  40~47   OUT 5  |
|  #4    | SW  88~95   IN 11 |                        |
|-----------------------------------------------------|
|MIO-816 | SW  96~103  IN 12 | ON/OFF  48~55   OUT 6  |
|  #5    | SW 104~111  IN 13 |                        |
|-----------------------------------------------------|
|MIO-248 | SW 112~119  IN 14 | ON/OFF 112~119  OUT 14 |
|  #1    |                   | ON/OFF 120~127  OUT 15 |
|        |                   | ON/OFF 128~135  OUT 16 |
|-----------------------------------------------------|
|MIO-248 | SW 136~143  IN 17 | ON/OFF 136~143  OUT 17 |
|  #2    |                   | ON/OFF 144~151  OUT 18 |
|        |                   | ON/OFF 152~159  OUT 19 |
 ----------------------------------------------------

see also
http://acceleng.jp/php/comref_816.php?md=4&st=I/O

*index mode*
CGI-design