AnsweredAssumed Answered

Serial EEPROM operation

Question asked by Andres Gomez on Aug 1, 2009
Latest reply on Sep 3, 2009 by Processor Expert

Hello,

 

I need to display data on screen computer written in a Serial EEPROM. I did a simple test but it does not work. I am using the HCS08QE128 microcontroller SW_I2C bean and I am programming it with CodeWarrior V6.2 (Processor Expert Tool). This is the Main.C code:

 

char mov[]="A B C D E"; 

byte data;
int i;

 

void main(void)
{
  (void)EI2C1_SelectSlave(0x50);
  

  for(i=0;i<sizeof(mov);i++) 
      {

        while(EI2C1_SendChar(mov[i])!= ERR_OK);

        while(EI2C1_RecvChar(&data)!= ERR_OK);

        while(AS1_SendChar(data)!=ERR_OK);
        Cpu_Delay100US(10000);
       }
}

 

The information displayed on the screen is not the written string  "A B C D E" but a string like this "ÿÿÿÿÿÿÿÿÿÿ". I think there is a problem with the variable "data" in functions EI2C1_RecvChar and AS1_SendChar. I really don't know what to do to get the right data in PC screen.  

Outcomes