alchemy1234
Newbie level 2
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:
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: