制御電文フォーマット
スケッチ中に記述
Terminate: Receive LF (Ignore CR) or separator ';'
Transmit CR+LF
TestData Paste to Serial-Monitor
DFR0090 7seg 8col 74HC_HCT595 Address set 7F
"01" 0W 7FC0;0W 7FF9 Display "1.0."
"23456789" Set (Burst) 0SCA4B0999282F88090
" " Set (Burst) 0SCFFFFFFFFFFFFFFFF
Burst Write 0B 7F
"23456789" Write Burst 0WB7FA4B0999282F88090
" " Write Burst 0WB7FFFFFFFFFFFFFFFFF
All ON Write Burst 0WB7F0000000000000000
"2345678901" Write Burst 0WB7FA4B0999282F88090C0F9
[Device]: '0'-'F' 4 bit Hex-Char
[Address]: "00"-"7F" 8 bit Hex-String // for Device
"80"-"FF" 8 bit Hex-String // for Software
[Data]: "00"-"FF" 8 bit Hex-String
[Count]: "0000" - "FFFF" 16 bit Hex-String
Read1 Req. [Device]['R'][' '] [Address]
ex. "0R 01"
Ans. [Device]['R'][' '] [Address] [Data]
ex. "0R 0180"
Write1 Req. [Device]['W'][' '] [Address] [Data]
ex. "0W 020E"
Ans. [Device]['W'][' '] [Address] [Data]
ex. "0W 020E"
Write Burst Req. [Device]['W']['B'] [Address] [Data]... * Bytes-Limit by SIZE_RxBuff same ['S']['C'] ['S']['A']
ex. "0WB02112233" * Use BurstBuff Data in BurstBuff is invalid
Ans. [Device]['W']['B'] [Address] [WriteCount]
ex. "0WB020003"
Set Buffer Req. [Device]['S']['C'] [Data]... 'C':[Clear the buffer before setting]
ex. "0SC810185" // YMF825 header + Entire Tone Setting
Ans. [Device]['S']['C'] [GetCount] [BuffCount]
ex. "0SC00030003"
Set Buffer Req. [Device]['S']['A'] [Data]... 'A':[Add at the end of the buffer]
ex. "0SA007FF4BB001040..." // YMF825 30 byte / Tone Parameter
ex. "0SA80038180" // YMF825 end (footer)
Ans. [Device]['S']['A'] [SetCount] [BuffCount]
ex. "0SA0004"
Burst Write Req. [Device]['B'][' '] [Address]
ex. "0B 07"
Ans. [Device]['B'][' '] [Address] [WriteCount]
ex. "0B 070023" // YMF825 OneTone Parameter (1 + (2 + (4 * 7)) + 4)
// Hardware Req. [Device]['H']['R'] [Data] // Device nReset Activate Data:Wait(msec)
// ex. "0HR0A" // nReset:LOW -> 10msec Wait -> nReset:HIGH
COM 通信速度は 115200 bps
Arduino IDE からのスケッチ書込みがこの速度
↓ 上記仕様で SPI 入出力をする SKETCH まだ機能追加するかも