CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

how to read data from RAM

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
abawan
Guest







how to read data from RAM
PostPosted: Tue Aug 05, 2008 2:42 am     Reply with quote

Hi Smile
i want to know the command to access data in RAM of pic16f877a. as i use MOVC A,@+DPTR for 8051, how can i use it in pic.
i am using CCS compilar.
thanks
Ttelmah
Guest







PostPosted: Tue Aug 05, 2008 3:12 am     Reply with quote

Stop thinking in assembler. You are using C now. All your variables are in RAM. If you want to access a particular location, either use the #byte directive, or #locate, to put a C variable at the required location.
However much better to just let C handle the memory for you.
If you want to work relative to a 'pointer', then use the C pointer access, or array access.

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group