CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Differences in instruction times using PIC16F1827 and PIC18F
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
krugger



Joined: 12 Jul 2011
Posts: 18
Location: El Salvador

View user's profile Send private message

PostPosted: Thu Jul 21, 2011 2:32 pm     Reply with quote

The point is I need to take measures at a frequency that allows me to make a FFT to see at least 40th harmonic of the 60 Hz electric signal.

If I'm not wrong this means:

60 Hz x 40 th Harmonic = 2400 Hz

2400 x 2 (Nyquist, better if could be more than x2) = 4800 HZ

4800 Hz x 6 lines (trifasic, 3 Voltages and 3 Intensities) = 28800 Hz

This frequency is the minimum frequency of the whole system, but not the actual of the external ADC, as we're not considering SPI SRAM memory read/write times...

Don't know if I've made myself understood...

XD

Regards

Pablo
krugger



Joined: 12 Jul 2011
Posts: 18
Location: El Salvador

View user's profile Send private message

PostPosted: Fri Jul 22, 2011 9:20 am     Reply with quote

An extra doubt:

In my country, the norm for harmonic distortion measuring in electrical network ask to takes measures each ten minutes during a complete week.

I think I do understand (hopefully) how to create an internat RTCC using timer0, but the point is.

How long does it takes to the PIC to perform all the timer0() interruption attention routine?

The point is that once the measures have started, I can't allow the timer0() to interrupt or it execution time will affect to my measures, incorrelating them in time (i.e. If it interrupts and takes 10 ms to run its attention code) once it returns the measure I'll take won't be the next to the previous one but one 10 ms later, which I can not permit).

So, te solution would be disable interruptions each time before the measures start and enable them again once they've finished, but the problem is that as the measuring & sending process last for, let say, 5 seconds, I'll be losing 5 seconds on my RTCC in each measuring cycle.

Any idea of how can I deal with this?

Thank you!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group