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 would I read a specific RAM address?

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



Joined: 29 Jan 2005
Posts: 10

View user's profile Send private message

How would I read a specific RAM address?
PostPosted: Thu Jun 23, 2005 4:12 pm     Reply with quote

I am using a PIC 18LF8720. CCS compiler PCWH ver 3.206.
My code periodically checks the value of two variables and sets a flag if they are not equal. The flag is declared as int1. The symbol table indicates it is bit 2 of address A7. There is a random error occurring where the flag is getting set when it shouldn’t. As part of troubleshooting I want to read the value of address A7 before and after the flag is set to make sure the bit is not inadvertently set before the flag is checked. How would I read a specific RAM address?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jun 23, 2005 5:02 pm     Reply with quote

Do you want the cheap way ? Just do this:

Code:
void main()
{

char c;

c = *0xA7;

while(1);
}
Guest








PostPosted: Thu Jun 23, 2005 5:22 pm     Reply with quote

cheap and clean.... Works great thanks.
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