Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/05/05 15:17
Modified:
  08/05/05 17:01

Read: times


 
#98875 - Uninitialised data!
Responding to: ???'s previous message
Charles,

With the changes you suggested (and layout fixed!), the code becomes:
//*****************************************************************
//	WriteData()  
//*****************************************************************
void WriteData() 
{ 
   char data ch; 
   while(ch != 0x0D) // ch is uninitialised here on 1st entry to the loop!!
   { 
      ch = get_char(); 			
      i2c_writebyte(c++,ch); 
      outchar(ch); 
   } 
   wrom = 0; 
   ES = 1; 
}


Surely, that can't be what you meant?!




List of 10 messages in thread
TopicAuthorDate
Ask i2c between 89c52 and 24c04 ?            01/01/70 00:00      
   A Link!            01/01/70 00:00      
      Wrong Link!            01/01/70 00:00      
   Based on your post about IIC not John!            01/01/70 00:00      
   Check WriteData() function for input            01/01/70 00:00      
      Uninitialised data!            01/01/70 00:00      
         I had initialised the ch variable            01/01/70 00:00      
            Where is your problem?            01/01/70 00:00      
               i have SDCC callable 24cxx ASM routines            01/01/70 00:00      
               Cross-posting            01/01/70 00:00      

Back to Subject List