Pari Boopathy
Newbie level 6
- Joined
- Mar 13, 2014
- Messages
- 14
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 94
Hi,, i am new to tis ADC Module.. i m using PIC16F887+MPLAB IDE-Hi-Tech C.....
I ve some doubts,, i ve to give 5v to RA0 pin and 0v to RA1 pin of microcontroller..I just connected 2 LED's as output in any other port,,say PORTD.
Wen i m giving 5v,,one LED will blink and if 0v another LED will Blink..
In my program,, i first convert 5v to digital val(1111111111) and 0v to (0000000000)..Then check,,whether if its all 1,blink one LED..
Prgm:
I ve some doubts,, i ve to give 5v to RA0 pin and 0v to RA1 pin of microcontroller..I just connected 2 LED's as output in any other port,,say PORTD.
Wen i m giving 5v,,one LED will blink and if 0v another LED will Blink..
In my program,, i first convert 5v to digital val(1111111111) and 0v to (0000000000)..Then check,,whether if its all 1,blink one LED..
Prgm:
Code dot - [expand] 1 2 3 4 5 6 7 8 9 10 ADCON0=0x01; ADCON1=0x80; Val=ADRESH; Val=(Val<<8)|ADRESL; PORTD=Val; if(PORTD=0xFF) { RD0=1; } else RD1=1;