Timing scheme


Results 1 to 9 of 9

Thread: Timing scheme

Threaded View

  1. #9
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    I can suggest the following approch:

    Read cycle and ontime word variables
    Compare the the two variables and adjust ontime to cycle if ontime is greater then cycle

    IF ONTIME>CYCLE THEN ONTIME=CYCLE

    If you don't want offtime=0 then you can add the proper offset

    IF ONTIME>=CYCLE THEN ONTIME=(CYCLE-OFFSET)

    Set high output pin
    loop for for the cycle delay and check ontime
    when loop reach ontime value set low output pin
    continue the loop till you reach the cycle time.

    Ontime will be adjustable and always within cycle time

    Al.
    Last edited by aratti; - 6th November 2008 at 15:07.
    All progress began with an idea

Similar Threads

  1. 12F683 serout timing
    By Hobie Cat in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 21st December 2009, 16:57
  2. 18F2550 timing
    By sstt1976 in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 22nd August 2008, 00:30
  3. PIC 12c509 - No External timing components
    By stay_aliveuk in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th September 2006, 17:20
  4. Questions on timing
    By malc-c in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 6th July 2006, 22:38
  5. HSEROUT buffering and timing - 16F88
    By picster in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 5th March 2006, 17:52

Members who have read this thread : 0

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

Tags for this Thread

Posting Permissions

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