
EZ-USB FX2 Technical Reference Manual
Page 15-4 EZ-USB FX2 Technical Reference Manual v2.1
15.3 About SFRS
Because the SFRs are directly-addressable internal registers, firmware can access them quickly,
without the overhead of loading the data pointer and performing a MOVX instruction. For example,
the firmware reads the FX2 Port B pins using a single instruction, as shown in Figure 15-2.
Figure 15-2. Single Instruction to Read Port B
Similarly, firmware writes the value 0x55 to Port C using only one MOV instruction, as shown in
Figure 15-3.
Figure 15-3. Single Instruction to Write to Port C
SFRs in Table 15-1 rows 0 and 8 are bit-addressable; individual bits of the registers may be effi-
ciently set, cleared, or toggled using special bit-addressing instructions (e.g., setb IOB.2 sets bit 2
of the IOB register).
mov a,IOB
mov IOC,#55h
IOA Port A (bit addressable) SFR 0x80
b7 b6 b5 b4 b3 b2 b1 b0
D7 D6 D5 D4 D3 D2 D1 D0
R/W R/W R/W R/W R/W R/W R/W R/W
x x x x x x x x
Commentaires sur ces manuels