Problem with Serin and On Interrupt


Results 1 to 9 of 9

Threaded View

  1. #1
    EvilGhozt's Avatar
    EvilGhozt Guest

    Unhappy Problem with Serin and On Interrupt

    Why doesnt this code work correct?
    Pic16f628 @ 4mhz

    DEFINE OSC 4
    on interrupt goto myint
    intcon = %10010000

    loop:
    pause 1
    goto loop

    disable
    myint:
    serin2 portb.1, 396, [wait("IB")]
    INTCON.1 = 0
    resume
    enable

    The problem is that when i send "IB" from the computer to the pic it hangs up in the Serin2 myint part and doesnt move along before it receive another "IB". It seems like it miss the first "IB" I sent, and then Serin waits for the computer to send "IB" again... Does the interrput command take to long time so it wont catch the first bit or something?

    I'm quite noob and my english sux so please explain it easy



    Edit: Sorry i duplicated the post, how do i delete it :P ?
    Last edited by EvilGhozt; - 11th October 2005 at 13:02.

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