Epson S1D13708 Camera Accessories User Manual


 
Page 16 Epson Research and Development
Vancouver Design Center
S1D13708 Connecting to a Micro-Controller via the Indirect Interface
X39A-G-020-01 Issue Date: 01/12/12
5 Software
To implement the bus cycles in software, refer to the S1D13708 Hardware Functional
Specification, document number X39A-A-001-xx, for the bus timings. A minimum of three
steps must be implemented in software to use the Indirect Interface. The steps for an 8-bit
data transfer are:
void command_write (char command_value)
void data_write (char data_value)
char data_read (void)
Example 1: The sequence for writing the S1D13708 register REG[7Ch] PIP+ Display Start
with a value of 28h is:
command_write(0x7C);
data_write(0x28);
Example 2: The sequence for reading the S1D13708 register REG[26h] FPFRAME Pulse
Start Register 0 is:
command_write(0x26);
value_returned= data_read();
Example 3: The sequence for writing to S1D13708 memory location 200h with two bytes
of data is:
command_write(0xC0);
data_write(0x00);
command_write(0xC1);
data_write(0x02);
command_write(0xC2);
data_write(0x00);
command_write(0xC3); // note that no ‘data’ value is needed for the ‘start’ register
data_write(0xAA); // 1st byte of data written to 0x200
data_write(0x55); // 2nd byte of data written 20 0x201
To read memory, the same sequence as above is used except a ‘data_read()’ is called. Note
that the memory address is auto-incremented after a memory data access and the ‘start’
register REG[C3h] does not require a data value.