RB0/INT External Interrupt requires Pull up Resistor ?

Status
Not open for further replies.

asking

Full Member level 5
Joined
Sep 21, 2010
Messages
279
Helped
6
Reputation
12
Reaction score
6
Trophy points
1,298
Visit site
Activity points
3,377
Hello,

I want to use RB0/INT of PIC16F628A do i need to use pull-up resistors ? which one i should use ? Pull - up or pull -down ? Please help...
 

Hi,

The purpose of a Pull Up resistor, or a pull down, is basically to prevent that i/p pin being left floating / open circuit by an input device.
If that happens then the micro will sense all sorts of random voltages.

Its therefor generally good practice to pull up or down all Digital inputs, however the resistor values should not be that low that they could affect the input device.
Typically 10k is a good value for either, which one depends on your softwares logic, ie pull up means the default state of the pin will be 1.

On PortB you have an option to select and turn on an internal pull up resistor.
 
Reactions: asking

    asking

    Points: 2
    Helpful Answer Positive Rating

I think when i defined Port B INT Interrupt, internal weak-pull resistor are on by default. Because when i tried putting external 10K interrupt was not working...but when i removed it everything is fine
 

Post your code.

Code:
void interrupt()
{
  // RB0/INT External Interrupt
  if(INTCON.INTF == 1)   // if the RB0/INT External Interrupt flag is set...
  {
    INTCON.INTF = 0;
    PIR1.TMR1IF = 0;
    //PIE1.TMR1IE  = 1;
    PORTB.F1 = 0;
  }

  // Timer1 Interrupt - Freq = 43.62 Hz - Period = 0.022927 seconds
  if (PIR1.TMR1IF == 1 && INTCON.INTF == 0) // timer 1 interrupt flag
  {
    PORTB.F1 = 1;      // Toggle PORTB bit1 LED
    COUNT1 = COUNT1 + 1;
    PIR1.TMR1IF = 0;           // interrupt must be cleared by software
    PIE1.TMR1IE  =   1;        // reenable the interrupt
    TMR1H = 91;             // preset for timer1 MSB register
    TMR1L = 252;             // preset for timer1 LSB register
  }
}
 

hello,

pull up or pull down RB0 is not the real problem.
answer first to this question :
what is the source of the signal you apply
on RB0 pin ?
a passive component, as,a,relay reed contact ?
or the ouput of a active component
ie output of a 7406 ttl driver
or other..
you have to considere booth part..to decide if pul up (down) is necessary .
 


i am getting output from TSOP1838. Actually i was making Beam Break detector.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…