Comment out all delays during simulation if you want the simulation to finish before you grow a long grey beard. --Lawrence ----- Original Message ----- From: "MATTHEWS, DEAN (D.)" To: Sent: Friday, November 09, 2001 4:24 AM Subject: Re: [PIC]:simulting using delay function > To all, > > When simulating the code below when stepping through the program, when the line delay_ms(100); is executed the program jumps to #use delay(clock=20000000) and it seems to just stay there! Is this true or is it just implementing the delay of 10mS (which is goinig to take a hell of a lot of steps to acieve manually. Because when I run the program normally it seems that the program gets stuck on #use delay(clock=20000000). > > > > #include<16F877.h> > > #use delay(clock=20000000) > > #byte port_b = 6 > > #use fast_io(b) > > > > void main (void) > > { > > long value; > > > > setup_adc_ports(RA0_ANALOG_RA3_REF); > > setup_adc( ADC_CLOCK_INTERNAL ); > > set_adc_channel( 0 ); > > > > do { > > value = Read_ADC(); > > delay_ms(100); > > set_tris_b(0); > > port_b = value; > > } while (TRUE); > > } > Dean Matthews > > -- > 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