This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

porting C code from AVR to 8051

The code does alot of IO port operations.
Keil uses SFR and SBIT declarations whereas the AVR code uses defines to set IO port locations and
byte operations to set/clear/test bits. There has to be a better way than slogging through the text conversion and then slogging through the debug???

Parents
  • In that case, the only processor-specific part should be the low-level SPI "driver" part, surely?

    So write yourself a low-level AVR-Specific "driver", and a low-level 8051-Specific "driver". Give them both the same interface to the "upper" software, and write that software using only portable constructs.

Reply
  • In that case, the only processor-specific part should be the low-level SPI "driver" part, surely?

    So write yourself a low-level AVR-Specific "driver", and a low-level 8051-Specific "driver". Give them both the same interface to the "upper" software, and write that software using only portable constructs.

Children