|ARM Technical Support Knowledge Articles|
Applies to: C51 C Compiler
Information in this article applies to:
How can I access the I/O ports on the 8051 using C? Is there an include file that is needed?
You must include the SFR register definition include files. These are found in the C51INC folder and usually have names like REG51.H (for the standard 8051), REG52.H (for the 8052), and so on. There are include files for most of the derivatives currently available.
In uVision, you can right click the mouse in the Edit Window. An option to automatically insert the #include for the correct header file is available there.
There are several example programa that may be helpful.
Article last edited on: 2005-07-22 15:16:24
Did you find this article helpful? Yes No
How can we improve this article?