Problem with Port 6 of 80c517 in Keil C51 Compiler

Status
Not open for further replies.

onde

Junior Member level 1
Joined
Nov 29, 2002
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
88
80c517

Hi,

I have a problem with the Keil C51-Compiler:
If I write
sbit RS = P6^1;
I got the following error:
MAIN.C(8): error C146: 'P6': invalid base address
If I change it to:
sbit RS = P5^1;
it compiles correctly.

In reg517.h P6 is defined as followed:
sfr P6 = 0xFA;

So that should not be the problem.
I can use P6 like P6=1 in Programms, but it seems P6 is not bitadressable??
So what´s the Problem, is there something special I do not know with the 80c517 on Port 6 or is it a Problem with the Compiler???
Pse help,

thx onde
 

Re: P6 and 80c517 (Keil)

Hi,

Port P6 is NOT bit adressable ( see data sheet )

Possible solution snippet code is

ACC = P6;
ACC_6 = 1;
ACC_0 = 0;
...
P6 = ACC;

Note : If you use COM2 this will not work
 
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…