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 12:50
Read: times


 
#98858 - Check WriteData() function for input
Responding to: ???'s previous message
Hello John Bob,

The way you are getting data in your WriteData() function maybe wrong. When you type in "W" or "w" your main loop see that OK and then goes to the WriteData() function where it collects data from the computer and writes to 2404 EEPROM until a carriage return is depressed.

Regards,

Charles Bannister
//*****************************************************************
//	WriteData()  
//*****************************************************************
void WriteData() 
{ 
char data ch; 
//ch = get_char(); 			// remove this line
while(ch != 0x0D) 
{ 
ch = get_char(); 			// insert this line
i2c_writebyte(c++,ch); 
outchar(ch); 
//ch = get_char();                      // remove this line
} 
wrom = 0; 
ES = 1; 
} 


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