This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

PEC Problem

Keil MCBXC167-NET + uVision3 + AR166


Hello,
i have a problem concerning the PEC. The external Interrupt
PIN P2.8 is configured as the trigger for the PEC.
Every rising edge i want to transfer one byte from the
memory to Port P3 (P3.0 - P3.7). The external Signal
runs with 10 MHz (60ns high - 40ns low). But the PEC
does only transfer one byte every 600ns to Port P3.
What might be the fault? Does the XC167 not detect
the signal properly or is it an internal delay?

Here are parts of my source code:

Regards
-Marco

//---------------------------------------------------------
PLLCON = 0x7D12;
PSW_IEN = 1;
//---------------------------------------------------------
unsigned char xhuge buffer[500][250];
unsigned char xhuge *p_buffer;
//---------------------------------------------------------
unsigned long mem_offset, mem_segment;
DP3 = 0x00FF;
P3 = 0x0000;
PICON = 0x0002;
DP2 = 0x0000;
P2 = 0x0000;
ODP2 = 0x0000;
ALTSEL0P2 = 0x0000;
POCON2 = 0x0000;
CC1_CC8IC = 0x0078;
CC1_CC11IC = 0x0070;
CC1_CC12IC = 0x0074;
UnlockProtecReg();
EXISEL0 = 0x0000;
UnlockProtecReg();
EXISEL1 = 0x0000;
UnlockProtecReg();
EXICON = 0x0141;
PECC0 = 0x15FF; // Continous Transfer,Byte,Decr.SourcePtr
p_buffer = &buffer[0][0];
mem_offset = (( unsigned long) p_buffer) & 0x0000FFFF;
mem_segment = (((unsigned long) p_buffer) & 0xFFFF0000) >> 16;
PECSEG0 = mem_segment << 8;
SRCP0 = mem_offset;
DSTP0 = _sof_(&P3);

//---------------------------------------------------------

0