This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to use port P9 with 80C509

Hi all,

I want to link the port P9 to a LCD with a 80C509.

I have already linked a keyboard to the port P4 and I manage to declare a bit with this instruction:

sbit P4_0 = P4^0;

but when I try the same thing whit P9, the compiler says to me:

P9 : invalid base adress

I think it's because P9 is not bit adressable but I'm not sure.

So I try to read the value of P9 with this instruction:

unsigned char val = P9;

but the compiler says:

error C247: non-adress/-constant initializer

It seems that P9 is a constant, I can read its value but I can't change it.

Is someone who know how to do to change the value of P9?

Thanks.

ps: Sorry for my bad english, I'm a french student ;-).

0