I Need Help.. I want to generate controlled pulses


Results 1 to 8 of 8

Threaded View

  1. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,139


    Did you find this post helpful? Yes | No

    Default

    I don't know about the LABX1 board, so cannot help you on that.

    About the other matter, as stated, and if I understood it correctly, you need to have a clean frequency at the output while checking the keyboard with PBP interrupts?

    I think it is not going to work as expected, since the PBP interrupts are slow and will introduce jitter at the output.

    I believe it would be easier to use just four inputs and 4 buttons and check these while you have the output High or low and you are waiting for the respective time to exprire.

    Like this:
    loop:
    High output
    gosub check_buttons
    pause xx msec (you have to find the best value here)
    low output
    pause yy msec (you have to find the best value here)
    goto loop

    check_buttons
    if but1=0 then
    xx=value1:yy=value1a
    return
    endif
    if but2=0 then
    xx=value2:yy=value2a
    return
    endif
    if but3=0 then
    xx=value3:yy=value3a
    return
    endif
    if but4=0 then
    xx=value4:yy=value4a
    return
    endif
    return

    Now you have to find by trial and error the most accurate values for the value1 through value4a

    P.S. Experienced programmers might laugh at the above example, but I think you have to start with something simple before jump into interrupts. If you really need interrupts, consider Darrel Taylors Instant Interrupts. The definite solution.

    Ioannis
    Last edited by Ioannis; - 17th November 2007 at 12:30.

Similar Threads

  1. Generate AX. 25 Modem signals with a PIC.
    By Pic Toy in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 3rd January 2008, 13:31
  2. Count pulses between VARIABLE TIME
    By RodSTAR in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th October 2007, 12:44
  3. Timing input pulses and re-outputting them
    By jamie_s in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th February 2007, 01:50
  4. Timed pulses on 2 pins
    By Danie Joubert in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 15th March 2004, 07:38
  5. Counting pulses
    By srspinho in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 19th November 2003, 00:54

Members who have read this thread : 0

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