Hi, I saw the Pico on Adafruit recently and it looks great! A few questions that I couldn't figure out from the blurbs and this board so far:
1) Does the Pico have an RTC that can be accessed through JS? What is the power drain to keep the RTC running and a small amount of ram retention (not necessarily the whole space)? Is there some capacitance on the board (or is it reasonable to add some), to keep the RTC alive through a battery swap?
2) If I don't need USB plug, is it possible to cut off the connector without messing up the board function, to make the board smaller? The Digispark is made to allow this, I've heard, but it's a much less powerful board.
One thing to note there is the Pico has an RTC but doesn't come with an accurate low-speed oscillator. The internal 32k oscillator can be +/- 10%!
However, there are some unpopulated pads at the end of the boards, and you can solder on a Abracon ABS06-107 crystal. Espruino will then auto-detect that and will run with accurate timings.
And yes, you can cut the USB plug off. Firmware updates are still possible using the serial bootloader too, but you have to short out a solder jumper on the back of the board for that.
Hope that helps!
Just to add to this, I just tested this again and it looks like there's a software glitch at the moment which means that the Pico sometimes leaves the USB peripheral on, and ends up drawing 250uA when sleeping.
It'll get fixed in a firmware update soon though.
... but even so, it looks to be about 10x better than the DigiSpark, but it's hard to find exact figures on the Digispark.
Thanks! I had no idea the Digispark used so much power. I wonder what's going on with that. I'd been thinking of using a tiny Arduino-inspired board for some things (Atmega 328 based) and wonder if it has the same issue.
My application does need an accurate (xtal) RTC, so it's good that it's doable. It would be great if a version was available with the xtal already on it.
I also need to do some realtime processing (audio signals) in the app--is it reasonable to do that on the Espruino? I can stand a few msec of delay in the system so the JS either needs to be relatively pause-free with the output clocked out on a timer tick, or the realtime stuff could be in a separate task if there's some kind of RTOS. The realtime stuff would probably be written in C either way, or at least call some C code.
It seems to get the size down the DigiSpark does something strange with USB, but I think the main culprit is the voltage regulator. Bigger voltage regulators tend to waste quite a bit of power - I had to put quite an expensive regulator on the Pico to get a high-ish current while still not drawing much power.
There's no RTOS (well, Espruino is the RTOS) but you can schedule tasks to happen every so often in an IRQ, so it makes life easier for you.
It's not that bad, but you need to be pretty used to writing embedded code to get that C working nicely.
If you're interested in the internals, you could look at http://www.espruino.com/Performance and http://www.espruino.com/Internals pages
Thanks! It's a voice codec so sampling would be 8khz probably. I'm good at C under Linux though I haven't done any serious embedded C yet. I hope I can deal with it. Yes I'm a big fan of scripting languages because of their interactivity and memory safety compared to C. I had been mostly wondering about the differences between them (JS, Lua, uPy, etc). I'll look at the Espruino JS internals docs! The Pico is the nicest of these boards that I've seen so far (small size is an issue) and I've looked at quite a few. Even if I write the whole application in C, I probably want to use the board as I'm not a hardware guy.
Ok, great! If you're fine dealing with buffers that come out of the double-buffered waveform class then you should be sorted - you can write normal C code and you won't have to care about the hardware side of things at all.
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem