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

Read RAM memory

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



Joined: 11 May 2004
Posts: 8

View user's profile Send private message

Read RAM memory
PostPosted: Tue May 11, 2004 2:36 am     Reply with quote

Hello,

How can I read some values from the RAM memory?

Susan
Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Tue May 11, 2004 2:50 am     Reply with quote

What do you mean by 'RAM memory'? If you want to check the value of a certain address in RAM, you can do this:

#byte var=address

The the variable 'var' will be pointing to the address you want. Example:

#byte var=0x6D
#byte port_b=0x06
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Tue May 11, 2004 7:59 am     Reply with quote

We need to know more specifically the type of RAM you are dealing with,
I´m talking about the way you access it, parallel or serial.

Humberto
rwyoung



Joined: 12 Nov 2003
Posts: 563
Location: Lawrence, KS USA

View user's profile Send private message Send e-mail

PostPosted: Tue May 11, 2004 11:46 am     Reply with quote

On-board PIC RAM is easy:

Code:

unsigned char mydata;

mydata = 99;

if (mydata == 99) {
   // do something wonderful here
}


If you are talking about external RAM, it will depend on how it is interfaced. I've done a few designs that used external byte-wide SRAM for data storage (upto 512kbyte). It requires creating some kind of address and data busses along with writing code to support the busses and well as some kind of data structure for acessing the external RAM.

I've never used external serially addressable RAM but I have used SPI and I2C EEPROM. The built in features found in many of the PIC chips make this very easy. There are good example programs from CCS too.

Or do you mean getting data from the PIC RAM out to some other device, say a PC through a serial port or USB port?

Humberto and Halpo are right, you need to be much more specific in your questions.
_________________
Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month!
Suus



Joined: 11 May 2004
Posts: 8

View user's profile Send private message

PostPosted: Wed May 12, 2004 12:36 am     Reply with quote

Thanx for your answers,

I was a little disarranged. I thought there must be a command like a command for reading eeprom.
But it is much more easy than I thougt.
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