Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/21/04 12:20
Read: times


 
#70817 - use pointers
Responding to: ???'s previous message
Hi

There pointers in C and pointers point to some memory location. Usually ports also occupy 1 byte or two byte memory location. you can point a pointer in C to the memory location and get access the data. Have a look on Keil and its .h header file which contains constants to memory locations of Ports. So in C when i need to read the port 2 of 8051 then i just execute the statement

int z;
z = P1;


where P1 points to the port 2 of 8051


Shahzad Aslam

List of 16 messages in thread
TopicAuthorDate
How can I do MOVX in C?            01/01/70 00:00      
   RE: How can I do MOVX in C?            01/01/70 00:00      
   RE: How can I do MOVX in C?            01/01/70 00:00      
   use pointers            01/01/70 00:00      
      RE: use pointers - VERY CAREFULLY!            01/01/70 00:00      
      RE: use pointers            01/01/70 00:00      
      RE: use pointers            01/01/70 00:00      
         It all depends on the compiler...            01/01/70 00:00      
   RE: How can I do MOVX in C?            01/01/70 00:00      
   RE: How can I do MOVX in C?            01/01/70 00:00      
   What C?            01/01/70 00:00      
   RE: How can I do MOVX in C?            01/01/70 00:00      
   RE: How can I do MOVX in C?            01/01/70 00:00      
   Thanks            01/01/70 00:00      
      RE: Keil            01/01/70 00:00      
   RE: How can I do MOVX in C?            01/01/70 00:00      

Back to Subject List