Bad programming practice. void main() { init hardware. Do the test code. main(); } Better to do it this way: void main() { init hardware. while ( 1 ) do { Do the test code. } } John Dammeyer Wireless CAN with the CANRF module. http://www.autoartisans.com/documents/canrf_prod_announcement.pdf Automation Artisans Inc. Ph. 1 250 544 4950 > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Pic Dude > Sent: Friday, August 09, 2002 5:26 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC] Simple Servo Code > > > If you reduce the font size, you can shrink the > code to much less than 20 pages. :-) > > Seriously though, perhaps this may be smaller code > than what you have... > http://www.botkin.org/dale/servo_tester.htm > > Courtesy of Dale Botkin when I asked a similar > question some weeks back. > > Cheers, > -Neil. > > > > > > -----Original Message----- > > From: pic microcontroller discussion list > > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Nick Stedman > > Sent: Friday, August 09, 2002 5:59 PM > > To: PICLIST@MITVMA.MIT.EDU > > Subject: [PIC] Simple Servo Code > > > > > > Hello, > > > > I'm seeking some code to drive a hobby servo. I understand the > > principle of > > the servo. What's relatively new to me is Assembly. All the stuff > > I've found > > on the web is for driving 4 to 12 servos with serial input > and all these > > other bells and whistles...the code makes my head spin > (some programs are > > over 20 pages!). So if anyone has a very simple program or > routine I can > > look at to understand how to hook up a servo to a pic, it would much > > appreciated. > > Cheers > > Nick > > > > -- > > http://www.piclist.com hint: To leave the PICList > > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > > > > > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu