Connect with us

interrupt of 8051

Discussion in 'Microcontrollers, Programming and IoT' started by paddy, Oct 20, 2012.

  1. paddy

    paddy

    81
    0
    Sep 11, 2012
    Hello!!!!!!!!!

    I am using interrupts of p89v51rd2 and the signal which i am getting as an input is active high.

    I have not used the NOT gate in between.

    Is there any alternative to get it done?

    Thanks,
    paddy
     
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    9,398
    1,920
    Nov 17, 2011
    I'm not familiar with this chip. Where's the problem?
     
  3. paddy

    paddy

    81
    0
    Sep 11, 2012
    this is similar to 8051.

    The interrupts are active low enable and the signal which i am receiving is active high.

    And i have not placed the NOT gate between received signal and interrupt pin of micro controller.

    Because of that interrupt routine is not working.

    Thanks,
    paddy
     
  4. Harald Kapp

    Harald Kapp Moderator Moderator

    9,398
    1,920
    Nov 17, 2011
    Then why don't you insert the inverter? I don't see a way around this.
    If you don't have a spare gate in your circuit, a simple 1-transistor common emitter circuit can invert the signal (see here, bottom of the page).
     
  5. paddy

    paddy

    81
    0
    Sep 11, 2012
    thank you for your suggestion.

    I have used transistor to invert the signal and now it is working fine.

    I am facing a problem of noise.

    Even if in the absence of the signal the alarms are generating. And this happens only when there is a switching.

    Please suggest how to get rid of it.

    thanks,
    paddy
     
    Last edited: Oct 22, 2012
  6. Harald Kapp

    Harald Kapp Moderator Moderator

    9,398
    1,920
    Nov 17, 2011
    Where and what is switching?

    You may try and add a resistor from the base of the NPN transistor to GND. The value should be approx. 1*Rb. Also a small capacitor (100pF) from the base o GND can help.
     
  7. paddy

    paddy

    81
    0
    Sep 11, 2012
    The system is working on 24V DC supply which is given through power supply and 230V to the power supply is given through Mains.

    So if i turn on/off any other devices which are working on mains supply, the systems starts generating alarms.
     
    Last edited: Oct 22, 2012
  8. Harald Kapp

    Harald Kapp Moderator Moderator

    9,398
    1,920
    Nov 17, 2011
    Then you should provide a better filtered power supply.
    At the very least you need to filter the power supply pins of the microcontroller (and other chips) in your circuit. Typically a 100nF capacitor very close to the VCC/GND pins of each IC is a standard filter procedure.

    Harald
     
  9. paddy

    paddy

    81
    0
    Sep 11, 2012
    Yes it worked!!!!

    A capacitor in between base and ground.

    Thank you for support!!!!!
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-