You may supply the motor and the pic from same supply ( if motor need +5V ) but you must take care about connections. Physically you need to conect the motor closer to the power supply and after that the pic chip. Also a great value capacitor (470-1000uF) must be connected near motor on supply wires. It's better if a driver/isolator chip is included between pic and fet transistors. BUT AGAIN: Why chopped pyrometer ? Vasile On Wed, 7 Feb 2001, Graham North wrote: > Hi, if you read my last post you will know that I am > controlling a motor in a pyrometer. > > Well I have achieved a PWM output, but am having a few > problems. > > I think the motor is 'sending' (right word?!) some noise > to the PIC, I have it running from a seperate supply, but > have had to tie the two grounds together because the FET > needs the source to be zero volts. I have a diode connected > accross the motor, and decoupling caps everywhere! What > else can I do? > > I have also written a piece of code that increases the > duty cycle with a switch press connected to PORTA,0 but > this does not work. I think it is switch bounce causing > this. Is there a way to debounce a switch in S/W? Or is > my code rubbish? > > Main > call InitPorts > call InitPWM > > Loop > btfsc PORTA,0 ; If switch is not pressed > goto Loop ; don't worry > > movlw B'00000001' > addwf CCPR1L > > goto Loop > > This code does not take into account the CP1CON,5 and > CCP1CON,4 bits. Is there a way to increase the duty cycle > in this way, including these bits? > > Well thats enough questions now, I hope someone can give > me some answers. > > Thanks for your help, > > Graham North > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > -- > 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 PICList is archived three different ways. See http://www.piclist.com/#archives for details.