On Sun, 17 Mar 2002, Dale Botkin wrote: > On Sun, 17 Mar 2002, Lasse Madsen wrote: > > > I was wondering if its possible to make 2 oscillators running in one > > pic at the same time ? the PIC is a 12C50x with external 4MHz crystal > > and oscillators should be on 100KHz and 50Hz. > > Tall order, you're talking about switching the output pin every 5 > instruction cycles for the 100KHz output. That's simple as long as you > don't need to do anything else! I saw Olin's post, but the original question was to generate two frequencies simultaneously. 100000/50/2 = 2000 movlw low(2000/2) + 1 ;+1 because Z instead of C movwf lo_50hz ;is used to monitor roll over movlw high(2000/2) + 1 ; the /2 is because two cycles movwf hi_50hz ;of the 100k wave are generated through each pass in the loop movf ioport,w loop movwf ioport ;0 iorlw (1<