|
S-7750C Datasheet, PDF (23/44 Pages) Seiko Instruments Inc – PROGRAMMABLE PORT CONTROLLER (PORT EXPANDER WITH BUILT-IN E2PROM CIRCUIT) | |||
|
◁ |
PROGRAMMABLE PORT CONTROLLER (PORT EXPANDER WITH BUILT-IN E2PROM CIRCUIT)
Rev.1.1_00
S-7750C
 Example of Flowchart for Software
1. Read / Write in register
The example of flowchart for software when accessing to the control port register is shown in Figure 28.
START
Switching access to
E2PROM / register
1-byte command
(ST, DC2 to DC0, 0001, 0, ACK, SP)*1
Access to
control port register
END
2-byte command
⢠Write
(ST, DC2 to DC0, 0101, 0, ACK, CTR7 to CTR0, ACK, SP)*1
⢠Read
(ST, DC2 to DC0, 0101, 1, ACK, CTR7 to CTR0, ACK, SP)*1
*1. ST
DC2 to DC0
ACK
CTR7 to CTR0
SP
: Start condition
: Device code
: Acknowledgment
: Control port register
: Stop condition
Figure 28 Flowchart for Software Example 1
2. Read / Write in E2PROM
The example of flowchart for software when accessing to the E2PROM is shown in Figure 29.
START
WP pin = âLâ?
Yes
Switching access to
E2PROM / register
No
1-byte command
(ST, DC2 to DC0, 0001, 1, ACK, SP)*1
Access to
control port E2PROM
END
2-byte command
⢠Write
(ST, DC2 to DC0, 0101, 0, ACK, CTR7 to CTR0, ACK, SP)*1
⢠Read
(ST, DC2 to DC0, 0101, 1, ACK, CTR7 to CTR0, ACK, SP)*1
*1. ST
DC2 to DC0
ACK
CTR7 to CTR0
SP
: Start condition
: Device code
: Acknowledgment
: Control port register
: Stop condition
Figure 29 Flowchart for Software Example 2
Seiko Instruments Inc.
23
|
▷ |