| |||||
Technical Support Support Resources
Product Information | C51: ACCESSING I/O PORTS IN CInformation in this article applies to:
QUESTIONHow can I access the I/O ports on the 8051 using C? Is there an include file that is needed? ANSWERYes. You must include the SFR register definition include files. These are found in the \C51\INC 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 µVision, 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. Last Reviewed: Friday, July 22, 2005 | ||||
| |||||