Hello ungas45.
Are you familiar with a protocol called SPI? I ask this because the following data lines are very similar...
Code: Select all
|BIT 0|BIT 1|BIT 2|BIT 3|BIT 4|BIT 5|BIT 6|BIT 7|
CLOCK -----___---___---___---___---___---___---___---___-----------
DATA -----000000111111222222333333444444555555666666777777--------
* * * * * * * *
CMND -----000000111111222222333333444444555555666666777777--------
ACK ----------------------------------------------------------__-
five lines: command (CMND), data (DATA), clock (CLK), attention (ATT), and acknowledge (ACK).
The protocol used is similar enough to SPI that the controller can be directly connected to some SPI pins.
CMND goes to MOSI
DATA goes to MISO
CLK goes to SCK
SPI doesn't support acknowledge so connect the ACK line to an external interrupt pin.
So when you want to communicate with the controller.
Microcontroller initiates communication by pulling the ATT line low.
Have a delay... then send the 0x01 on CMND.
The rest of the transmission is handled by a rising edge of the ACK line.
Does this make sense so far?