James Harris <
james.harris.1@gmail.com> wrote:
Any suggestions on where to begin with microcontrollers? This is for a
simple application with very low CPU and other resource requirements.
The idea is to make a battery-powered device which will send and receive
GSM texts and interface with some simple devices (LCD display, RTC, GPS, temperature sensors, etc).
Would you recommend a RP2040 uc for that? If not, [and this is somewhat
OT, I realise] what else?
I'd prefer to program in C and avoid proprietary software. I hated the Microchip development environment I tried years ago as it wanted to
install untold megabytes of overkill lock-in(!).
It really depends on how much you want to do yourself, and how much you want
to build on existing software. One of the standouts in the hobby microcontroller world is Arduino - this started as a simple way to program 8 bit Atmel microcontrollers, but has since expanded to cover a range of Arm MCUs, including the RP2040.
The advantage of the Arduino ecosystem is the libraries for talking to
devices: you don't need to write your own LCD controller driver, you just
pick an LCD controller somebody has already written one for and you're away. There's probably also a GUI drawing library as well, etc etc.
The Arduino language uses 'sketches' which are really a dressed up form of
C++. You can write native C/C++ and link it all together if you want. Everything is open source, and typically it's really just driving GCC under
the hood. The bundle is not small (there's also a GUI written in Java), but that's mostly because there's compilers and libraries for several architectures.
ATMega is the best supported Arduino platform and sometimes the Arm side of things can feel slightly second class, mainly because there's fewer people using it and documenting the differences between platforms. I think it's always improving though (I also haven't used it for a few years, so may be
out of date). RP2040 support is new in the Arduino world and I'm not
familiar with more mature it is these days.
As far as hardware goes, RP2040 is a decent platform. It's less limited
than 8-bit ATMega, and has some useful features (eg dual core). It doesn't have wifi, so most people who want that use the ESP32 or older ESP8266.
All are relatively usable with your own PCBs (unlike the full Pi family).
[a few weeks ago the Pi Pico W was launched which fills the wifi hole -
looks promising, but I think it'll take time to mature the software support
to the level of the ESPs. You'd have to mount the PicoW module on your
board, you couldn't do wifi with just the microcontroller chip]
If you don't want to rely on anyone else's libraries, they're all usable
with GCC and the RP2040 is particularly well documented in comparison to
other silicon. So if writing drivers is your thing, you should be covered.
Theo
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)