Power, Reset, and Clock Input Considerations
Timer Interrupt and FLAG I/O Examples
After reset, the
become input signals (sampled by the TigerSHARC processor). As input
signals, they can monitor external activities. The following instructions
show how the state of the flag pins can be used to branch to different rou-
tines. Symbolic macros are defined in
the VisualDSP++ Software Development Tools.
Listing 10-1. Monitor a Flag Pin
/*Example to show monitoring of Flag 0 pin for */
/*conditional jump when flag pin set to input*/
if FLAG0_IN, jump function1;; /* If flag0 is set jump*/
if NFLAG0_IN, jump function2;;/* If flag0 is not set*/
The following code sample shows how to alter the
an output pin (driven by the TigerSHARC processor).
Listing 10-2. Change a Flag Pin From an Input to Output Pin
/*Example to show setting of Flag 2 pin as an output*/
xr0 = SQCTL;;
xr0 = bset r0 by SQCTL_FLAG2_EN_P;;
(bit 22)*/
SQCTL = xr0;;
Once a flag pin has been set as an output pin, the signal can be driven
high or low by the TigerSHARC processor by setting or clearing Bits27–
24 of the
SQCTL
the
signal high.
FLAG2
10-12
pins of the TigerSHARC processor by default,
FLAG
/*Read the Sequence Control Register*/
/* Write back to Sequence Control Register*/
register. The following code sample shows how to drive
file that is included in
defts101.h
/*to function1*/
/*jump to function2*/
FLAG2
/*Set Flag 2 as output
ADSP-TS101 TigerSHARC Processor
Hardware Reference
pin and make it
Need help?
Do you have a question about the ADSP-TS101 TigerSHARC and is the answer not in the manual?