New with questions


Closed Thread
Results 1 to 6 of 6
  1. #1
    Terke's Avatar
    Terke Guest

    Default New with questions

    Hi All,

    I am new to the forum, and pretty new to PBP. I don't know if this is the right place to post this question. If it is not, better send me to the right spot because I have lots more coming.

    So far PBP has been great to use. The manual is perhaps a bit sparse when it comes to the explanation of the commands. If I should be looking in different documentation please advise.
    If using the PULSEOUT command does the program stop running for the duration of the pulse? I want to make a pin go high and some time later go low. The timing of this pulse is critical, and there is not enough time to sit and wait for the period to pass, lots of other tasks must continue while this pin is high. The period the pin is high varies a lot, so I can't try to run other pieces of code by 'squeezing them in'.

    Thanks for your help

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    You appear to contradict yourself... first you say...

    ...there is not enough time to sit and wait for the period to pass, lots of other tasks must continue while this pin is high...
    then you say...
    The period the pin is high varies a lot, so I can't try to run other pieces of code by 'squeezing them in'
    Now you either want to run other pieces of code whilst your pulse is being generated, or you don't...

    Either way, whilst PULSEOUT is running you can't do anything else in your code during that time. Chose a different method to generate your pulses (example HPWM) if you wish to execute code simultaneously with your pulse generation.

  3. #3
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Terke
    ...I want to make a pin go high and some time later go low. The timing of this pulse is critical...
    give us an idea of the length of that pulse, is it microseconds, minutes, hours . . .?
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  4. #4
    Terke's Avatar
    Terke Guest


    Did you find this post helpful? Yes | No

    Default Some clarification

    Guess I was a little unclear.

    1) The fact that nothing else can happen during the excution of the 'pulseout' command is what I was afraid of.

    2) Without saying so I was already thinking of different stategies, such as counting program steps and thereby 'squeezing' them into two commands i.e. pin high, number of program steps, then pin low.

    To answer the question of the times in volved. The complete 'cycle' of the program will be 480ms to 20ms in length. During this time 8 ADC conversions have to happen, 4 values need to be looked up in various tables, 6 values need to be calculated from these lookup values, and 6 pins need to be driven high and low. Of which three pins need to be high for 2.1ms and the other three pins anywhere from 2ms to 15.5ms. Oh and the rising edge of one pin will need to be read, the period of which will vary between 160ms and 7ms.

    Melanie thank you for your suggestion. I will go and review the HPWM command.

    Cheers

  5. #5
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    If your requirement is that complex, you will almost certainly have to use the PICs internal timers rather than my original HPWM suggestion. Don't even think about calculating instruction cycles, too much going on to even consider that option.

  6. #6
    Terke's Avatar
    Terke Guest


    Did you find this post helpful? Yes | No

    Default

    That's what I was afraid of.

    Thanks Melanie

Similar Threads

  1. Two quick (and elementary) questions.
    By scorpion990 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 26th June 2008, 23:03
  2. A few 12F683 questions
    By dhouston in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 24th May 2008, 03:54
  3. Usart Questions
    By shawn in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 8th March 2008, 01:17
  4. Still new to PicBasic - i2c questions
    By cometboy in forum mel PIC BASIC
    Replies: 4
    Last Post: - 13th November 2006, 18:27
  5. Hi Everyone! Some newbie questions :-)
    By guest_05 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 28th October 2006, 22:24

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