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
²erik malund - Dan's site has been dead for some time now.
NXP do still seem to have archive copies of the so-called "bible" for the 8051:
https://community.nxp.com/docs/DOC-334648 - 80C51 Family Architecture.pdf
https://community.nxp.com/docs/DOC-334649 - 80C51 Family Hardware Description.pdf
https://community.nxp.com/docs/DOC-334650 - 80C51 Family Programmer's Guide and Instruction Set.pdf
Also on Dr. Linden McClure's page at the University of Colorado, Boulder:
http://ecee.colorado.edu/~mcclurel/