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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/14/07 11:53
Read: times


 
#134966 - bit-banging a master-slavbe IIC
Responding to: ???'s previous message
The master is easy, it knows when to talk. The slave is more difficult, it must be ready to talk when the master speaks. Thus, while you can bit bang a master in a simple loop (the overhead is less when using a timer), that will not work for slaves (well, it will, but the communication will be horredously variable). Thus, in the slave, you need an interrupt pin to 'detect' master communications and then you have to switch to looped sense. It's been so long, but I seem to recall that to handle one condition efficiently you need both SDA and SCL connevted to each an interrupt pin. Again, you do not NEED to connect anything to an interrupt, the IIC master WILL wait, but the timing impact will lead to 'funny things' elsewhere most likely

Yes, it IS possible, but why not save yourself a lot of troubke and go for a derivative with HW IIC, even the $1 LPCs fro NXP have HW IIC.

Then you gain two things a) 'free' working code (CodeArchitect, free from esacademy) no horrendous overhead from bit-banging. In the pre HW IIC days, I did a bit-banged MS system and, boy, did I lose some hair and was the result 'great'? by no means, but, as stated, it did work.

to get a selection of derivatives with HW IIC use the Keil device database

http://www.keil.com/dd/parm_search.asp

Erik

PS with 15 minutes of work the CodeArchitect code for HW IIC can be mane work on all non-NXP derivatives I know of, except the SILabs deviates (F3x -up)

List of 29 messages in thread
TopicAuthorDate
Master ->Slave communication            01/01/70 00:00      
   That may be your problem            01/01/70 00:00      
   i2c is a bad plan for inter-processor communicatio            01/01/70 00:00      
      I disagree            01/01/70 00:00      
   Broadcast            01/01/70 00:00      
      Some Hardware details            01/01/70 00:00      
         The slave is harder            01/01/70 00:00      
            bitbanging            01/01/70 00:00      
               bit-banging a master-slavbe IIC            01/01/70 00:00      
                  HW I2C            01/01/70 00:00      
                     There are oodles and bunches of other derivatives            01/01/70 00:00      
   RS-485?            01/01/70 00:00      
      as it is local            01/01/70 00:00      
         agree            01/01/70 00:00      
            there are such, but I doubt - that is not somethin            01/01/70 00:00      
            Hence "Broadcast only"            01/01/70 00:00      
               Strong Pullup            01/01/70 00:00      
                  true and untrue            01/01/70 00:00      
   Can we use UART            01/01/70 00:00      
      yes, you have stated \"in the same enclosure\"            01/01/70 00:00      
      Time to review previous replies            01/01/70 00:00      
         Progress            01/01/70 00:00      
            I know it is Atmel, but ...            01/01/70 00:00      
   No mention of SADDR            01/01/70 00:00      
      no secret, it just isn't there            01/01/70 00:00      
      Here            01/01/70 00:00      
         general info that may not apply to all            01/01/70 00:00      
            Results            01/01/70 00:00      
   How we got it for the records            01/01/70 00:00      

Back to Subject List