Interrupt on PORTB.6


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2011
    Location
    Skopje,Macedonia
    Posts
    71

    Default Interrupt on PORTB.6

    Is there any way to make an interrupt on PORTB.6?I use a transistor as switch to trigger the PORTB.6 to "0" and Pull-up on this PORT,with OPTION_REG.7=0
    And I want to use Interrupt,because this code doesn't work:
    Proveri:
    IF Termos = 0 Then
    Relay_flag = 0:LCDOUT $FE, 1:LCDOUT $FE, 1, " Alarm vklucen ":LCDOUT $FE, $c0, $01
    ENDIF
    High Buzzer
    Pause 350
    Low Buzzer
    Return

  2. #2
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: Interrupt on PORTB.6

    Hi Slos1!
    You may consider using an "opto-isolator" such as the NTE3086 and a 10K pull-up resistor. Basically you have on one side of this chip an LED and the other side the collector-emitter junction. This way you can pretty much use just about anything to turn on the internal LED of the chip or if you are a "visual" person you can even add an external LED to see that everything is going to plan. The external 10k resistor will ensure that you will have a high (+5v). Basic wiring is the 10K to +5v to the collector of the 3086 and the juction of the 10K and the chip to your PIC pin. The emitter goes to ground. There is an additional advantage and that is that there are 2 seperate circuits in the chip so if your find the need for a second "switch" you already have one! Hope this helps. Best, Ed

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