Keil Logo

C51: HOW TO GIVE DESCRIPTIVE NAMES TO PORT PINS


Information in this article applies to:

  • C51 Version 5.50

QUESTION

How do I get descriptive names to pins on each of the ports?

ANSWER

You can use the sbit data type. For example:

sbit foo = P1 ^ 2;

gives the name 'foo' to P1 bit 2.

MORE INFORMATION

  • Refer to sbit in the Cx51 User's Guide.

Last Reviewed: Monday, October 16, 2006


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.