Cypress Semiconductor FX2LP Technické informace Strana 324

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 460
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 323
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
Zobrazit stránku 323
1 2 ... 319 320 321 322 323 324 325 326 327 328 329 ... 459 460

Komentáře k této Příručce

Žádné komentáře