Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data manip. in memory

Status
Not open for further replies.

MvanH

Technical User
May 15, 2001
19
NL
I have to read and write data from and to a specific address in the memory.
I tried to use the search but could't find any answers.

I have a row of 512 16 bit signals written in the memory by another device that shares the same memory with my Proccesor.

Now I have to check and correct those 16 bit signals, but can't find out how I can read from the address were te signals are stored.
I think I kan use SprintF for writing to the memory, but I'm unsure of that (can't test it as my device is still in production)

Does anybody know how I can do this?

Thanks Martin

 
1. declare a unsigned short int pointer variable.
2, assign the starting address of the memory ( which you want to read) to that pointer variable.

Now you can put *pointerVariable and can see the value. If you want you can store it in an array. To see the next element, increment the pointerVariable by one.

unsigned short int c;
unsigned short int *p;
p = startingAddressOfMemory;
c = *p;
p++;
...


Regards,
Maniraja S
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top