AnsweredAssumed Answered

Using Paralle port on ADSP21364

Question asked by savinat on Jul 21, 2009
Latest reply on Jul 22, 2009 by DeepV

Hi to all,

I have to use parallel port for connecting external SRAM to ADSP21364.

I have read the example in the Vidsual DSP++ 5.0 wich is similar to that:

void Init_DMA_ParallelPort(void)
{
* (volatile int *)PPCTL = 0;

/* initiate parallel port DMA registers*/
* (volatile int *)IIPP = (int)&source[0];
* (volatile int *)IMPP = 1;
* (volatile int *)ICPP = sizeof(source);

* (volatile int *)EMPP = 1;
* (volatile int *)EIPP = EXTBUFF;
/* For 8-bit external memory, the External count is
    four times the internal count */
* (volatile int *)ECPP = sizeof(source) * 4;

* (volatile int *)PPCTL =  PPTRAN|    /* transmit (write) */
                            PPBHC|    /* implement a bus hold cycle*/
                             PPEN|    /*Enable parallel port*/
                            PPDEN|    /* enable DMA*/
                            PPDUR4;   /* make pp data cycles last for a */
                                      /* duration of 4 cclk cycles */

 

/*poll to ensure parallel port has completed the transfer*/

while( (* (volatile int *)PPCTL & (PPBS|PPDS) ) != 0);

/* Turn of the Parallel Port */
* (volatile int *)PPCTL = 0;

/* initiate parallel port DMA registers*/
* (volatile int *)IIPP = (int)&dest[0];
* (volatile int *)IMPP = 1;
* (volatile int *)ICPP = sizeof(dest);

* (volatile int *)EMPP = 1;
* (volatile int *)EIPP = EXTBUFF;

/* For 8-bit external memory, the External count is
    four times the internal count */
* (volatile int *)ECPP = sizeof(dest) * 4;


* (volatile int *)PPCTL =  PPBHC|        /* implement a bus hold cycle*/
                            PPEN|        /*enable parallel port*/       
                           PPDEN|        /* implement a bus hold cycle*/
                PPDUR4;       /* make pp data cycles last for a */
                             /* duration of 4 cclk cycles */

/*poll to ensure parallel port has completed the transfer*/

while( (* (volatile int *)PPCTL & (PPBS|PPDS)) != 0);
}

 

Idon`t understand the functions. The source masif is the internal adres, the dest maif is the external? Or the two of them are in internal memory. And i don`t understand the goal of EIPP. When i start the simulator this register count somethnig, but don`t know what. Is there some datasheet(not ADSP2136x Hardware referance) where it says ow exactly work this?

Outcomes