Help on selecting on Arduino Uno Vs Spark Core

I want to use a Time to Digital Converter in my project, that interfaces with the master (Arduino Uno/ Spark Core) over SPI. The integration requires low level programming i.e. at the bit level. I am familiar with Arduino Uno interface but my end goal is to use Spark core to view the data on the web. I have only briefly played with Spark core and still consider myself a beginner.

Would it be wise to start with Arduino UNO and then migrate the code to Spark Core or start with Spark core itself ? I am also unsure if the migrated code would work as Spark core and Arduino use two different micro controller units. Any suggestions / advice would be great.

@Falcon, when you say “bit-level” do you mean Aduino’s ability to do “fast” bit manipulation? Remember that Spark’s clock (72MHz) is over 4 time faster than an UNO’s clock. This makes digitalWrite() much faster on a Spark. There are also faster bit set/reset commands on the Spark that exploit the STM32’s very fast bit manipulation registers:

PIN_MAP[pin].gpio_peripheral->BRR = PIN.MAP[pin].gpio_pin;   //Set pin LOW
PIN_MAP[pin].gpio_peripheral->BSRR = PIN.MAP[pin].gpio_pin;  //Set pin HIGH

The catch on the Spark is that its I/O pins are mapped a bit oddly so if you want to do whole-port manipulation, it is a bit more work on the Spark than on an Arduino. Given all this, you can certainly start on the Spark with a small learning curve. :smile:

1 Like

@peekay123 Thanks for your reply. I should have been more specific. When I meant bit-level, I was referring to the data types e.g. data type ‘unsigned long’ in Arduino Uno is 32 bit, ‘byte’ is 8 bits etc. Are the data types used in Spark programming the same size as that of Arduino Uno ?

@Falcon there are differences but if you stick to C standard type like uint_16t, etc. then you can specify exactly what size vars you want.