Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Help in addressing pins of AT89C4051.

Status
Not open for further replies.

vinash

Member level 2
Joined
Nov 3, 2005
Messages
45
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,999
Hi,
I do have a very fundamental question to ask, How do i directly address port 3.6 directly instead of using ((P3&0x40)?
as P3.6 is hard-wired as an input to the output of the on-chip comparator and is not accessible as a general-purpose I/O pin.for (AT89C4051)

I cant simply use the command,
#define P3_6=0xB6 rite?
Please do help. Thank you
 

techie

Advanced Member level 3
Joined
Feb 5, 2002
Messages
839
Helped
58
Reputation
116
Reaction score
9
Trophy points
1,298
Location
Pakistan
Activity points
7,800
Simple.
In C, you use
sbit COMP_INP = P3^6;

if (COMP_INP == 1) do this and that

in A51, you use
COMP_INP EQU P3.6

JB COMP_INP,LABEL
 

    vinash

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top