![background image](http://html.mh-extra.com/html/analog-devices/adsp-21261-sharc/adsp-21261-sharc_hardware-reference-manual_2939675568.webp)
PCG Programming Examples
13-14
ADSP-2126x SHARC Processor Hardware Reference
/* Enable DAI Pins 1 & 2 as outputs */
r0 = PBEN_HIGH_Of|(PBEN_HIGH_Of<<DAI_PB02);
dm(SRU_PBEN0) = r0;
r0 = (100<<PCG_PWB);
/* PCG Channel B FS Pulse width = 100 */
dm(PCG_PW) = r0;
r2 = 1000; /* Define 20-bit Phase Shift */
r0 = (ENFSB|ENCLKB|
/*Enable PCG Channel B Clock and FS*/
1000000);
/* FS Divisor = 1000000 */
r1 = lshift r2 by -10;
/* Deposit the upper 10-bits of the Phase Shift in the */
/* correct position in PCG_CTLB0 (Bits 20-29) */
r1 = fdep r1 by 20:10;
r0 = r0 or r1;
/* Phase Shift 10-19 = 0 */
dm(PCG_CTLB1) = r0;
dm(PCG_CTLB0) = r0;
r0 = (100000);
/* Clk Divisor = 100000 */
/* Use CLKIN as clock source */
/* Deposit the lower 10-bits of the Phase Shift in the */
/* correct position in PCG_CTLB1 (Bits 20-29) */
r1 = fdep r2 by 20:10;
r0 = r0 or r1;
/* Phase Shift 10-19 = 0x3E8 */
dm(PCG_CTLB1) = r0;
//----------------------------------------
_main.end: jump(pc,0);
Listing 13-2. PCG Channel A and B Output Example
/* Register Definitions */
#define SRU_CLK3
0x2434
Содержание ADSP-21261 SHARC
Страница 30: ...Contents xxx ADSP 2126x SHARC Processor Hardware Reference ...
Страница 40: ...Register Diagram Conventions xl ADSP 2126x SHARC Processor Hardware Reference ...
Страница 58: ...Differences From Previous SHARCs 1 18 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 112: ...Secondary Processing Element PEy 2 54 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 178: ...Summary 3 66 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 204: ...DAG Instruction Summary 4 26 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 322: ...Setting Up DMA 7 32 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 436: ...SPORT Programming Examples 9 86 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 521: ...ADSP 2126x SHARC Processor Hardware Reference 11 31 Input Data Port rts IDP_ISR end ...
Страница 522: ...Input Data Port Programming Example 11 32 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 590: ...Timer Programming Examples 14 20 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 796: ...I O Processor Registers A 174 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 800: ...B 4 ADSP 2126x SHARC Processor Core Manual ...
Страница 846: ...Index I 36 ADSP 2126x SHARC Processor Hardware Reference ...