Problem with PULSEOUT


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2007
    Posts
    21

    Angry Problem with PULSEOUT

    I am using the PIC16F616
    I modified two HS425BB servos for continuous rotation and I cannot get them to go counterclockwise. Every pulse that I give makes the servo spin clockwise ( but at different speeds based on the pulse).

    What can I do to make it go counterclockwise????



    Define OSC 8

    symbol servo1=portc.3
    symbol servo2=portc.2
    x var byte
    b var byte

    pause 20
    x = 50
    b = 250
    main:
    pulsout servo1,x
    Pulsout servo2,b



    goto main

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    The Servo pulses should be between 1.05 - 1.95 ms

    With an 8Mhz OSC, the resolution of PULSOUT is 5 us.

    0.00105/0.000005 = 210 - Minimum PULSOUT
    0.00150/0.000005 = 300 - Center or Stop
    0.00195/0.000005 = 390 - Maximum PULSOUT

    And, the overall frequency should be approx 50Hz.
    So the PAUSE 20 needs to be inside the Main loop.

    ADDED:
      They need to be Positive Pulses, so you should make sure the pins are LOW to start with.
      PORTC = 0 should do it, in your case.
    <br>
    Last edited by Darrel Taylor; - 21st October 2007 at 03:52. Reason: Polarity
    DT

  3. #3
    Join Date
    Oct 2007
    Posts
    21


    Did you find this post helpful? Yes | No

    Default Thanks!

    Thanks


    What are the differences of running the PIC at 8mhz or at 4mhz? NAyadvantages at the 8mhz speed???

Similar Threads

  1. Problem with ASM IRQ using FSR0 on PIC18F252
    By mytekcontrols in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 11th March 2008, 20:48
  2. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 08:12
  3. PicBasic Pro Math Problem??
    By Glen65 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th March 2006, 04:36
  4. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 22:59
  5. PORTA.PinNo = 1 ' problem
    By frank small in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 6th May 2004, 14:30

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts