Help.......Naming ports.

General discussion on mikroC.
Post Reply
Author
Message
Eduardo Grieger
Posts: 9
Joined: 04 Mar 2011 23:48

Help.......Naming ports.

#1 Post by Eduardo Grieger » 05 Mar 2011 01:56

Hi.

I wonder how do I assign a port with names for easy identification,
I looked in one instance but failed in that compiler.

#bit button = portb.0
#bit LED = portb.1


I tried to do so but did not work ...

#define button = portb.f0
#define LED = portb.f1

I am using PIC16F877A.
In this compiler, as I do?

Thank you.

balazs
Posts: 37
Joined: 20 Mar 2010 14:53

Re: Help.......Naming ports.

#2 Post by balazs » 11 Mar 2011 18:01

Try this.

Code: Select all

#define button PORTB.F0
#define LED PORTB.F1
Best regards.

Post Reply

Return to “mikroC General”