Writing firmware: assembly or high level?

前端 未结 17 1835
时光说笑
时光说笑 2020-12-13 02:29

Related to:

  • Testing firmware
  • starting a microcontroller simulator/emulator
  • Interpreting assembly code

If you are writing co

17条回答
  •  一向
    一向 (楼主)
    2020-12-13 03:25

    I would definitely go with C. It is faster and it creates more reliable software. Assembly has very little to offer and in scarce occasions. Have in mind that in C:

    • You would be able to easily port code from existing platforms, even from PCs.
    • You can develop in a high level language without compromising execution speed or code size. Provided that a quality compiler is available (there are many choices for PIC18), these would be most probably be better with C than hand crafted assembly.
    • It is much easier to debug, test and maintain the code. C produces more reliable code.

    Another thing that specifically has to do with PIC18. You won't have to deal with the non-intuitive PIC architecture and things like memory BANKs.

提交回复
热议问题