Skip to main content
murielle
Associate II
July 8, 2003
Question

PB0 - interrupt falling edge

  • July 8, 2003
  • 6 replies
  • 1376 views
Posted on July 08, 2003 at 09:06

PB0 - interrupt falling edge

This topic has been closed for replies.

6 replies

murielle
murielleAuthor
Associate II
July 2, 2003
Posted on July 02, 2003 at 14:33

I want to use port PB0 in entry interrupt falling edge.

Configuration :

PBDDR = 0xF6;

EICR = 0x80;

PBOR = 0x01;

PB0 is to 0

When I validate the interrupt PB0 (PBOR = 0x01), the interrupt occurs?!

The interrupt must occur on a falling edge and not on a low level.

How to solve my problem?

Thanks,

Murielle
itsmejatinus
Associate III
July 3, 2003
Posted on July 03, 2003 at 09:23

What i have understood from your question is that you want to have the interrupt only when falling edge is detected .For this,you can set your interrupt sensitivity as falling edge only with IS1x bits as 00 and IPB bit as 1.

murielle
murielleAuthor
Associate II
July 3, 2003
Posted on July 03, 2003 at 10:21

I try with PBOR = 0x00 (falling edge and low level) but it doesnt work.

What is IPB?

Best regards,

Murielle
itsmejatinus
Associate III
July 3, 2003
Posted on July 03, 2003 at 11:50

The EICR register config. is like this -

IS11 IS10 IPB IS21 IS20 IPA TLIS TLIE

Make IS11 & IS10 as 00

& IPB as 1

so register value is 0x20.
murielle
murielleAuthor
Associate II
July 3, 2003
Posted on July 03, 2003 at 12:02

I use a ST7FLITE0.

In the datasheet the EICR is like this :

IS31 IS30 IS21 IS20 IS11 IS10 IS01 IS00

There are 4 external interrupts.

Best regards,

Murielle
itsmejatinus
Associate III
July 8, 2003
Posted on July 08, 2003 at 09:06

Ok.

For PortB interrupt the bits are IS31 and IS30. So to set the interrupt as falling edge only ...

Set the register value as 1000 0000 ===> 0x80

The value in this register is to be updated only when the interrupts are disabled.

[ This message was edited by: Ranjeet on 08-07-2003 14:00 ]