??? 03/10/08 16:19 Read: times |
#152092 - Modified.....seems right, I2C bus going nuts Responding to: ???'s previous message |
I added in EA below adc_init, I could be my handler, but when nothing was input I2C bus was inactive, adding interrupt enable I have a polling square wave on the I2C bus doing something odd. Its after initialization......
My understanding of ADC is this, could I be wrong? initilize ADC Enable interrupts Start conversion Wait for ISR flag Stop conversion Copy then sample data as needed Perform output function Am I missing a step? adc_init(); // Initialize ADC handler EA=1; adc_start_ADC0_conversion(ADC_IMMEDIATE, ADC_AUTOSCANCONT, ADC0_CHANNEL1); //Read CH 1 adc_isr(); //check to see if data conversion is complete adc_stop_ADC0_conversion(); // Stop conversion of A/D ONE SHOT READ PER CYCLE LOOP adc_convert_data('0'); // Read result from conversion register |
Topic | Author | Date |
Problems with Code Architect and interrupts | 01/01/70 00:00 | |
where is the ISR? | 01/01/70 00:00 | |
Erik... | 01/01/70 00:00 | |
you enable an interrupt for which there is no ISR | 01/01/70 00:00 | |
I missed the ISR routine.... | 01/01/70 00:00 | |
Whoops, here is the .c file with the ADC ISR..... | 01/01/70 00:00 | |
Also forgot mention...simulation works fine | 01/01/70 00:00 | |
I found part of my problem | 01/01/70 00:00 | |
Interrupts | 01/01/70 00:00 | |
Modified.....seems right, I2C bus going nuts | 01/01/70 00:00 | |
Polling or Interrupts | 01/01/70 00:00 | |
Exactly...... | 01/01/70 00:00 | |
Opinion | 01/01/70 00:00 | |
Gentlemen....thats what I thought I had!! | 01/01/70 00:00 | |
Port config![]() | 01/01/70 00:00 | |
poll .... | 01/01/70 00:00 |