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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/15/09 09:00
Modified:
  11/15/09 09:01

Read: times


 
#170841 - Why use void functions
Responding to: ???'s previous message
Any hardware can give different behaviour. So if you write functions that return values, you will have some idea of where something goes wrong.

Having said that, most library code provides non-void functions, and then people choose to ignore the return values. Which is like returning home at night, and choosing not to turn on the lights. Writing void functions is like building a house with no lighting. Fine in daytime but a little difficult if someone moves the furniture.

As to your AT24C256: look in the data sheet. It has a two byte address register. You just write to the 'addrh' one before doing a 'i2c_restart'.

Compare your i2c operations with those in the data sheet.

Compare your primitive functions with those in ny bit-bang library code.

David.

List of 16 messages in thread
TopicAuthorDate
AT24C256            01/01/70 00:00      
   help            01/01/70 00:00      
   BitBang's Amost Always....            01/01/70 00:00      
   Why use void functions            01/01/70 00:00      
      thanks            01/01/70 00:00      
      Writing to specific address            01/01/70 00:00      
         Send sensible address values.            01/01/70 00:00      
   I2C_0.0.zip            01/01/70 00:00      
   no luck,            01/01/70 00:00      
      You have more pins to mis-wire.            01/01/70 00:00      
   i2c used, What should be the address            01/01/70 00:00      
      Read Murray's excellent Help Files            01/01/70 00:00      
   Incorrect reply            01/01/70 00:00      
      Please take some time to READ the Help            01/01/70 00:00      
   single byte read write working            01/01/70 00:00      
      I2C_0.1.zip released!            01/01/70 00:00      

Back to Subject List