Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem with reading PING.2 status of atmega64 g port in Codevision

Status
Not open for further replies.

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
 

use atmega64 g port

Do you have set the direct register for input?
 

    masood-ma

    Points: 2
    Helpful Answer Positive Rating
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

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
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top