Rc int on 16f874


Results 1 to 6 of 6

Threaded View

  1. #1
    Join Date
    Jul 2006
    Posts
    9

    Default Rc int on 16f874

    Hello!
    I'm trying to connect to my PIC via a interupt on receivd rs232. The hardware is connected as attachment "Hardware Setup.jpg" (MicroCodeLoader).
    My problem is when I try to connect nothing happends.

    Here is my code:
    <PBP COD>
    DEFINE LOADER_USED 1
    ' Set X-tal to 4 MHz
    DEFINE OSC 4

    DEFINE HSER_RCSTA 90h 'Hser receive status init
    DEFINE HSER_TXSTA 20h 'Hser transmit status init
    DEFINE HSER_BAUD 2400 'Hser baud rate

    ---

    SPBRG = 25'103 'SET TO 2400bps

    On Interrupt Goto myint ' Define interrupt handler
    INTCON = $C0 ' Enable INTE interrupt
    PIE1.5 = 1

    ---

    ' Interrupt handler
    Disable ' No interrupts past this point
    myint:
    PIR1.5 = 0
    lcdout $FE, LcdLine2, " Connected "
    pause 1000

    Resume ' Return to main program
    Enable

    end

    </PBP COD>

    Whats wrong? I can't get it to work!
    Pleas help me.

    Regards

    Håkan
    ( I hope you can understand my por english and code)
    Attached Images Attached Images  
    Last edited by hakan; - 14th July 2007 at 20:12. Reason: forget file

Similar Threads

  1. RC Servo decoding/encoding using 12F683
    By ScaleRobotics in forum Code Examples
    Replies: 13
    Last Post: - 14th September 2010, 00:49
  2. Instant Int and encoder (Elect. Gearing)
    By boroko in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 29th November 2009, 02:29
  3. help: TMR0 interrupts disabling PORTAchange interrupts???
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 19th August 2008, 15:10
  4. strange int behaviour
    By tom in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 17th November 2005, 15:41
  5. RC measuring routine Radio PCM
    By jetpr in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th August 2005, 02:18

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