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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/02/04 04:00
Read: times


 
#71582 - RE: LCP932 and UART Sample Program
Responding to: ???'s previous message
Maybe you want to try something wherein you use a pointer to the data memory and then format the 8052 RAM contents into some type of ASCII string which can then be transmitted to the PC. Here is a snippett of code that could do just that.

char i;
char *memptr;
char string[25];

memptr = (char *)0x36;   // peek at RAM from 0x36
sprintf(string,"%04X-",(unsigned int)memptr);
for(i=0; i<8; i++)
{
   sprintf(&string[strlen(string)]," %02X",*memptr++);
}
sprintf(&string[strlen(string)],"n");
sendtoPC(&string[0]);


Michael Karas


List of 3 messages in thread
TopicAuthorDate
LCP932 and UART Sample Program            01/01/70 00:00      
   RE: LCP932 and UART Sample Program            01/01/70 00:00      
      RE: Pointers            01/01/70 00:00      

Back to Subject List