C166+AR166, MCBXC167-Net Board with XC167 Controller. The Compiler list the following error: "FIELD.C(89): error C176: 'test': automatics require more than 16384 bytes" What does that mean? How can i solve this problem? Thanks in advance!!! Here is the corresponding function: void test(void) { unsigned char field[288][502]; unsigned char *p_field; p_field = &field[0][0]; }
Hi Mike, thanks for your reply. Of course i didn't thought about the 16KB Boarder and the different memory models... But now i see another problem. My aim is to transfer one Byte from the char field to the IO Port3 (P3.0-P3.7) parallel. For this i use the PEC triggered by an fast external interrupt pin (i.e. Ext.Int0 from pin P2.8 - EX0IN). The char field should be located in the external 512KB RAM of the MCBXC167-NET Board. The Problem is, that the PEC Source Pointer must be the pointer p_field. But this is now a 32Bit Pointer and the PEC only supports 24Bit Pointers. Furthermore the PEC could only increment the highest 8 bits of the Source Pointer and that is not enough for the overall field with 288*502 = 144576 values. I would very much appreciate if you could give me some hints. - John
PEC Source Pointer must be the pointer p_field. But this is now a 32Bit Pointer and the PEC only supports 24Bit Pointers. What you think is a 32-bit pointer is essentially a 24-bit pointer. The C166 architecture only supports up to 24 bits for memory addressing. The 8 most significant bits of huge and xhuge pointers are not used. But the PEC has other limitations: it cannot cross 64K boundaries and it can be set to transfer 255 bytes at most. Of course, in the perfect world all pointers and counters would be at least 32-bit, and we would never have to deal with overflows/underflows/whatever. Well, you have to deal with those limitations yourself. It may involve resetting the PEC every once in a while. Or you can ignore the presence of PEC and use interrupts only. - mike
Hello, right now, i could solve the pointer problem... But i'm still working on the PEC Problem. i couldn't find any solution to cross the segment after the PEC Source Pointer has reached the value SRCP0=0xFFFF. A normal Interrupt is not possible because the signals arrive at the external Interrupt Pin P2.8 with 10 MHz. (every 100ns)