??? 04/20/07 07:55 Read: times |
#137607 - Already answered! Responding to: ???'s previous message |
Jecksons Ben said:
Porting from PIC to MCS-51,How to do that? It's already been said: Look at what the code does; do not worry about the specifics of how that happens to have been implemented for the other architecture (PIC, in this case). http://www.8052.com/forumchat/read.phtml?id=137240 http://www.8052.com/forumchat/read.phtml?id=137241 If you like flowcharts, draw a flowchart of what the PIC code does; then use that as your starting point to write the 8051 code. If you like pseudocode, then write pseudocode for what the PIC code does and, again, use that as your starting point to write the 8051 code. eg: -- Send a packet build packet header; load payload; calculate checksum/CRC/whatever; add packet trailer; transmit the packet; wait for response; : : As you can see, none of that is specific to any particular architecture, or to CISC or RISC or anything else! If the code is in 'C', this should be easy. As far I knew that RISC and CISC are totally different,even the code structure. At the machine code level, yes. But at the level of the application, it's irrelevant. eg, the calculation necessary to compute a CRC is the same whether you implement it on an ARM, an 8051, a PIC or even in hardware. |