Command Adc_read in mikroc pro no found!!
Posted: 24 Apr 2009 14:45
:?
Example in help for mikroc pro no compiled:
unsigned int temp_res;
void main() {
ANSEL = 0x04; // Configure AN2 pin as analog
TRISA = 0xFF; // PORTA is input
ANSELH = 0; // Configure other AN pins as digital I/O
TRISC = 0x3F; // Pins RC7, RC6 are outputs
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 >> 2; // Send 2 most significant bits to RC7, RC6
} while(1);
}
errors:
undeclared identifier 'ANSEL' in expression
undeclared identifier 'ANSELH' in expression
undeclared identifier 'ADC_Read' in expression
please is happening in this code?
however it works well in mikroc 8.2
is a failure mikro c pro ¿or is happening?
thanks
Example in help for mikroc pro no compiled:
unsigned int temp_res;
void main() {
ANSEL = 0x04; // Configure AN2 pin as analog
TRISA = 0xFF; // PORTA is input
ANSELH = 0; // Configure other AN pins as digital I/O
TRISC = 0x3F; // Pins RC7, RC6 are outputs
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 >> 2; // Send 2 most significant bits to RC7, RC6
} while(1);
}
errors:
undeclared identifier 'ANSEL' in expression
undeclared identifier 'ANSELH' in expression
undeclared identifier 'ADC_Read' in expression
please is happening in this code?
however it works well in mikroc 8.2
is a failure mikro c pro ¿or is happening?
thanks