--0__=80256AFF0046E4D48f9e8a93df938690918c80256AFF0046E4D4 Content-type: text/plain; charset=us-ascii Hi, I hate to reply on this issue because it's a while since I messed with the CCS stuff (and PIC for that matter) but I do remember that the simulator will hang around executing the code fragment which implements the delay. As the simulator is deliberately slow, it will appear that the code has hung up in the delay. Try wiggling the mouse while the code is in the delay - that seemed to speed up the operation if I remember correctly. Dan (Embedded "MATTHEWS, DEAN (D.)" @MITVMA.MIT.EDU> image moved 09/11/2001 10:24 to file: pic17993.pcx) Please respond to pic microcontroller discussion list Sent by: pic microcontroller discussion list To: PICLIST@MITVMA.MIT.EDU cc: Subject: Re: [PIC]:simulting using delay function Security Level:? Internal 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 --0__=80256AFF0046E4D48f9e8a93df938690918c80256AFF0046E4D4 Content-type: application/octet-stream; name="pic17993.pcx" Content-Disposition: attachment; filename="pic17993.pcx" Content-transfer-encoding: base64 CgUBCAAAAABBADEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAABQgABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAA= --0__=80256AFF0046E4D48f9e8a93df938690918c80256AFF0046E4D4-- -- 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