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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/24/07 12:43
Read: times


 
#141179 - toggling CLK doesnt help!
Responding to: ???'s previous message
Dear Kai,
sorry replying late as I was outstation.
The toggling of CLK line is for preparing the ADC for
next operation as with /CS high no communication occurs.
Interesting development has taken since writing my last
post. I removed CD4052 and put CD4051 instead to select
the various V & A channels. Also used only one CH0 of MCP3202
which was working properly(!). However it doesnt work and same
results are coming. Therefore I have concluded that this is
not MCP problem but the code problem.I get proper DC readings
from both channels. So problem lies in code which takes 64samples in one period of sinewave and then squares the sampled
absolute value (removing VG value of 0x0800 ). Adds the squared
value in interrupt routine only - not shown here but part of
main program in which I use the RDADC bit as flag to wait for
ADC reading to be over.
After summing the sum is divided by 64 and then square rooted.
This is stored in another location as curent reading of that channel.
I clear the 32bit buffer of sum before start of taking RMS
reading. however it seems that last RMS reading remains on
the temporary location of ADC value and thus gets sqaured and
added to sum of Amps value. So divided and squarerooted it adds
offset of V/8 in Amps readings. The next Amps channel gets V/64
and last gets V/512 as offset. How this doesnt happen in V channel I dont understand as I think that A/4096 is very small
value for Vr which is first V channel. However Vy channel which
is next doesnt get Vr/8.
I will putup the main program also if few things which I think
may fix problem doesnt work.
Thanks again,
purushottam

List of 25 messages in thread
TopicAuthorDate
MCP3202 ADC problem            01/01/70 00:00      
   Circuit ?            01/01/70 00:00      
      MCP3202 ADC problem            01/01/70 00:00      
         Testing strategy recommendation            01/01/70 00:00      
            Prototype            01/01/70 00:00      
               Could you specify all parts of your circuit?            01/01/70 00:00      
               What is driving the inputs of CD4052?            01/01/70 00:00      
                  Diagram blues            01/01/70 00:00      
                     Why diode in /CS line of MCP3202?            01/01/70 00:00      
                     Voltage divider directly to input of CD4052?            01/01/70 00:00      
                     Pseudo-differential mode?            01/01/70 00:00      
                        Who cares for Psudo?            01/01/70 00:00      
                           You definitely need buffers at the inputs of ADC!            01/01/70 00:00      
                              No violations            01/01/70 00:00      
      Here is CKT & code            01/01/70 00:00      
         Uncommented, unformatted code :-(            01/01/70 00:00      
            connection to CH0 & CH1            01/01/70 00:00      
               Ckt Diagram            01/01/70 00:00      
            Commented code            01/01/70 00:00      
               Some changes needed            01/01/70 00:00      
                  Formatting Forward Slash - not Backslash!            01/01/70 00:00      
                  Setup problem            01/01/70 00:00      
               Togglings needed while /CS is high?            01/01/70 00:00      
                  toggling CLK doesnt help!            01/01/70 00:00      
      A picture is worth a 1000 words            01/01/70 00:00      

Back to Subject List