Meet Raspberry Silicon: Raspberry Pi Pico now on sale at $4

Ethan,

I took the plunge and ordered a Pico board - hopefully will arrive tomorrow.

I will add it to my expanding collection of various target dev-boards which range from Z80, PIC, MSP430, AVR, ARM M3, M4, M7, Propeller, R-Pi and ICE 40 FPGA - to name but a few.

The first thing I do is get an interactive shell running on the new arrival.

My interests currently lie in cpu simulation (PDP-8, Z80, 8080, 6502), novel interpreters, such as Sweet-16 and minimalist languages including Forth.

My current project is a “Forth-like” tiny-interpreter for a self hosted retro-machine.

It’s on the same lines as planckforth - hence my interest.

3 Likes

There are two or three related articles in the current issue of HackSpace magazine, available as a pay-what-you-like download. In one, Eben Upton explains the thinking behind this, the first new thing the foundation has done since the Pi, and in another there’s an explanation of the PIOs.

I rather like the way peripherals appear in 4 address mappings: one is read/write wordwise, one allows atomic set-bit, another atomic clear-bit and a third offers atomic bit-flip. (It might be that this is normal for the territory.)

As noted, there’s heaps of detail in the datasheet:

3 Likes

From that HackSpace magazine, the feature article on the Pico has a quote from one Luke Wren on the Pico team: “I’m pretty sure you can bit-bang 10 Base-T Ethernet which is cool for a connected sensor.”

That’s … a bold statement. That changes my view of the Pico.

1 Like

I received my two Picos today from thePiHut.

The SDK was a little tricky to install on Ubuntu 18.04, because it needs a more recent version of CMake that is available in the standard repositories.

After getting rather bored of staring at a blinking LED, I thought I would try some of the video examples.

Here’s the Pico on a breadboard connected to a VGA cable:

And here’s one of the examples:

A fun afternoon…

Dave

4 Likes

Dave,

Congratulations on getting the VGA/Mandelbrot example to work so quickly - out of the box.

My Pico just arrived this morning from Pimoroni.

I have begun to read the “Getting Started” documentation, and it has reinforced my thoughts concerning self hosting systems.

As a Windows user, with very little Linux exposure, I am referred to Chapter 8.2 regarding installing the toolchain for Windows.

As I have no real desire to get involved with more clunky toolchains, I’ll probably just wait for PlatformIO or Arduino to package all the mechanics of automating the toolchain into an easier to use IDE.

Meanwhile I’ll amuse myself with some suitably luddite activities, such as hand assembling some SWEET16 code.

1 Like

I don’t know if this would do the trick for you Ken, but I see in Eben’s interview he mentions using a Pi as the host for developing Pico code. (You could connect to a Pi using Putty from your Windows machine - no need for keyboard and screen.)

Ed,

Thanks, I have been considering my options.

I have an R-Pi somewhere that could be pressed into action.

Alternatively I spend £100 on a Pi - 400 and take that route - as this laptop is now 5 years old and somewhat end of life.

I think my main stumbling block is that I am an infrequent programmer - and trying to remember a whole lot of command line stuff just to program a $4 microcontroller, feels counterproductive. I’ll probably just wait for an IDE.

$ 4 (no pound key) could let you emulate the BIG UK machines
of the 60’s soon. They have George running on a PI.
http://sw.ccs.bcs.org/CCs/g3/g3pi.htm

Does anyone know, if the Pico has a real-time clock (RTC)?
(May be convenient for all things related to low-level emulation…)

I think it doesn’t… but I’m wrong, because it does: section 4.8 of the datasheet, page 562.

Hm – Looks like the granularity is 1sec, which isn’t as fine as required for emulation. It may go below this with an external reference source, if I’m reading this correctly.
(There’s a CLKDIV_M1 register, “Divider minus 1 for the 1 second counter.” I guess, if you supply an external clock signal of a higher frequency, this could be used for determining smaller intervals, but there’s no interrupt for this one. That is, the register is RW, so you could set it up to fire an appropriate IRQ on the seconds register as CLKDIV_M1 overflows. – However, I might get this wrong altogether and this is not a counter, but just a register to calibrate the RTC to a given clock source. Which is, thinking of it now, very likely.)

