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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/26/05 22:30
Read: times


 
#85875 - Both SPI and I2C
Responding to: ???'s previous message
If you've got the pins and code space, it's not difficult to bit-bang both SPI and I2C if you happen to be using a variant without dedicated SPI and/or I2C hardware.

If you look at vendor websites, you should be able to find apnotes describing interfacing a uC to a serial eeprom or such. Most times these are in assembly, and can be converted to C if needed. Performance on I2C pretty much requires asm.

On your question about sine and non-sine waves, RMS will give you the most accurate readings. You can run your ADC off a timer interrupt, collect a cycle's worth of samples, then do the calculations required for RMS output. And you can do it without floating point. Fixed point works fine, and saves calculation time and code space. If your voltage/frequency range is known you can limit sizes of a square root lookup table if you don't want to implement an integer square root function.

Dennis

List of 29 messages in thread
TopicAuthorDate
Prepaid Energymeter: need help            01/01/70 00:00      
   SPI can be bit banged            01/01/70 00:00      
      Both SPI and I2C            01/01/70 00:00      
         help me            01/01/70 00:00      
   Already read these notes?            01/01/70 00:00      
   Prepaid Energymeter: need help            01/01/70 00:00      
      GK            01/01/70 00:00      
         UPDATE from my side: 1            01/01/70 00:00      
            better still            01/01/70 00:00      
            Some speed ups            01/01/70 00:00      
               ?            01/01/70 00:00      
                  May be            01/01/70 00:00      
                  Readymade proj charges.            01/01/70 00:00      
            260V, 40A max. assumed for residential?            01/01/70 00:00      
               Residential Supply            01/01/70 00:00      
                  100 to 200 Amps in the US            01/01/70 00:00      
               AC ratings for Residential, India            01/01/70 00:00      
                  Discuss with tutors!            01/01/70 00:00      
   Discuss with tutors!            01/01/70 00:00      
   AD7751 available in Mumbai            01/01/70 00:00      
      Didn't receive sample ICs            01/01/70 00:00      
         Interfacing ADE7751            01/01/70 00:00      
            one more option            01/01/70 00:00      
               No SPI in AT89S52            01/01/70 00:00      
                  AT89C51 RB2/RC2/RD2 has SPI            01/01/70 00:00      
                     Sorry ,Its 89s8252 available with SPI            01/01/70 00:00      
               ADE7751 under development            01/01/70 00:00      
   Updates (Compo. Selection)            01/01/70 00:00      
   LPC900 family            01/01/70 00:00      

Back to Subject List