Jun 17, 2010 #1 M masood-ma Newbie level 2 Joined Mar 18, 2010 Messages 2 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,291 i want to use atmega64 port 's to input but i can not read status PING.2 in codevision sample if(PING.2==0) PORTA.7=1; hlep me please
i want to use atmega64 port 's to input but i can not read status PING.2 in codevision sample if(PING.2==0) PORTA.7=1; hlep me please
Jun 18, 2010 #2 U unaided Member level 5 Joined Mar 3, 2006 Messages 80 Helped 10 Reputation 20 Reaction score 1 Trophy points 1,288 Location China Activity points 1,652 use atmega64 g port Do you have set the direct register for input?
Jun 19, 2010 #3 M masood-ma Newbie level 2 Joined Mar 18, 2010 Messages 2 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,291 Re: use atmega64 g port yes i set port to input i can work with a,b,c, and d port but can't use g e and f port
Re: use atmega64 g port yes i set port to input i can work with a,b,c, and d port but can't use g e and f port
Jun 22, 2010 #4 Nikunj Tanna Advanced Member level 4 Joined Dec 8, 2009 Messages 115 Helped 23 Reputation 46 Reaction score 15 Trophy points 1,298 Location Ahmedabad, Gujarat, India Activity points 1,985 Re: use atmega64 g port Hi, There is a limitation for codevision avr that it can not read after certain i/0 addresses. You need to access whole port not the bit alone. For example., instead of if(PING.2 == 1) use if(PORTG & 0x04 == 1). it will definately work. NIKS
Re: use atmega64 g port Hi, There is a limitation for codevision avr that it can not read after certain i/0 addresses. You need to access whole port not the bit alone. For example., instead of if(PING.2 == 1) use if(PORTG & 0x04 == 1). it will definately work. NIKS