manojkl
Newbie level 5
- Joined
- Aug 16, 2015
- Messages
- 10
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 143
i am using pic16f877a.i wrote a simple code as below.
getting a identifiers error for "CMCON"
.help pls
getting a identifiers error for "CMCON"
.help pls
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 unsigned int temp_res; void main() { ADCON1 = 8; CMCON=0x07; // Configure other AN pins as digital I/O TRISA = 0xFF; // PORTA is input TRISC = 0; // PORTC is output TRISB = 0; // PORTB is output do { temp_res = ADC_Read(2); // Get 10-bit results of AD conversion PORTB = temp_res; // Send lower 8 bits to PORTB PORTC = temp_res >> 8; // Send 2 most significant bits to RC1, RC0 } while(1);}
Last edited by a moderator: