0

Can i use the code written for arduino mega board directly for the nRF51822 in arduino IDE?

satishakula gravatar image

asked 2016-12-02 06:46:47 +0200

updated 2016-12-02 06:54:19 +0200

initially we developed code for arduino mega board but now we want to use the nRF51822 soc,so how i can utilize my arduino code for nRF51822 ....i have gone through the some topics but there no clarity about code conversion to nrf51822.

thanks & regards, satish

edit retag flag offensive close delete report spam

1 answer

Sort by » oldest newest most voted
1
rogerclark gravatar image

answered 2016-12-02 11:53:30 +0200

AFIK there is no official Arduino "core" for the nRF51, however Sandeep's core is very good

https://github.com/sandeepmistry/ardu...

But... its unlikely that all of your Arduino Mega core will compile for the nRF5 series processors as the internal processor architecture is ARM rather than AVR and its a 32 bit processor rather than an 8 bit.

Additionally, if you use any external libraries which directly interface with AVR hardware e.g. the hardware timer etc, the code will not compile at all, as the nRF5 peripheral hardware is completely different.

All that being said, if you just run standard libs etc, there is a reasonable chance your code will port to the nRF5 series without too many problems.

edit flag offensive delete publish link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

User menu

    or sign up

Recent questions

Question Tools

1 follower

Stats

Asked: 2016-12-02 06:46:47 +0200

Seen: 118 times

Last updated: Dec 02 '16