> Hello,
>
> I see... I though one had to set the channel and then wait for a int_adc
> interrupt that would let you know the data is ready. How long to I have to
> wait between calling set_adc_channel( ) and read_adc( ) (or does CCS handle
> this)?
>
> Thanks
>
>
> > Hi,
> >
> > you obviously did not start the A/D conversion itself by means of
> >
> > ... = read_adc()
> >
> > I hope this helps.
> >
> > Regards,
> > Imre
> >
> >
> > On Sun, 27 May 2001, Donovan Parks wrote:
> >
> > > I posted the wrong code below... here is the correct code:
> > >
> > > #INT_AD void Analog_Handler()
> > > {
> > > puts ( " In Analog Handler! " );
> > > }
> > >
> > > void main( )
> > > {
> > > puts( "Hello!");
> > > enable_interrupts(GLOBAL);
> > > enable_interrupts(INT_ADC);
> > > enable_interrupts(ADC_DONE);
> > > setup_adc(ADC_CLOCK_DIV_32);
> > > setup_adc_ports(ALL_ANALOG);
> > > set_adc_channel(0);
> > > while (1);
> > > }
> > >
> > > Thanks for any help.
> > >
> > >
> > > > Hello,
> > > >
> > > > I'm using the CCS C compiler and am having trouble getting a #int_ad
> > > > interrupt to fire. I am using the following code:
> > > >
> > > > void main( )
> > > > {
> > > > puts( "Hello!");
> > > > enable_interrupts(GLOBAL);
> > > > enable_interrupts(INT_ADC);
> > > > enable_interrupts(ADC_DONE);
> > > > set_adc_channel(0);
> > > > while (1);
> > > > }
> > > >
> > > > #INT_AD void Analog_Handler()
> > > > {
> > > > puts ( " In Analog Handler! " );
> > > > }
> > > >
> > > > Note: I am enabling serial communication and do recieve "Hello!".
> > > >
> > > > Does anyone have any experience with CCS and interrupts?
> > > >
> > > > Donovan
> > > >
> > > > --
> > > >
http://www.piclist.com hint: The list server can filter out subtopics
> > > > (like ads or off topics) for you. See
http://www.piclist.com/#topics
> > > >
> > > >
> > > >
> > >
> > > --
> > >
http://www.piclist.com hint: The list server can filter out subtopics
> > > (like ads or off topics) for you. See
http://www.piclist.com/#topics
> > >
> > >
> > >
> > >
> >
> > --
> >
http://www.piclist.com hint: The list server can filter out subtopics
> > (like ads or off topics) for you. See
http://www.piclist.com/#topics
> >
> >
> >
>
> --
>
http://www.piclist.com hint: The list server can filter out subtopics
> (like ads or off topics) for you. See
http://www.piclist.com/#topics
>
>
>
>