DSP1611/17/18/27/28/29 DIGITAL SIGNAL PROCESSOR
Information Manual
Bit I/O Unit
April 1998
10-6
DRAFT COPY
Lucent Technologies Inc.
10.2 Software View
(continued)
10.2.2 Flags
Those bits that have been configured as inputs can be individually tested for 1 or 0 (compared with PATTERN). For
those inputs that are being tested, there are four flags produced: allt (all true, all the tested bits match PATTERN),
allf (all false, none of the tested bits match the PATTERN), somet (some true, at least one of the tested bits
matches the PATTERN), and somef (some false, at least one of the tested bits fails to match the PATTERN). The
flags are updated each time the cbit register is written and can be tested by the conditional branch or special func-
tion instructions. The state of these flags can be saved and restored by reading and writing bits 0 to 3 of the alf
register.
10.2.3 Instructions
The data move group of instructions is used to read and write the sbit and cbit registers. These registers can be
written from memory, from an accumulator, or with immediate data. They can be read to memory or to an accumu-
lator.
The flags that are set by the BIO are included in the general set of flags that are tested by the conditional branch
and special function instruction.
10.2.4 Examples
The following sections of code show how the BIO can be used. The first section uses the BIO as all outputs:
sbit=0xff00
/* set all direction bits to 1 (output)
*/
cbit=0x0000
/* initialize BIO[7—0] to all 0s (data mode write)
*/
cbit=0x00ab
/* write 0xab out to BIO[7—0] (data mode write)
*/
cbit=0xff0f
/* toggle bits 3—0 of BIO; leave bits 7—4 unchanged
*/
cbit=0x0f0f
/* write 0 to bits 7—4 in data mode; toggle bits 3—0
*/
The following code segment uses the BIO as all inputs:
sbit=0
/* set all direction bits to 0 (input)
*/
a0=sbit
/* read current value in sbit register
*/
a0=a0h&0x00ff
/* mask off direction byte (if necessary)
*/
/* a0 now holds the current value on BIO pins
*/
cbit=0xffab
/* test the entire BIO byte for 0xab
*/
if allt goto pass /* if (BIO==0xab) branch to label pass
*/
cbit=0x0302
/* test the bottom 2 bits for 0x2
*/
if somet a0h=a0h+1/* if either bit matches, increment a0
*/
Table 10-4. alf Flags
Bit
Flag
Use
3
somef
SOME FALSE from BIO
2
somet
SOME TRUE from BIO
1
allf
ALL FALSE from BIO
0
allt
ALL TRUE from BIO
Summary of Contents for DSP1611
Page 18: ...Chapter 1 Introduction...
Page 27: ...Chapter 2 Hardware Architecture...
Page 52: ...Chapter 3 Software Architecture...
Page 116: ...Chapter 4 Instruction Set...
Page 154: ...Chapter 5 Core Architecture...
Page 176: ...Chapter 6 External Memory Interface...
Page 208: ...Chapter 7 Serial I O...
Page 237: ...Chapter 8 Parallel I O DSP1617 Only...
Page 261: ...Chapter 9 Parallel Host Interface PHIF DSP1611 18 27 28 29 Only...
Page 275: ...Chapter 10 Bit I O Unit...
Page 284: ...Chapter 11 JTAG Test Access Port...
Page 306: ...Chapter 12 Timer...
Page 313: ...Chapter 13 Bit Manipulation Unit...
Page 325: ...Chapter 14 Error Correction Coprocessor DSP1618 28 Only...
Page 350: ...Chapter 15 Interface Guide...
Page 367: ...Appendix A Instruction Encoding...
Page 379: ...Appendix B Instruction Set Summary...
Page 381: ...aD extractz aS IM16 B 52 aD insert aS arM B 53 aD insert aS IM16 B 54 aD aS aaT B 55...
Page 437: ...Index...