Hi! I have a problem with global xdata variables. In main.c I have the following code to make two global arrays.
unsigned int xdata fordonsnummer[100] _at_ 0x000; unsigned int xdata tomvikt[100] _at_ 0x0c8;
extern unsigned int xdata fordonsnummer[]; extern unsigned int xdata tomvikt[];
hi, One function writes a value to a position in the array but when another reads the same value something goes wrong. Try to use volatile keyword:
unsigned int volatile xdata fordonsnummer[100] _at_ 0x000; unsigned int volatile xdata tomvikt[100] _at_ 0x0c8;