Serin2 Timeout


Closed Thread
Results 1 to 16 of 16

Thread: Serin2 Timeout

Hybrid View

  1. #1

    Default

    Hello,
    What about SEROUT2? I am using:
    serout serpin,N2400,[$55,$55,$55,$55,$55,$AA,$AA,$AA,$AA,$AA,synch,addr ess,address,keydata,keydata,chk_sum]

    and I want to increase it to 4800bps. The manual speaks of this in SEROUT2 and Appendix A,
    and I think I''ve got my bugs cornered up in my other post so I wanted to go a little faster.

    serout2 serpin,16592,[$55,$55,$55,$55,$55,$AA,$AA,$AA,$AA,$AA,synch,addr ess,address,keydata,keydata,chk_sum]

    16592 about what I've calculated for 4800bps, now what do I do with the synch, its value is 254 and do I have this formated right?

    Thank you

    Must be something to the address when I typed it, doesn't have a space
    Last edited by tazntex; - 14th August 2008 at 19:21. Reason: address space

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818

    Default

    Thanks Mackrackit,
    nice little tutorial.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  3. #3
    skimask's Avatar
    skimask Guest

    Default

    Quote Originally Posted by tazntex View Post
    Hello,
    What about SEROUT2? I am using:
    OPEN/LOOK IN THE BOOK!
    SERIN2 and SEROUT2 are the same!!!

    And a little bit more reading would show that you could also save quite a bit of typing.

    This line:
    serout serpin,N2400,[$55,$55,$55,$55,$55,$AA,$AA,$AA,$AA,$AA,synch,addr ess,address,keydata,keydata,chk_sum]

    could act the same as:
    serout2 serpin , mode , [ REP $55\5 , REP $AA\5 , synch , REP address\2 , REP keydata\2 , chk_sum ]
    Last edited by skimask; - 15th August 2008 at 02:37.

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    Quote Originally Posted by tazntex View Post
    16592 about what I've calculated for 4800bps
    But we are not talking about hand grenades
    now what do I do with the synch, its value is 254 and do I have this formated right?
    What do you think the synch does for you? And what does all of the $55,$AA do?

    The $55,$AA s are what I would call the synch(ronizing) part. This prepares the internal workings of the receiver to a "neutral" state ready to receive "highs" and "lows".

    I do not see what your synch is doing for you. You could use it as the wait variable, but then you will most likely want a time-out then to go with it.

    In your case I would "synch" the receiver with the $55,$AA s and send the remaining data dropping the variable holding 254.

    Play with it
    Dave
    Always wear safety glasses while programming.

  5. #5

    Default

    Thanks for the suggestion from both of you. I started out with an example from Bruce's website, Rentron, and I my thinking was the 254 was the qualifier. So, I thought by using a qualifier one tx work be matched to its own rx then if I built two neither would interfere or operate the other. The main question I was asking was Using SERIN2 baud being 4800bps the mode would be 16572. On the receiver I would use this:
    SERIN2 serpin,16572,[wait(254),address1,address2,mydata1,mydata2,chk_su m]
    Return

    What I would like to know is using SERIN at 4800bps changing the above line for SEROUT it does not work. I see in the manual what is says for the calcultion etc for SEROUT2 but not for SEROUT. If I do this:
    SEROUT serpin,16572,[wait(254),address1,address2,mydata1,mydata2,chk_su m]

    Hmmm,....I hope this make sense, haven't had my coffee yet.

    Thanks

    BTW, Skimask, I see your point in using colons. Finding mistakes, typos etc is easier.

  6. #6
    skimask's Avatar
    skimask Guest

    Default

    Quote Originally Posted by tazntex View Post
    What I would like to know is using SERIN at 4800bps changing the above line for SEROUT it does not work. I see in the manual what is says for the calcultion etc for SEROUT2 but not for SEROUT. If I do this:
    SEROUT serpin,16572,[wait(254),address1,address2,mydata1,mydata2,chk_su m]
    And yet again, it's in the book!

    SERIN/SEROUT use one style of mode, SERIN2/SEROUT2 use a different style of mode. They are wholly different...

    It's in the book!

Similar Threads

  1. GPS $GPRMC to PIC16F684. Need help with SERIN2
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 27th November 2009, 09:47
  2. Serin2 and Timeout to Label
    By f0ster52 in forum Serial
    Replies: 2
    Last Post: - 10th April 2009, 03:29
  3. 18f242 serin2 timeout
    By Armadus in forum Serial
    Replies: 1
    Last Post: - 28th July 2007, 22:41
  4. SERIN SERIN2 Timeout
    By markedwards in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd June 2005, 18:59
  5. Serin2 Timeout, how it works?
    By Fossil in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 4th March 2004, 10:09

Members who have read this thread : 2

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