different software times, impossible?


Closed Thread
Results 1 to 39 of 39

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,632


    Did you find this post helpful? Yes | No

    Default Re: different software times, impossible?

    try thisName:  Untitled.jpg
Views: 906
Size:  54.3 KB

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: different software times, impossible?

    400*300+300=240.000 us
    1.000.000 us /240.000 us =4,1666666667
    4,1666666667*400 pulses =1.666,66666668 hz for one second if the quartz is precise.......

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: different software times, impossible?

    the pwm work good and the frequency counter confirm the exact frequency and its possible to stop it at a fixed point, now i need a second timer to count the y pulses other than 400) with a same time of x. The x train with 400 pulses do the work in: 400*300+300=240.000us. I need the same time for y, with pulses other than 400....

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: different software times, impossible?

    what's the lowest possible increment in uS units of the two other timers with 20mhz quartz?

  5. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,632


    Did you find this post helpful? Yes | No

    Default Re: different software times, impossible?

    what's the lowest possible increment in uS units of the two other timers with 20mhz quartz?
    i think thats the wrong question

    1. first thing is what time intervals are required to toggle the output at to achieve for the given number of pulses in the time frame
    2. are they all possible within the available timer resolution ? how many pulses do you really need ? steps of 5 10, 50 ,1 ,2 ?
    3. what method will be fast enough to toggle the output and count the pulses too .ie an isr or a fast loop to monitor timer overflows

    PULSES TOGGLES PERIOD uS
    100 199 1204.52
    101 201 1192.54
    150 299 801.67
    200 399 600.75
    250 499 480.36
    300 599 400.17
    350 699 342.92
    400 799 300.00
    450 899 266.63
    500 999 239.94
    550 1099 218.11
    599 1197 200.25
    600 1199 199.92

  6. #6


    Did you find this post helpful? Yes | No

    Default Re: different software times, impossible?

    hi richard, to match the x pulses (1666hz) for the y pulses i need to set a range from 500us (250high+250low) to 7500us (3750high+3750low) the increment can be 50us. For your 3rd question i need your help....

  7. #7
    Join Date
    May 2013
    Location
    australia
    Posts
    2,632


    Did you find this post helpful? Yes | No

    Default Re: different software times, impossible?

    if you go down that path then


    Code:
    toggle /time pulses
    250 479
    300 399
    350 342
    400 299
    450 266
    500 239
    550 217
    600 199
    650 184
    700 171
    750 159
    800 149
    850 141
    900 133
    950 126
    1000 119
    1050 114
    1100 108
    1150 104
    1200 99
    1250 95
    1300 92
    1350 88
    1400 85
    1450 82
    1500 79
    1550 77
    1600 74
    1650 72
    1700 70
    1750 68
    1800 66
    1850 64
    1900 63
    1950 61
    2000 59
    2050 58
    2100 57
    2150 55
    2200 54
    2250 53
    2300 52
    2350 51
    2400 49
    2450 48
    2500 47
    2550 47
    2600 46
    2650 45
    2700 44
    2750 43
    2800 42
    2850 42
    2900 41
    2950 40
    3000 39
    3050 39
    3100 38
    3150 38
    3200 37
    3250 36
    3300 36
    3350 35
    3400 35
    3450 34
    3500 34
    3550 33
    3600 33
    3650 32
    3700 32
    3750 31
    then :-
    1. your range is 31 to 479 pulses nothing like the 100-600 initially specified
    2. not every period produces a different pulse count
    3. pulses will not always finish synchronously within the 400 pulse stream
    4. the pulse count varies in a non-linear manner
    Name:  Untitled.jpg
Views: 767
Size:  25.2 KB

Similar Threads

  1. WDT times not as expected 18f46k80
    By longpole001 in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 18th July 2015, 04:22
  2. MCSP, PBP260, Win7 - is it impossible?
    By HenrikOlsson in forum General
    Replies: 18
    Last Post: - 26th January 2010, 17:08
  3. Drive relay between two times
    By Pedro Pinto in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th December 2009, 09:19
  4. Instruction times
    By BobEdge in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th June 2009, 09:16
  5. Calling Subroutines Multiple Times
    By Forkosh in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 17th March 2008, 07:11

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