Writing variables to nonvolitile memory using xdata
My MCU is ADuC841 it had (working with SDK)
62 kBytes on-chip Flash/EE program memory 4 kBytes on-chip Flash/EE data memory
I want to store variable that i get from the serial port and write them to the EEPROM then turn off, turn on the MCU and read them some how (print the stored variable to screen = Hyperterminal) or using interrupt that prints it to screen.
my code is working on the the simulator of keil i see the memory window but on then target MCU it doesn't work
My code:
unsigned char xdata large_array[20] _at_ 1500; unsigned int xdata timer_tick; void INT_EX0() interrupt 0 { puts(large_array); } void main (void) { while(1) { T3CON = 0x87; // 4800 T3FD = 0x08; SCON = 0x52; IT0 = 1; // Configure interrupt 0 for falling edge on /INT0 (P3.2) EX0 = 1; // Enable EX0 Interrupt EA = 1; puts("\nEnter string :"); getline(large_array); // get string from serial port puts(large_array); // read from memory and output to serial port } }
the output of the MCU on Hyperterminal is something like all the char in ascii - "abcdefg...!@#$%^&*()..."
WHAT IS THE PROBLEM ??
Thanks in advance !!!
Mayer