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

Search found 14 matches
CCS Forum Index
Author Message
  Topic: RMS Value Calculation Using 12 bit ADC
mictel

Replies: 19
Views: 32017

PostForum: General CCS C Discussion   Posted: Fri Sep 05, 2014 4:25 pm   Subject: RMS Value Calculation Using 12 bit ADC
Ditched the FP math thanks to the knowledge shared here. Now have the 12 bit ADC RMS measurement working with integer math. Did not do a comparison on speed but here is the results for accuracy:

...
  Topic: RMS Value Calculation Using 12 bit ADC
mictel

Replies: 19
Views: 32017

PostForum: General CCS C Discussion   Posted: Tue Aug 26, 2014 6:31 am   Subject: RMS Value Calculation Using 12 bit ADC
You folks are great! I really appreciate the suggestions and encouragement to consider switching over to integer math. I presently lack the knowledge on how to do that so took the easy way out; FP. ...
  Topic: RMS Value Calculation Using 12 bit ADC
mictel

Replies: 19
Views: 32017

PostForum: General CCS C Discussion   Posted: Mon Aug 25, 2014 5:58 am   Subject: RMS Value Calculation Using 12 bit ADC
Not sure why changing the format in a printf statement from %f to %E would change memory requirements to be out of ROM.

I did not measure how long it takes for the FP RMS calculation but can say th ...
  Topic: RMS Value Calculation Using 12 bit ADC
mictel

Replies: 19
Views: 32017

PostForum: General CCS C Discussion   Posted: Mon Aug 25, 2014 4:46 am   Subject: RMS Value Calculation Using 12 bit ADC
Thank you for the explanation and suggestions. Interestingly, it all seems to be working fine even with the analog input voltage up to maximum, 5V.

The large value of the sum of the squares displa ...
  Topic: RMS Value Calculation Using 12 bit ADC
mictel

Replies: 19
Views: 32017

PostForum: General CCS C Discussion   Posted: Sat Aug 23, 2014 8:02 pm   Subject: RMS Value Calculation Using 12 bit ADC
The complier version is PCM 5.026

Both versions of the format are shown. The %E format is rounded but not totally bogus. The problem is when I try to use the %e format in my main program, the com ...
  Topic: RMS Value Calculation Using 12 bit ADC
mictel

Replies: 19
Views: 32017

PostForum: General CCS C Discussion   Posted: Sat Aug 23, 2014 4:45 pm   Subject: RMS Value Calculation Using 12 bit ADC
I changed code example ex_rmsdb.c from 8bit to 12bit ADC using the 16F1789. The algorithm squares the samples then sums them up so the sum gets very large very quick but thought I was OK since the li ...
  Topic: Internal Op-Amp Not Working [Solved]
mictel

Replies: 1
Views: 3437

PostForum: General CCS C Discussion   Posted: Fri Jun 27, 2014 10:20 pm   Subject: Problem Solved
After some experimentation and quality time with the data sheet...

The format of Op-Amp setup is:

setup_opamp1(OPAMP_ENABLED|OPAMP_HIGH_GBWP_MODE);

Note that the option to connect the inverti ...
  Topic: Internal Op-Amp Not Working [Solved]
mictel

Replies: 1
Views: 3437

PostForum: General CCS C Discussion   Posted: Fri Jun 27, 2014 8:26 pm   Subject: Internal Op-Amp Not Working [Solved]
I'm trying to use the internal Op-Amps in the 16F1789 for the first time. I configured them as follows:

setup_opamp1(OPAMP_ENABLED);
setup_opamp1(OPAMP_HIGH_GBWP_MODE);
...
  Topic: Op Amps and ADCs using the same pin
mictel

Replies: 6
Views: 9415

PostForum: General CCS C Discussion   Posted: Sun Jun 15, 2014 9:11 pm   Subject: Op Amps and ADCs using the same pin
Well that is the way I had hoped it would work so you don't have to use up other ADC pins but was not sure. The 16F527 made things even more confusing with specific block diagrams showing one of the ...
  Topic: Op Amps and ADCs using the same pin
mictel

Replies: 6
Views: 9415

PostForum: General CCS C Discussion   Posted: Sun Jun 15, 2014 9:06 am   Subject: Op Amps and ADCs using the same pin
The data sheet on the 16F1789 OPA Module does not show any lines going to the ADC Mux so then I assume you can not read the OP Amp output with the ADC channel assigned to the same I/O pin on the 16F17 ...
  Topic: Op Amps and ADCs using the same pin
mictel

Replies: 6
Views: 9415

PostForum: General CCS C Discussion   Posted: Sun Jun 15, 2014 9:00 am   Subject: Op Amps and ADCs using the same pin
Thanks for the information. I am using the 16F1789 and the data sheet is not apparently as friendly. I did not see any association between the OPA module and the ADC module other than they are assoc ...
  Topic: Op Amps and ADCs using the same pin
mictel

Replies: 6
Views: 9415

PostForum: General CCS C Discussion   Posted: Sun Jun 15, 2014 5:59 am   Subject: Op Amps and ADCs using the same pin
Can the same pin be assigned as Op Amp output and ADC input? Have not used PIC Op Amp function yet and did not find this topic when I searched.

It seems obvious this is possible since ADC inputs o ...
  Topic: MPLAB X Unable to Resolve Identifier
mictel

Replies: 2
Views: 21016

PostForum: General CCS C Discussion   Posted: Sat May 24, 2014 12:32 pm   Subject: MPLAB X Unable to Resolve Identifier
Thank You!
  Topic: MPLAB X Unable to Resolve Identifier
mictel

Replies: 2
Views: 21016

PostForum: General CCS C Discussion   Posted: Sat May 24, 2014 7:32 am   Subject: MPLAB X Unable to Resolve Identifier
New to MPLAB X Version 2.10. Using PCM Version 5.062. Created a project from a project that works just fine in MPLAB V8.92. Installed the CCS C plug in, program compiles successfully with no errors ...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group