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.

ADC PIC16f877A program

Status
Not open for further replies.

alchemy1234

Newbie level 2
Joined
May 18, 2011
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,298
Hello guys, I need your help.

I want to write a program in MikroC for PIC16f877A (40 pin) which does Analog to digital conversion. Basically this is the setup:
There is a 0-10kohm variable resistor connected to a 5v supply and the PIC. On varying the resistance the voltage input to the PIC varies as well. The PIC reads these analog inputs and converts them to binary data. I then want to to do some arithmetic operations on this number and use it as a variable delay. I've used a 4mHz clock for the rest of the program, so it'd be nice if this was in sync with the rest of the program.

Please can anyone help? I'm a total beginner and have just started playing around with PICs and dont know much programming. I understand to an extent what the PIC does and how it stores data in adresh or adresl, but dont know how to go about writing the program. The standard program given in help gives build errors.

Thanks in advance for all those who reply!:smile:
 
Last edited:

hi

just modify a little with this code. I think this is exactly what you are looking for.
 

Attachments

  • PIC-ADC+LCD.rar
    110.5 KB · Views: 76

ok thanks a lot guys. I figured out how to read the analog inputs.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top