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

Can't read/write to XDATA

Can anyone help us?
When can't get the right informations out of XDATA. We have tried to make a logo on a display, and first we placed all the displaydata in CODE (EPROM), and then the logo looks fine. When we wants to change the data to XDATA, we can see on the pixels in the display that we get the addresses on the displaydata, and not the actual data. The code looks like this:


unsigned char xdata ewjlogo[2560] = { 0xC0, 0xC3, 0xFF, 0xFF,............., 0x54};


void make_window() {
  status_check();
  sending_data(0x00);
  status_check();
  sending_data(0x12);
  status_check();
  set_address_pointer();

    
  for (i=0; i<183; i++) {
	status_check();
    sending_data(ewjlogo[i]);
 // Here we send to the display!!

    status_check();   
    data_write_command();
  }
<pre/>

To my knowledge you never the addrese when you use an array like I do when I send data to the display.

Hope someone can help. JAcob!!!

  • If the microcontroller support some space of the internal memory as external memory, it is possible that you may need enable some register with an specific value, to access that xdata memory.
    In the case of the Dallas DS89C420 microcontroller the register name's is PMR with the value 81h.

  • This is consistant with the OE of the EPROM not being enabled. This is because the the address is 1st multiplexed out on P0 and then P0 is read. If the OE of the EPROM is not driven then you are just reading the floating data lines which were just set to the address.