Serin after instant interupt?


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1


    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.

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,144


    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

  3. #3


    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.

  4. #4
    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.

  5. #5


    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.

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,144


    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