Can I use a 8-bit low-cost MCU with SPI to interface ASR-1?


#1

Can I use a 8-bit low-cost MCU with SPI to interface ASR-1?

The planned device has a 8-bit MCU with SPI interfacing ASR-1. It links to mobile phone and pass the attribute data to the cloud through the phone. Does this idea work?


#2

Hi Matt!

Yes, this should work fine - the ASR-1 will communicate over SPI to pretty much any MCU, your MCU doesn’t even need to have hardware SPI, we support just bit-banging SPI emulation as well. The only potential gotcha is that the ASR interface library we provide (called “afLib”) likes to have a little bit of RAM to run since it keep s a couple of work queues around to make sure the data is sent to the cloud properly. We can use an MCU as small as an Arduino Uno (ATMEGA328P which is only 2K of RAM) but things get a little snug if you want to do anything more than some basic sensing and attribute updating. Of course, if you needed a smaller memory footprint you could probably do some customizations to afLib for your specific needs that would get the memory footprint lower than that, but I personally haven’t really tried to get into RAM smaller than 2K.

Cheers,

Joe


#3

Thanks for your replying. AfLib is in C++. Is C library available ?


#4

Hey Matt,

Right now, a C++ library compatible with Arduino and Raspberry Pi is all we have available. We’ve been thinking about how to provide an ASR-1 interface that would support more languages and platforms, but for now I don’t have anything to announce, sorry!

Joe


#5

Thanks. That means only the MCU with C++ compiler can be used with ASR-1, right?


#6

Well, no, not really. The ASR-1 will talk to any MCU, but the only library support we offer right now is c++ only, but it’s possible (and likely not a tremendous amount of work) to port our Afero library to whatever your platform of choice is. But it’s a porting effort for the library on top of your other development work, There’s no reason why the ASR-1 wouldn’t work with your MCU, the ASR-1 doesn’t really care what the source language of your MCU platform is, as long as it sees the SPI transactions that it expects to see, it’ll work fine.

We have had several other customers port afLib to other MCU platforms, and we’ve done it ourselves to another platform as a test for another customer (we’ll be releasing that support soon but it’s also c++…)

Out of curiosity, can you let me know what MCU platform you’re looking at, so I can do a little research?

Thanks!

Joe