Thanks everyone for the help, I think I am going to try and find a real scope that I can use and check things out. --- John Ferrell wrote: > I just duplicated your set up with a 16F628, Futaba > 9101 servo and 4 AA > batteries as a power supply. > The wave form was nice and square on a Tektronix > 475A scope. > > The servo locked up nice & tight indicating all is > working... > > Be certain that > Black is ground > Red is Vcc (center lead) > White is signal > > John Ferrell > 6241 Phillippi Rd > Julian NC 27283 > Phone: (336)685-9606 > johnferrell@earthlink.net > Dixie Competition Products > NSRCA 479 AMA 4190 W8CCW > "My Competition is Not My Enemy" > > ----- Original Message ----- > From: "Joel Middleton" > To: > Sent: Sunday, June 15, 2003 2:51 PM > Subject: Re: [PIC]: Servo Pulse Problem > > > > Futaba S3004 > > --- John Ferrell > wrote: > > > What kind of servo (brand/model). > > > John Ferrell > > > 6241 Phillippi Rd > > > Julian NC 27283 > > > Phone: (336)685-9606 > > > johnferrell@earthlink.net > > > Dixie Competition Products > > > NSRCA 479 AMA 4190 W8CCW > > > "My Competition is Not My Enemy" > > > > > > ----- Original Message ----- > > > From: "Joel Middleton" > > > To: > > > Sent: Sunday, June 15, 2003 1:12 PM > > > Subject: Re: [PIC]: Servo Pulse Problem > > > > > > > > > > I found this schematic on the web and this is > my > > > exact > > > > circuit except the servo signal is connected > to > > > pin 3 > > > > on portb. Also I have all the unused pins > > > connected to > > > > ground. Anyone see anything wrong with the > > > circuit? > > > > > > > > > > > > --- rneel@COX.NET wrote: > > > > > I'm certainly no expert, but it looks like a > > > classic > > > > > capacitor discharge issue to me. If you > have a > > > cap > > > > > on this output, it will take time for it to > > > > > discharge causing the slow decay in voltage > > > instead > > > > > of a nice sharp corner. I can't see your > > > circuit > > > > > but do you have a cap connected across the > pin > > > you > > > > > measured with the scope? > > > > > > > > > > > > From: Joel Middleton > > > > > > > Date: 2003/06/15 Sun AM 01:21:50 EDT > > > > > > To: PICLIST@MITVMA.MIT.EDU > > > > > > Subject: [PIC]: Servo Pulse Problem > > > > > > > > > > > > I believe I am having a problem with the > pulse > > > I > > > > > am > > > > > > sending to a servo connected directly to > portb > > > pin > > > > > 3. > > > > > > I have tmr0 set to overflow ever .0001 > > > seconds. > > > > > The > > > > > > variable 'count' is incremented each time > tmr0 > > > > > > overflows when count reaches 200 it is > reset > > > to 0. > > > > > > When count is equal to zero I set portb > pin 3 > > > and > > > > > when > > > > > > count equals pw1 I clear the pin. I > believe > > > this > > > > > > should give me a 1ms pulse every 20ms. > This > > > was > > > > > not > > > > > > working like I thought and I wanted to > take a > > > look > > > > > at > > > > > > the pulse so I downloaded one of those > > > > > ocilloscopes > > > > > > that runs through a sound card as I did > not > > > have > > > > > > access to a real one. Well I found out > that I > > > am > > > > > not > > > > > > getting a nice square wave. The rising > edge > > > looks > > > > > fine > > > > > > but the falling edge is a slope. Can > anyone > > > tell > > > > > me > > > > > > how to correct this? I have included my > code > > > and > > > > > also > > > > > > attached an image I captured from the > > > occiloscope. > > > > > > Thanks. > > > > > > > > > > > > > > > > > > LIST R=DEC > > > > > > > > > > > > INCLUDE "p16f84a.inc" > > > > > > > > > > > > CBLOCK 0x0C > > > > > > _w > > > > > > _status > > > > > > _pclath > > > > > > _fsr > > > > > > count > > > > > > pw1 > > > > > > ENDC > > > > > > > > > > > > __CONFIG _CP_OFF & _WDT_OFF & _XT_OSC & > > > _PWRTE_ON > > > > > > > > > > > > push macro > > > > > > movwf _w > ;Save > > > > > registers > > > > > > movf STATUS, w > > > > > > movwf _status > > > > > > movf PCLATH, w > > > > > > movwf _pclath > > > > > > clrf PCLATH > > > > > > endm > > > > > > > > > > > > pull macro > > > > > > swapf _pclath, w > > > > > > movwf PCLATH > > > > > > movf _status, w ;Restore > > > registers > > > > > > movwf STATUS > > > > > > swapf _w, f > > > > > > swapf _w, w > > > > > > endm > > > > > > > > > > > > PAGE > > > > > > > > > > > > org 0 > > > > > > nop > > > > > > > > > > > > goto Main > > > > > > > > > > > > org 4 > > > > > ;Interrupt > > > > > > > > > > > > push > > > > > > > > > > > > Timer0 > > > > > > btfss INTCON, T0IF > > > > > > goto Iend > > > > > > movlw 165 > > > > > > movwf TMR0 > > > > > > bcf INTCON, T0IF > > > > > > incf count > > > > > > movlw 200 > > > > > > subwf count, W > > > > > > btfss STATUS, Z > > > > > > goto Step1 > === message truncated === __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu