Pulsin to pulsout with up than 4MHZ crystal ?


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    RCtech , Yes you are correct. The commands resolution depends on the oscillator used. So you must multiply or divide the variable accordingly.

    Dave Purola,
    N8NTA

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink Pulsin and Pulsout Mysteries

    Hi, RCTech

    Assuming DEFINE OSC doesn't interfere with osc speed for pulsin and pulsout, result won't be the same @ 4Mhz and @ 20 MHz. ratio will be 5 , as you tell.
    The Valinpulse value will be the same for Pulsin and Pulsout.

    Now, as RC is in your pseudo ... RC pulses values are ~ 80 to 220 @ 4Mhz and 400 to 1100 @ 20 Mhz ... okay, but...

    @ 4Mhz, you write: Valinpulse var BYTE ....and @ 20 Mhz you MUST write : Valinpulse var WORD !!!

    and I didn't see that in your code ...

    Also take care, if you ever use DEFINE PULSIN_MAX to allow for the full signal ( 0 AND 1 state duration = full period )

    Now, a little Trick seen nowhere :

    Always Write : LOW PORTX.Y before a Pulsout statement ... many ununderstandable bugs come from here !!! ( explanation is in High capacitive loads behaviour of PICs ... and the Pulsout way of work )

    Alain
    30 years of R/C ...
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Jan 2006
    Location
    North of France
    Posts
    18


    Did you find this post helpful? Yes | No

    Smile

    Quote Originally Posted by Acetronics
    Hi, RCTech

    .../...The Valinpulse value will be the same for Pulsin and Pulsout.
    Okay, i'm not totally wrong ;O)

    Quote Originally Posted by Acetronics
    @ 4Mhz, you write: Valinpulse var BYTE ....and @ 20 Mhz you MUST write : Valinpulse var WORD !!!
    Whow, i didn't know that little difference !

    Quote Originally Posted by Acetronics
    .../...
    Now, a little Trick seen nowhere :
    Always Write : LOW PORTX.Y before a Pulsout statement .../...
    Thanx, i'm just a little bit more intelligent than yesterday, many many thanx.
    Now it's half past 3 AM : too late for me to do the tests but tomorrow probably, i'll post a feedback.

    And.... Nice to see i'm not the only one froggy here !

    Dave, i've tested with multiplying etc (just in case), but, today i'm sure it was a mistake because pulsin & pulsout have the same res. depending the X-tal used so if pulsin have a 5 times ratio at 20Mhz, then, the pulsout too and i don't need to do some corrections by calcs.

    I'll come back on the forum tomorrow or next day to tell if it's okay.

    RCTech

  4. #4
    Join Date
    Jan 2006
    Location
    North of France
    Posts
    18


    Did you find this post helpful? Yes | No

    Thumbs up It's Okay !

    Back to confirm everything is okay, this stupid ''BYTEs'' are changed for ''WORDs'' now !

    Thanx for your help.

Similar Threads

  1. Replies: 17
    Last Post: - 12th April 2014, 02:17
  2. pulsout pulsin on same pin - timing?
    By vacpress in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th January 2009, 07:21
  3. Better understanding PULSIN
    By Wirecut in forum mel PIC BASIC
    Replies: 12
    Last Post: - 29th June 2008, 10:17
  4. Output PIC module
    By freelancebee in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th September 2005, 20:10
  5. Help Quick Need to make code smaller
    By Programmednew in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 25th January 2005, 03:46

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