In message <005e01c11564$2d6214c0$0556b0c8@brusque>, Edson Brusque writes >Hello, > > I'm making an RMS voltage measurement with the PIC at one of my >circuits. > > Now, how can I get a precise result if I don't know the frequency and >format of the waveform going to the PIC A/D? > > I mean, if the wave is very clean, like a pure sinusoidal, I could try >to sample it between two zero-crossings and I will have a very precise >value. But what about if it does have some loud harmonics? For example, if >it's a sine with 100Hz plus a sine with 187Hz, both mixed and with the same >intensity, the zero-crossings will be all over the place so I can't sample >between two zero-crossing because the values will be meaningless. > > Any ideas? You can buy chips that do this in hardware, from what I can remember they are some kind of multiplier?. -- Nigel. /--------------------------------------------------------------\ | Nigel Goodwin | Internet : nigelg@lpilsley.co.uk | | Lower Pilsley | Web Page : http://www.lpilsley.co.uk | | Chesterfield | Official site for Shin Ki and New Spirit | | England | Ju Jitsu | \--------------------------------------------------------------/ -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads