Serin after instant interupt?


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    Did you find this post helpful? Yes | No

    Default

    Hi,
    Can you you use the handshake feature of SERIN2?

    Is there a specific range of values of the byte you are sending? I'm trying to see how the actual bitpattern looks and if it might be possible to fool it by, for example, setting up the sender to send 2 stopbits but the receiver is set to 1 stopbit or something.

    That way the startbit trips the interrupts then the first databit acts as the actual startbit, seven more databits, first stopbit acts as the 8th databit and the second stopbit acts as actual stopbit.

    Not saying it'll work just thinking out loud.

    /Henrik.

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: Serin after instant interupt?

    Just bumping this old thread as i want to revisit the idea.

    I don't have access to the transmitting device so can't add bits or change format etc.
    I can't use handshaking etc.
    My PIC18F2680 Hardware Usarts/hserin etc are already committed.

    I want to trigger an interrupt when a pin goes low (it idles high) then receive that incoming serial data with Serin2
    If it jumps to the Serin2 quickly enough will it work? Or will I lose that first bit.

    The actual first byte of incoming data isn't critical (it's a header) but the next 4-5 bytes are.

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default Re: Serin after instant interupt?

    Say that you use the low-going edge as an interrupt trigger.

    Then you start the Serin command that waits for the negative going edge. My guess is that it will loose the first byte and then will receive next one.

    So, I would make two same characters as a start, one will be lost, the second will be the wait character, and then start getting the payload.

    Ioannis

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: Serin after instant interupt?

    I don't have any control over the transmitting device.. So I can't add bytes.

  5. #5
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: Serin after instant interupt?

    You could also manually read the RCREG directly.

  6. #6


    Did you find this post helpful? Yes | No

    Default Re: Serin after instant interupt?

    I'm using software serin2 on a non usart pin.. My hardware UART are taken.

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default Re: Serin after instant interupt?

    Any chance to use a PIC with two USARTs?

    Ioannis

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