serin question?


Closed Thread
Results 1 to 6 of 6

Thread: serin question?

  1. #1
    Join Date
    May 2008
    Posts
    6

    Default serin question?

    Hi

    I have learned recently that "Serin" does not have a buffer therefore it needs some time to decode the data it receives. If I have multiple serin sequences one after the other, how long do I need to wait in order for the code to be received correctly. Below is an example of what I am asking:

    SerIn porta.0, T2400, Data1
    delayms ???
    SerIn porta.1, T2400, Data2
    delayms ???
    SerIn porta.2, T2400, Data3
    delayms ???

    Continue with code*********

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by sachymo View Post
    SerIn porta.0, T2400, Data1
    delayms ???
    SerIn porta.1, T2400, Data2
    delayms ???
    SerIn porta.2, T2400, Data3
    delayms ???
    Try this statement:
    Proton Basic <> MeLabs PicBasicPro

  3. #3
    Join Date
    May 2008
    Posts
    6


    Did you find this post helpful? Yes | No

    Default Repost

    Maybe I should reiterate what I asked:

    Hi

    I have learned recently that "Serin" does not have a buffer therefore it needs some time to decode the data it receives. If I have multiple serin sequences one after the other, how long do I need to wait in order for the code to be received correctly. Below is an example of what I am asking:

    SerIn porta.0, T2400, Data1
    pause ???
    SerIn porta.1, T2400, Data2
    pause ???
    SerIn porta.2, T2400, Data3
    pause ???

    Continue with code*********

  4. #4


    Did you find this post helpful? Yes | No

    Default

    I would suggest that that PIC won't carry on to the next instruction until it has finished dealing with the previous one.
    IF I'm wrong I'm sure Ski will dive in and let me know in some spectacular fashion

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by gringobomba14 View Post
    I would suggest that that PIC won't carry on to the next instruction until it has finished dealing with the previous one.
    IF I'm wrong I'm sure Ski will dive in and let me know in some spectacular fashion
    Nope, you're 100% right...for most (like 99.9%) cases.
    If you've got any assembly going on, for instance DT's Instant Interrupt's, they might get a chance to execute in the middle of most PBP commands, but otherwise, one statement at a time.
    Maybe I should reiterate what I asked:
    I have learned recently that "Serin" does not have a buffer therefore it needs some time to decode the data it receives. If I have multiple serin sequences one after the other, how long do I need to wait in order for the code to be received correctly. Below is an example of what I am asking:
    SerIn porta.0, T2400, Data1
    pause ???
    SerIn porta.1, T2400, Data2
    pause ???
    SerIn porta.2, T2400, Data3
    pause ???
    Continue with code*********
    SERIN hardly needs any time to decode anything, maybe if you're using some of the SERIN/SERIN2 modifiers, those might need a few instruction cycles to execute.
    But any 'decoding' that needs to be done needs to be done by the person behind the keyboard.
    SERIN doesn't know A from B, doesn't know that it needs to jump to here if it gets an A, or set this to that if it receives a B. That's all you. It's up to you to figure out how to receive data continuously and how to process it without missing any data coming in.

  6. #6
    Join Date
    May 2008
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    Thankyou, that has made things clearer

Similar Threads

  1. Serin #Variable question
    By bluesmoke in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 7th July 2009, 17:48
  2. Simple question about Serin..
    By Donat in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 12th March 2008, 16:26
  3. serin string question
    By Sam in forum Serial
    Replies: 11
    Last Post: - 2nd December 2006, 21:29
  4. Serin question
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th August 2006, 23:39
  5. 16f872. config ports and serin question.
    By kitcat in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 20th July 2005, 03:03

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