We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Good morning
Is there a way to memcpy from SFR's in the C51?
I have tried to memcpy((char*)&buffer, (char*)&CAN0IF2DA1L, 8); but it doesn't work
Other things i tried
memcpy((char*)&buffer, CAN0IF2DA1L, 8); //error C214: illegal pointer conversion
memcpy((char*)&buffer, (char*)&CAN0IF2DA1L, 8); //error C189: '&' on bit/sfr illegal
Any ideas?
Richard
RichardT said:do not know how to create a pointer to the SFR address space
http://www.keil.com/support/man/docs/c51/c51_le_memspecificptrs.htm
Although, IIRC, SFR space is not indirectly addressable ... ?
Andy Neil said:IIRC, SFR space is not indirectly addressable
It's been a long time since I last used an 8051 - but that recollection is correct:
From the Philips Semiconductors 80C51 Family Architecture document - linked earlier