Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

How to handle PCINT8-11 on ATMEGA644P

2010-04-10 by Антощенков Роман Викторович

Hello!
I build project on AVRStudio 4.16 and WinAVR.
I try handle  high level on PCINT8-11.

PORTB=0x00;
DDRB=0xF0;

EICRA=0x02;
EIMSK=0x01;
EIFR=0x01;
PCMSK1=0x0F;
PCICR=0x02;
PCIFR=0x02;

ISR(PCINT1_vect)
{
  unsigned char x = PORTB;
  if ((x & Bit(0)) == 1)
  {
     ...
  }
  if ((x & Bit(1)) == 1)
  {
    ...
  }
  if ((x & Bit(2)) == 1)
  {
    ...
  }
  if ((x & Bit(3)) == 0)
  {
     ...
  }
}

It doesn't work.
Any idea?

-- 
Best regards,
Roman Antoshchenkov
mailto:djantoxa@rambler.ru

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.