hi.. im programmed my adc using mikroC. the program is:
unsigned int adc_value;
void main() {
ADCON1 = 0x80; // Configure analog inputs and Vref
TRISA = 0xFF; // PORTA is input
TRISB = 0x3F; // Pins RB7, RB6 are outputs
Usart_Init(115000);
do {
adc_value = Adc_Read(2); // Get results of AD conversion
Usart_Write(adc_value);
Delay_us(200);
} while(1);
}
my project is an oscillscope.. my problem now is that at frequencies more than 10Hz the wave displayed in my PC software is distorted.. im using USB as an interface. can anyone tell me whats wrong with my program.. my knowledge is limited in PIC programming. can anyone show me how to program the microcontroller using interrupts? im using 256000 baud rate.. please help me..[/youtube]