Hi all, I am using P0 and P2 for I/O but I dont know which Keil function for reading and writing to a specific address. I think this problem can be solve by( :) ?) MOV DPH, 0xFF MOV DPL, 0xFF MOVX A, @DPTR Pls help me for this problem by C language for Keil Thanks and best regards bocphet
Accessing the 8051's IO ports is described in the uVision Getting Started Guide under the heading "Parallel Port I/O" Cryptic, I know, but there it is... Please read the uVision Getting Started Guide, and work through the example projects in it. This will give you a proper introduction to the tools, how they work, and how to use them - rather than just jumping-in blindly at the deep end. (The uVision Getting Started Guide is available on the 'Books' tab in the 'Project' Window; The 'Books' window is also available via the 'Help' menu; failing all that, search for GS51.PDF in your Keil folder)
Thank you, but the manual and example only about one port But my problem is using 2 ports for address and data bus at the same time for access specific address of RAM, for example. So which function I should use or How can I do with that Brgds,
XDATA accesses are generated for variables defined as 'xdata' For memory-mapped IO, take a look at the _at_ keyword extension.