Yahoo Groups archive

AVR-Chat

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

Message

Re: [AVR-Chat] How to handle PCINT8-11 on ATMEGA644P

2010-04-10 by BobGardner@aol.com

try if (x & bit(2)==bit(2)) because bit(2) is 2, not 1?









-----Original Message-----
From: Антощенков Роман Викторович <djantoxa@rambler.ru>
To: AVR-Chat@yahoogroups.com
Sent: Sat, Apr 10, 2010 1:04 pm
Subject: [AVR-Chat] How to handle PCINT8-11 on ATMEGA644P


Hello!
 build project on AVRStudio 4.16 and WinAVR.
 try handle  high level on PCINT8-11.
PORTB=0x00;
DRB=0xF0;
EICRA=0x02;
IMSK=0x01;
IFR=0x01;
CMSK1=0x0F;
CICR=0x02;
CIFR=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.
ny idea?
-- 
est regards,
oman Antoshchenkov
ailto:djantoxa@rambler.ru

------------------------------------
Yahoo! Groups Links
   Individual Email | Traditional
   http://docs.yahoo.com/info/terms/



[Non-text portions of this message have been removed]

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.