The Pi Pico has an onboard 12 MHz crystal hooked to the external oscillator pins on the RP2040 chip. That, in combination with the on-chip timers, should be capable of producing a clock signal that is more accurate than the clock driving most vintage processors. :slight_smile:

The external crystal can be used as the reference oscillator for the onboard RTC, although I’m not sure that the onboard RTC is the right source for emulating things like processor clock ticks; I think it’s more intended for wall clock time and wake-from-sleep duties.

1 Like

Yep, section 4.6 describes the timer, a microsecond up-counter with 4 alarms. Each of the two cores also has a tick timer.

Ah, yes, it’s in section 4.6 Timers, not 4.8 RTC (the latter being in seconds and up only – as you say, wall clock-like).
Microseconds should be good enough for most vintage stuff. (As usual, I’m thinking about a PDP-1 and the Type 30 display.)

add a shield with RTC and SDC.

@elb - that’s a very interesting breakdown. Those features haven’t really been listed in this way where I’ve been looking at least. The only comment I’ve seen about the memory layout, for example, is something along the lines of “why such a difficult layout?”, but that has clearly not taken into account the reasoning behind it. Now it makes a lot of sense. And the part about the synchronized message queues and the atomic GPIO registers. All I’ve seen is “Why two M0+ cores? M0+ lacks atomic load/store so you can’t use two cores at the time!”. But indeed you can… I’m inclined to get one to experiment with, even if there’s no RISC-V :slight_smile:

Thanks!

1 Like

Meanwhile I’m still trying to wrap my head around ‘OK if I plug this into the pi zero I already have what could that do for me as I don’t plan on having sensor packages or connect motors in’? And the ol grey matter is going ‘uuuuuhhhhhhhh.’

I had thoughts of a web TV case for something but 'that is boring, where the IO is the hard part and even that is ‘get someone who can cut and polish aluminum for a custom backplate.’ BORING.

Then my thoughts turn to the bike i have and 'having a whole huge (lol pi zero being 'huge) linux machine for something simple like a spedomiter, or something else that could plonk on a bike. That might be a use case. Plug my phone or tablet in for data tracking (micro usb and it’s a ‘device’.) So… HUH. My be worth looking at there?

Yes, a bike application might be a good fit.

I think, whatever microcontroller board you might pick, if it’s your first time, there’ll be a learning curve. I’d have some confidence in the documentation and support from the Raspberry people - although it seems @monsonite has been a bit put off at the instructions for Windows users.

1 Like

I’m looking at the specs of this board and thinking it’s just begging for a FUZIX port. I don’t know whether I’ve got the skills, but it’s tempting me sorely.

4 Likes

The PIO is certainly one of the more interesting features of this chip.

The datasheet (commencing page 324) describes this versatile peripheral.

Each of the two PIO modules contains 4 state machines. Each state machine is individually programmable from a block of 32, 16-bit wide words.

There are 9 instructions: : JMP, WAIT, IN, OUT, PUSH, PULL, MOV, IRQ, and SET.

In addition there are 2 scratch registers, input and output shift-registers

A PIO state machine may be programmed from a library to function as several of the common peripheral interfaces such as UART, SPI, I2C, quad SPI and DVI or VGA.

Alternatively it’s resources can be used to create a wide range of interfaces, for example a custom video standard or possibly a serial communication link as used in the Transputer.

The PIO can be reprogrammed dynamically, and it can also execute instructions taken from the datastream, in the same way that commands can be mixed with data and can be sent to an SPI memory, controlling its various modes.

Further code can be used to allocate a state machine to a given set of GPIO pins - giving the greatest flexibility. If you want 8 separate SPI interfaces, with separate clocks - then this is feasible too.

Understanding the potential of this programmmable hardware block will be key to exploiting the RP2040 to its full.

1 Like