Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Project using pic 16F877A, codes to write an adc program

Status
Not open for further replies.

SHYAMAJS2

Newbie level 1
Joined
Feb 26, 2010
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Chennai
Activity points
1,297
Hi,
i have to do project using pic 16F877A. Can any one help me out in finding the codes to write an adc program .
Also in memory allocation and memory management and how to use memory locations to save a data from one location to that location and retrieve that data for some calculations.
 

regarding pic coding

Hi,
For ADC, if you use mikroBASIC compiler, you can use the internal library routine like:
Code:
   dim ADVal as word '16-bit register
   ADVal = ADC_Read(0) 'Read from ADC channel 0
or for mikroC:
Code:
   int ADVal;
   ADVal = ADC_Read(0); //Read from ADC channel 0
Otherwise, you have to carry the process out by using the procedure described in the datasheet and reference manual.

Hope this helps.
Tahmid.
 

Re: regarding pic coding

send me the oil density dc for pic16f877a if you have ma,......pleaseeeeeeeeeeeeeeee
 

Are you planning to write the code in C language or in assembly language? If you are opting for C, then use the compiler MikroC IDE which can be download the compiler from the site of microelectronica. If you are opting for assembly language use the compiler MPLAB IDE which could be downloaded from the site as referred by brian.
Then just download the data sheet of PIC16F877A & refer to the ADC module n you will get all the information you needed there. Still if you have doubts post here & we'll surely help you.
Regards,
Jerin. :)
 
Re: regarding pic coding

i have to ccs compiler ma,... i am not using mickroc,.......
 

i am using the oil viscosity checking sensor im mems,.. thatswhat i need the adc programin ccscompiler for pic16f877a ma,............. if it possible for you send that codes of adc program with the viscosity formula,......

---------- Post added at 12:32 ---------- Previous post was at 12:30 ----------

i am using the oil viscosity checking sensor in mems,.. thatswhat i need the adc programin ccscompiler for pic16f877a ma,............. if it possible for you send that codes of adc program with the viscosity formula,...... please,.....

---------- Post added at 12:50 ---------- Previous post was at 12:32 ----------

can you help me mate?
 

So your project i mean requirement is all about is to check the oil viscosity using controller?
Regards,
Jerin.
 

So your project i mean requirement is all about is to check the oil viscosity using controller?
Regards,
Jerin.

yeah,. absolutely ma,.....

---------- Post added at 14:14 ---------- Previous post was at 14:13 ----------

could you say for that??????
 

I just studied ADC few weeks ago....
Its very simple to do in C.
As a first step,
you need to look in the data sheet and study about the four registers -
Adcon1 , adcon0 , adresh,adresl .
 
Can you give any idea of how this process is gonna take place i mean the working of the sensors & role of the controller?
Regards,
Jerin. ;-)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top