Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

pic16f877 adc programming

Status
Not open for further replies.

bluemonday

Newbie level 6
Joined
May 4, 2007
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,395
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]
 

This is normal :cry:

For example when I think in a oscilloscope with 18f458, after some calcs from data in the datasheet I saw that you can only get a +-30KS/s :cry:

Exist some 18F that can do +-200KS/s but is still a lower value!

EDIT:

Well I didn't saw the "10Hz", I tough it was 10KHz.
If the signal is 10Hz then you have a problem.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top