Suppprt PIC MCU

  • Hello,

    I am new here and was redirected to mysensors from openhab. Mysensors seems like a great platform that I was looking for. Thanks for building this up.

    Due to historical reasons and the availability of debugger and MCUs on my side, I'd prefer Microchip PIC MCUs over the AVRs. Is it feasible to investigate into that? - the mysensors core seems to be implemented in C++ which might be compilable to C via clang/llvm and then with the XC8 compiler to small PICs Binary code.

    Did any one try that already? Any one else interested in taht?

  • not to disappoint you, but the workload to port from ATmeag328 to a PIC seems to require much workload compared to purchase ATmeaga328 from China...

  • Though I can see where it may open up new avenues, I agree with @bjacobse. When you can buy an arduino pro mini for around $1 to $2 US, why would anyone waste the time?

  • Thanks for the answers. For sure it is possible to buy an ATmega and even a full-featured debugger would be acceptable compared to the effort of porting. But still, I am very biased towards the PIC without logical or economical arguments.

    I did not yet work with the mysensors libraries and only browsed quickly through the github repo. Maybe someone can give me a few hints to estimate the effort deeper than just claiming it as "much workload"?

    What I see so far is:

    • make the C++ code compile (translate to C with clang/llvm and compile with the XC8 compiler)
    • create a new HAL (in hal/architecture) which seems not too much effort for making it initially working


    • Do I see it right, that there is a linux-port available? -> I would expect much more effort to port from AVR to linux than to port it to a different MCU
    • What about the licensing? It looks like the code is GPLv2, but in the CLA it seem that contributors need to give away their rights on the contributions and that mysensors can even redistribute the code under another license - which seems completely against the principles of the GPL. Can someone explain that in more detail?

Suggested Topics