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]Message
Re: [AVR-Chat] How to handle PCINT8-11 on ATMEGA644P
2010-04-10 by BobGardner@aol.com
Attachments
- No local attachments were found for this message.