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 9 matches
CCS Forum Index
Author Message
  Topic: Wrong ADC value
surajka

Replies: 15
Views: 23934

PostForum: General CCS C Discussion   Posted: Mon Oct 05, 2015 6:18 am   Subject: Wrong ADC value
The input impedance of the instrumentation amplifier was 1M previosly, and feedback resistance 1M, in parallel with 1uF MLC. Output from the opamp was connected to mcu through a 4.7k resistor. Tried a ...
  Topic: Wrong ADC value
surajka

Replies: 15
Views: 23934

PostForum: General CCS C Discussion   Posted: Mon Oct 05, 2015 4:37 am   Subject: Wrong ADC value
The output was from an opamp instrumentation amplifier with a 4.7k impedance added. There is no negative supply rail involved. I removed the connection and added another voltage source to the pin. Now ...
  Topic: Wrong ADC value
surajka

Replies: 15
Views: 23934

PostForum: General CCS C Discussion   Posted: Mon Oct 05, 2015 3:58 am   Subject: Wrong ADC value
RF Developer, I changed the code as you suggested. I included a floating input AN5(no such pin in the IC). Stable voltage is connected to AN10.
I am posting the code and results below. Strange thing ...
  Topic: Wrong ADC value
surajka

Replies: 15
Views: 23934

PostForum: General CCS C Discussion   Posted: Mon Oct 05, 2015 3:33 am   Subject: Wrong ADC value
I am getting more stable values in the floating pins.

The simulation in proteus is giving the right values.
  Topic: Wrong ADC value
surajka

Replies: 15
Views: 23934

PostForum: General CCS C Discussion   Posted: Mon Oct 05, 2015 3:24 am   Subject: Wrong ADC value
I changed to the code. No results.
#include <16F886.h>
#device adc=10

#FUSES NOWDT //Watch Dog Timer
#FUSES PUT //Power Up Timer
//!#FUSES PROTE ...
  Topic: Wrong ADC value
surajka

Replies: 15
Views: 23934

PostForum: General CCS C Discussion   Posted: Sun Oct 04, 2015 7:40 am   Subject: Wrong ADC value
What do you think the line in bold does ?
#include <16F886.h>
#device adc=10

#FUSES WDT //Watch Dog Timer
#FUSES PUT //Power Up Timer
//!#FUS ...
  Topic: Wrong ADC value
surajka

Replies: 15
Views: 23934

PostForum: General CCS C Discussion   Posted: Sun Oct 04, 2015 6:44 am   Subject: Wrong ADC value
hmm...
1) According to the datasheet I have , table 0-1, Fosc/8 is the only valid selection unless the PIC is in SLEEP.

2) You should disable the PWM peripheral as it uses that pin,though you say ...
  Topic: Wrong ADC value
surajka

Replies: 15
Views: 23934

PostForum: General CCS C Discussion   Posted: Sun Oct 04, 2015 5:23 am   Subject: Wrong ADC value
this ...
setup_adc(ADC_CLOCK_INTERNAL);

probably is the problem.

Check the PIC datasheet, ADC section and review the text and charts as to what ADC clocks are valid for a 4MHz processor speed ...
  Topic: Wrong ADC value
surajka

Replies: 15
Views: 23934

PostForum: General CCS C Discussion   Posted: Sun Oct 04, 2015 4:43 am   Subject: Wrong ADC value
I am getting wrong ADC values.

compiler v4.130

My output is getting like this
BAT = 768
BAT = 0
BAT = 453
BAT = 377
BAT = 0
BAT = 593
BAT = 0
BAT = 768
BAT = 0
BAT = 428
BA ...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group