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 6 matches
CCS Forum Index
Author Message
  Topic: ADC module in 18F4550
ingemilo

Replies: 9
Views: 37716

PostForum: General CCS C Discussion   Posted: Sat Apr 23, 2016 8:16 am   Subject: ADC module in 18F4550
Also, the code posted is turning the ADC off after the first reading. Read then has to switch it back on. It will do so, but there will then be no acquisition time. Another reason for getting poor rea ...
  Topic: ADC module in 18F4550
ingemilo

Replies: 9
Views: 37716

PostForum: General CCS C Discussion   Posted: Wed Apr 20, 2016 11:22 am   Subject: ADC module in 18F4550
This is my code

#include <18f4550.h>
#device adc=10
#fuses hspll,nowdt,noprotect,nodebug,usbdiv,pll5,cpudiv1,vregen
#use delay(clock=48000000)
#include <usb_cdc.h>

int1 ...
  Topic: ADC module in 18F4550
ingemilo

Replies: 9
Views: 37716

PostForum: General CCS C Discussion   Posted: Wed Apr 20, 2016 10:23 am   Subject: ADC module in 18F4550
Use the forum's search page:
http://www.ccsinfo.com/forum/search.php
Search for:
LM35 setup_adc
Set it to search for all term:
x]Search for all terms
This will get you every thread that has ADC ...
  Topic: ADC module in 18F4550
ingemilo

Replies: 9
Views: 37716

PostForum: General CCS C Discussion   Posted: Wed Apr 20, 2016 9:21 am   Subject: ADC module in 18F4550
I am working in a project with 18F4550.
It needs to acquire data from an LM35 and send it to a PC via USB
The problem is the data acquired is "jumping" in value about 3 or 5 degrees above ...
  Topic: ADC *** Locked. 2004 thread.
ingemilo

Replies: 25
Views: 79786

PostForum: General CCS C Discussion   Posted: Tue Apr 19, 2016 8:00 pm   Subject: Re: adc
Hi,
i'm following the suggestion but it doesn't work.
The code is :

#include <18F452.h>
#DEVICE ICD=TRUE
#DEVICE ADC=10
#include <MATH.H>
#USE FAST_IO(A)
#FUSES HS, NOPROTECT, ...
  Topic: ADC *** Locked. 2004 thread.
ingemilo

Replies: 25
Views: 79786

PostForum: General CCS C Discussion   Posted: Tue Apr 19, 2016 7:44 pm   Subject: ADC *** Locked. 2004 thread.
printf("\n\r ADC-value: %4X \r\n", value);

Here you will get an hexadecimal number

Why don't change as below

printf("\n\r ADC-value: %4Ld \r\n", value);
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group