serial port interrupt without using hserin


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2011
    Posts
    21

    Question serial port interrupt without using hserin

    hi

    can any one tell me how to use interrupt using serin and serin2?
    i know serial interrupt can be setup if using hserin but is it possible to setup interrupt using serin and serin2.
    in my application i needed to used 3 serial port for receiving some data. i am using pic18f4550

    thanks

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521

    Default Re: serial port interrupt without using hserin

    You'd have to run the serial input to a pin which can trip an external interrupts, like RB0, set it up to the correct polarity and then have the SERIN in your ISR. I've never tried this though so don't take my word for it.

    /Henrik.

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default Re: serial port interrupt without using hserin

    Yes this may work, but don't expect reliability if you receive long messages... and I'm pretty sure SERIN/DEBUG/SERIN2 will not work AS-IS as the interrupt on change will screw the start bit...

    So I guess you may have decent results with a custom bit-banged routine.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default Re: serial port interrupt without using hserin

    Charles Linquis and I did something that might work for you.

    http://www.picbasic.co.uk/forum/show...9798#post79798
    DT

Members who have read this thread : 1

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