Silicon ChipThe PicoMite 2 - February 2025 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Staying on Windows 10
  4. Feature: Open-Source Software by Dr David Maddison, VK3DSM
  5. Feature: Using electronic modules - Mini UPS Module by Jim Rowe
  6. Subscriptions
  7. Project: High-Bandwidth Differential Probe by Andrew Levido
  8. Feature: Antenna Analysis, Part 1 by Roderick Wall, VK3YC
  9. Project: Wireless flashing LEDs by Tim Blythman
  10. Project: Transistor tester by Tim Blythman
  11. Feature: The PicoMite 2 by Geoff Graham & Peter Mather
  12. Project: IR Remote Control Keyfob by Tim Blythman
  13. PartShop
  14. Feature: Precision Electronics, Part 4 by Andrew Levido
  15. Project: Programmable Frequency Divider by Nicholas Vinen
  16. Serviceman's Log: Another busman’s holiday by Dave Thompson
  17. PartShop
  18. Vintage Radio: TRF-One AM radio by Dr Hugo Holden
  19. PartShop
  20. Market Centre
  21. Advertising Index
  22. Notes & Errata: Maxwell’s Equations, November 2024; Watering System Controller, August 2023
  23. Outer Back Cover

This is only a preview of the February 2025 issue of Silicon Chip.

You can view 43 of the 104 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Items relevant to "High-Bandwidth Differential Probe":
  • High-Bandwidth Differential Probe PCB [9015-D or 9051-D] (AUD $5.00)
  • High-Bandwidth Differential Probe PCB pattern (PDF download) [9015-D] (Free)
  • High-Bandwidth Differential Probe panel artwork and drilling details (Free)
Articles in this series:
  • Antenna Analysis, Part 1 (February 2025)
  • Antenna Analysis, Part 1 (February 2025)
  • Antenna Analysis, Part 2 (March 2025)
  • Antenna Analysis, Part 2 (March 2025)
  • Antenna Analysis, Part 3 (April 2025)
  • Antenna Analysis, Part 3 (April 2025)
Items relevant to "Wireless flashing LEDs":
  • Software for JMP021 - Wireless LEDs (Free)
Articles in this series:
  • Wired Infrared Remote Extender (May 2024)
  • Symbol USB Keyboard (May 2024)
  • Wired Infrared Remote Extender (May 2024)
  • Thermal Fan Controller (May 2024)
  • Symbol USB Keyboard (May 2024)
  • Thermal Fan Controller (May 2024)
  • Self Toggling Relay (June 2024)
  • Self Toggling Relay (June 2024)
  • Arduino Clap Light (June 2024)
  • Arduino Clap Light (June 2024)
  • Lava Lamp Display (July 2024)
  • Digital Compass (July 2024)
  • Digital Compass (July 2024)
  • Lava Lamp Display (July 2024)
  • JMP009 - Stroboscope and Tachometer (August 2024)
  • JMP007 - Ultrasonic Garage Door Notifier (August 2024)
  • JMP009 - Stroboscope and Tachometer (August 2024)
  • JMP007 - Ultrasonic Garage Door Notifier (August 2024)
  • IR Helper (September 2024)
  • IR Helper (September 2024)
  • No-IC Colour Shifter (September 2024)
  • No-IC Colour Shifter (September 2024)
  • JMP012 - WiFi Relay Remote Control (October 2024)
  • JMP012 - WiFi Relay Remote Control (October 2024)
  • JMP015 - Analog Servo Gauge (October 2024)
  • JMP015 - Analog Servo Gauge (October 2024)
  • JMP013 - Digital spirit level (November 2024)
  • JMP013 - Digital spirit level (November 2024)
  • JMP014 - Analog pace clock & stopwatch (November 2024)
  • JMP014 - Analog pace clock & stopwatch (November 2024)
  • WiFi weather logger (December 2024)
  • Automatic night light (December 2024)
  • WiFi weather logger (December 2024)
  • Automatic night light (December 2024)
  • BIG LED clock (January 2025)
  • Gesture-controlled USB lamp (January 2025)
  • Gesture-controlled USB lamp (January 2025)
  • BIG LED clock (January 2025)
  • Transistor tester (February 2025)
  • Wireless flashing LEDs (February 2025)
  • Transistor tester (February 2025)
  • Wireless flashing LEDs (February 2025)
  • Continuity Tester (March 2025)
  • RF Remote Receiver (March 2025)
  • Continuity Tester (March 2025)
  • RF Remote Receiver (March 2025)
  • Discrete 555 timer (April 2025)
  • Weather monitor (April 2025)
  • Discrete 555 timer (April 2025)
  • Weather monitor (April 2025)
Items relevant to "Transistor tester":
  • Software for JMP020 - Transistor Tester (Free)
Articles in this series:
  • Wired Infrared Remote Extender (May 2024)
  • Symbol USB Keyboard (May 2024)
  • Wired Infrared Remote Extender (May 2024)
  • Thermal Fan Controller (May 2024)
  • Symbol USB Keyboard (May 2024)
  • Thermal Fan Controller (May 2024)
  • Self Toggling Relay (June 2024)
  • Self Toggling Relay (June 2024)
  • Arduino Clap Light (June 2024)
  • Arduino Clap Light (June 2024)
  • Lava Lamp Display (July 2024)
  • Digital Compass (July 2024)
  • Digital Compass (July 2024)
  • Lava Lamp Display (July 2024)
  • JMP009 - Stroboscope and Tachometer (August 2024)
  • JMP007 - Ultrasonic Garage Door Notifier (August 2024)
  • JMP009 - Stroboscope and Tachometer (August 2024)
  • JMP007 - Ultrasonic Garage Door Notifier (August 2024)
  • IR Helper (September 2024)
  • IR Helper (September 2024)
  • No-IC Colour Shifter (September 2024)
  • No-IC Colour Shifter (September 2024)
  • JMP012 - WiFi Relay Remote Control (October 2024)
  • JMP012 - WiFi Relay Remote Control (October 2024)
  • JMP015 - Analog Servo Gauge (October 2024)
  • JMP015 - Analog Servo Gauge (October 2024)
  • JMP013 - Digital spirit level (November 2024)
  • JMP013 - Digital spirit level (November 2024)
  • JMP014 - Analog pace clock & stopwatch (November 2024)
  • JMP014 - Analog pace clock & stopwatch (November 2024)
  • WiFi weather logger (December 2024)
  • Automatic night light (December 2024)
  • WiFi weather logger (December 2024)
  • Automatic night light (December 2024)
  • BIG LED clock (January 2025)
  • Gesture-controlled USB lamp (January 2025)
  • Gesture-controlled USB lamp (January 2025)
  • BIG LED clock (January 2025)
  • Transistor tester (February 2025)
  • Wireless flashing LEDs (February 2025)
  • Transistor tester (February 2025)
  • Wireless flashing LEDs (February 2025)
  • Continuity Tester (March 2025)
  • RF Remote Receiver (March 2025)
  • Continuity Tester (March 2025)
  • RF Remote Receiver (March 2025)
  • Discrete 555 timer (April 2025)
  • Weather monitor (April 2025)
  • Discrete 555 timer (April 2025)
  • Weather monitor (April 2025)
Items relevant to "The PicoMite 2":
  • PicoMite 2 firmware (Software, Free)
Articles in this series:
  • The Raspberry Pi-based PicoMite (January 2022)
  • The Raspberry Pi-based PicoMite (January 2022)
  • VGA PicoMite (July 2022)
  • VGA PicoMite (July 2022)
  • The PicoMite 2 (February 2025)
  • The PicoMite 2 (February 2025)
Items relevant to "IR Remote Control Keyfob":
  • RFID Programmable IR Fob Remote PCB [15109231] (AUD $2.50)
  • PIC16F15224-I/SL programmed for the RFID Programmable IR Fob Remote [1510923A.HEX] (Programmed Microcontroller, AUD $10.00)
  • RFID Programmable IR Fob Remote complete kit (Component, AUD $25.00)
  • IR$ Remote Control Keyfob firmware [1510923A.HEX] (Software, Free)
  • RFID Programmable IR Fob Remote PCB pattern (PDF download) [15109231] (Free)
  • Sticker artwork for the RFID Programmable IR Fob Remote PCB (Panel Artwork, Free)
Articles in this series:
  • Precision Electronics, Part 1 (November 2024)
  • Precision Electronics, Part 1 (November 2024)
  • Precision Electronics, Part 2 (December 2024)
  • Precision Electronics, Part 2 (December 2024)
  • Precision Electronics, Part 3 (January 2025)
  • Precision Electronics, part one (January 2025)
  • Precision Electronics, part one (January 2025)
  • Precision Electronics, Part 3 (January 2025)
  • Precision Electronics, part two (February 2025)
  • Precision Electronics, Part 4 (February 2025)
  • Precision Electronics, Part 4 (February 2025)
  • Precision Electronics, part two (February 2025)
  • Precision Electronics, part three (March 2025)
  • Precision Electronics, part three (March 2025)
  • Precision Electronics, Part 5 (March 2025)
  • Precision Electronics, Part 5 (March 2025)
  • Precision Electronics, Part 6 (April 2025)
  • Precision Electronics, Part 6 (April 2025)
  • Precision Electronics, part four (April 2025)
  • Precision Electronics, part four (April 2025)
  • Precision Electronics, part five (May 2025)
  • Precision Electronics, Part 7: ADCs (May 2025)
  • Precision Electronics, part five (May 2025)
  • Precision Electronics, Part 7: ADCs (May 2025)
  • Precision Electronics, part six (June 2025)
  • Precision Electronics, part six (June 2025)
Items relevant to "Programmable Frequency Divider":
  • Programmable Frequency Divider/Counter PCB [04108241] (AUD $5.00)
  • PIC16F1455-I/SL programmed for the Programmable Frequency Divider [0410824A.HEX] (Programmed Microcontroller, AUD $10.00)
  • Programmable Frequency Divider kit (Component, AUD $60.00)
  • Software for the Programmable Frequency Divider (04108241A.HEX) (Free)
  • Programmable Frequency Divider/Counter PCB pattern (PDF download) [04108241] (Free)
Items relevant to "TRF-One AM radio":
  • TRF-One PCB pattern (PDF download) (Free)

Purchase a printed copy of this issue for $13.00.

picomite for the words and mmbasic : geoff graham firmware : peter mather Raspberry Pi Pico 2 This new MMBasic interpreter for the Raspberry Pi Pico 2 and Pico 2 W takes advantage of the new features of the Raspberry Pi Pico 2. It is a comprehensive programming environment that converts the Pico 2 into an easy-to-use and powerful platform for beginners and experts alike. T he Raspberry Pi Pico is a complete package with its own power supply, USB interface and more. It is sold at an extremely good price, making it the perfect drop-in microcontroller for many applications. As described in the December 2024 issue, the new Raspberry Pi Pico 2 has more memory, better performance and more features. If you wish to delve into the details, see the article (siliconchip. au/Article/17316). The highlights of the Pico 2 are: • A faster base clock speed, up from 133MHz to 150MHz. • More efficient CPU cores, up to 50% faster. • More on-chip RAM, up from 264kiB to 520kiB. • More flash memory for program storage, up from 2MiB to 4MiB. • New features, such as the HSTX peripheral for HDMI output and support for external PSRAM. We published the original PicoMite in the January 2022 issue (siliconchip. au/Article/15177). It is essentially a port of MMBasic from the Micromite/ Maximite to the RP2040 chip used on the Pico modules. Yo u c a n n o t simply use that firmware on this new processor. The Pico 2 uses a different type of CPU core (the ARM M33 rather than M0), so the firmware must be The top side of the Raspberry Pi Pico 2. rebuilt to suit the new instruction set. If you try to load the old firmware, the new processor will simply ignore it. With our new release (version 6.00.01) of the PicoMite firmware, we now support both the Raspberry Pi Pico 2 and the original Pico. However, this firmware is much more than just a recompiled version of the original. We have changed it substantially to make the most of the speed and additional features of the new processor. Headline features include HDMI video output in various resolutions up to a wide screen resolution of 1280 × 720, and up to 32,768 colours in other resolutions. The video interface has extensive support for sprites, multiple layers, BLIT and other features used in creating detailed graphics for applications such as games. A new feature in v6.00.01 is a USB interface for connecting a USB keyboard, USB mouse and game controllers. This interface includes support for a USB hub, so you can connect up four devices simultaneously. The new firmware also supports the extra memory available on the Raspberry Pi Pico 2, which provides BASIC programs with up to 256kiB of program space and 228kiB of general-purpose RAM. We exploit the extra speed of the processor with a default CPU clock rate of 150MHz. It can also be overclocked to nearly 400MHz. At the core of the PicoMite firmware is the MMBasic interpreter. This is a fully featured BASIC interpreter that is mostly compatible with Microsoft BASIC. It includes features such as long variable names, multiple data types (float, integer and string) and modern structures, such as multi-line IF and CASE statements. New Raspberry Pi microcontrollers The Raspberry Pi Pico 2 uses a new Australia's electronics magazine microcontroller called the RP2350A, developed by the Raspberry Pi Foundation. There are three other variations of this chip. The first, the RP2350B, is the same as the RP2350A except that it has 20 more pins. This allows for a total of 48 GPIO pins, with eight capable of operating as analog inputs. The PicoMite firmware for the RP2350 will work with either the A or B variants and will automatically recognise the extra I/O pins when it is running on the RP2350B. They will be available to the BASIC program as GP30 to GP47. Currently, only a few modules use the RP2350B, primarily supplied by Pimoroni (https://pimoroni.com). However, it is likely that other suppliers will soon follow with their own versions. The RP2354 A and B chips are the same as the RP2350 versions, but they have 2MiB of flash memory integrated in the package. The PicoMite firmware may support these in the future, but currently they are not readily available for purchase. The RP2350 includes some security features intended to prevent third-­ parties from accessing the program and interfering with its operation. These features are not supported in the PicoMite firmware, as we doubt users will be that concerned with security. Upgrades for the original Picos This release still supports the RP2040 microcontroller used in the original Raspberry Pi Pico and many other third party modules. If you use the new firmware on a board with an RP2040 chip, you will gain many of the extra features listed here, such as USB keyboard support. While the original Raspberry Pi Pico is a little slower than the Pico 2 and has a less memory, it is still more than enough for most projects, so you don’t need to throw away your old modules. siliconchip.com.au ∎ More flash and RAM for user programs ∎ HDMI video output, up to 1280 × 720 pixels and up to 32,768 colours ∎ VGA video output, up to 640 × 480 ∎ USB keyboard, mouse, Wii controller and hub support ∎ Improved TCP/IP stack for WiFi boards ∎ High-speed frequency counter input ∎ Overclocking up to 400MHz Load them with this firmware and they will still be very useful. The Raspberry Pi Pico 2 W The Pico 2 W has also been recently released, with the same RP2350A processor and the addition of a WiFi interface. This, and the RP2040 version of the MMBasic firmware that we called the WebMite (August 2023 issue; siliconchip.au/Article/15897), are also supported by this new firmware. The WebMite firmware running on the RP2040 suffered from a problem that caused the processor to reboot intermittently for no reason. The cause of this was buried deep in the TCP/ IP protocol stack that is used to communicate with the wireless interface and, despite a lot of effort, it proved impossible to eliminate. In this new firmware version, we have completely rebuilt the networking features using a different protocol stack, eliminating the annoying reboots. Thus, we strongly recommend that any designs based on the previous WebMite be upgraded to this version. The Raspberry Pi Pico 2 W using the RP2350A processor (also called the WebMite) also uses this new protocol stack, so we are confident it will not suffer from the same problem. The E9 erratum As explained in our December 2024 article, the Raspberry Pi Foundation issued an erratum called E9 for the RP2350. This describes a hardware fault that affects the GPIO and PIO pins that interferes with the use of internal pulldown currents when they are used as digital inputs. We have implemented some workarounds in the firmware, so you can continue to use the pulldown option for pins configured as digital inputs. However, ideally, an external resistor of 8.2kW or less should be used instead. siliconchip.com.au Beta testing of the PicoMite firmware revealed that this error also affected the ability of MMBasic to communicate using the 1-wire protocol that’s used to measure temperature and humidity with DHT22 sensors. However, workarounds added to the firmware for the RP2350 mean these functions are now unaffected. HDMI support The RP2350 includes an internal peripheral called HSTX. This is a high-speed serial transmission circuit that streams data to up to eight output pins in parallel. It balances the delay between these outputs to within 0.3ns, making it perfect for generating the signals required for DVI/HDMI video. To produce such a signal, the Pico­ Mite firmware builds the video image in a reserved portion of RAM (the video buffer) and then configures a DMA (direct memory access) channel using the second CPU core to rapidly push that data to the HSTX peripheral. The firmware supports three screen resolutions: 640 × 480, 1280 × 720 (wide-screen/720p) and 1024 × 768 pixels. Within each resolution, there are several modes (set by the MODE command) that can trade resolution for more colours and features. The MODE command can save memory by doubling or quadrupling the size of each pixel, both horizontally and vertically. The monitor will still see the same resolution (ie, the same pixel rate). However, since there will be fewer pixels in the video buffer, the memory saved can be used for more colours. For example, the resolution can be set to 1280 × 720 using the RESOLUTION command. Following this, the MODE 1 command can be used to generate an image of 1280 × 720 pixels in monochrome, or MODE 3 can be used for a 640 × 360 image in 16 colours, while MODE 4 will provide a 320 × 180 pixel image in 256 colours. The memory saved by doubling and quadrupling each pixel can also be put to other uses. For example, MODE 4 also releases enough memory for two optional video layers that can be used for an independent overlay. A typical use of this would be to create an image of a moving vehicle overlaid on a background image of a stationary road. The TILE command Another handy feature is the TILE Australia's electronics magazine command, which allows you to colour individual characters in otherwise monochrome text. So, using the 1280 × 720 HDMI resolution in MODE 1, you can colour each character in one of 16 colours. This is used by the built-in editor in MMBasic, which uses cyan for keywords, yellow for comments, green for constant numbers and so on. Screen 1 shows a screen grab of the editor running in the 1280 × 720 resolution with colour coding turned on. This gives you a productive development environment with a colourful wide-screen program editor. In Screen 1 (shown on page 60), the editor was using the default font 3, which gives 80 characters by 30 lines. If you want more, you can switch to font 1 and have an expansive editing window of 160 characters by 60 lines, still with colour coding. HDMI overclocking To generate the DVI/HDMI signal, the firmware needs to overclock the RP2350 to as high as 372MHz. Overclocking means running the CPU clock at a higher frequency than the maximum stated in the data sheet. The firmware automatically does this to accommodate the requirements of the video output. All the Raspberry Pi Pico 2 modules that we tested work perfectly at these speeds. However, overclocking also depends on other components that accompany the processor, and manufacturers might decide to use components that are less tolerant. For this reason, the HDMI capability won’t necessarily work across all thirdparty modules using the RP2350 processor. Connecting an HDMI monitor Fig.1 illustrates how to connect the Raspberry Pi Pico 2 to an HDMI socket. At the high frequencies used by DVI/HDMI, it is important The underside of the Raspberry Pi Pico 2. Screen 1: using the HDMI output in wide-screen format, you have an excellent editing experience with the built in MMBasic editor. The text is clear and the colour coding identifies elements in the program with cyan for keywords, yellow for comments, green for constant numbers etc. to keep the signal lines short and of the same length. To minimise reflections in the signal path, it is also recommended that surface-­mount resistors be used. We have seen poor quality cables that exhibited significant crosstalk, ruining the signal. So, if you get a poor image on your monitor, check your HDMI cable as well. The signal generated by the Pico­ Mite firmware is actually a DVI signal, but HDMI transparently supports DVI and, because HDMI monitors are more common, we recommend using an HDMI connector. However, keep in mind that the PicoMite 2 does not support the transmission of audio in the HDMI signal. The tile feature described above also works with the built-in editor using the VGA video output. As a result, you can still edit your program in a reasonable resolution (640 × 480 pixels) while enjoying a colourful editing experience, even though the output is nominally monochrome. USB keyboard support The USB connector on the Raspberry Pi Pico (both the original and Pico 2) is normally used to load the firmware and to access the MMBasic command prompt as a virtual serial interface over USB. However, the Pico’s USB connector and electronics are USB OTG (On The Go) compliant, similar to the connector on many mobile phones. This means that it is possible to switch the connector from a USB client (when loading firmware) to a USB host, which is required for communicating with a USB keyboard, mouse or similar. When you load a PicoMite firmware image with USB capability (available for both the Pico and Pico 2), this switch will be made automatically when the upload is complete and MMBasic starts running. Using an adaptor cable, you can then plug in a USB keyboard and it will be immediately recognised and start operating normally with auto key repeat, function keys, etc. The Raspberry Pi Pico even supplies the 5V necessary to power the keyboard. You need the adaptor cable because keyboards usually have a Type-A host plug, while the Pico has a micro Type-B USB socket. These adaptors are common (see Photo 1 for an example) and you can find them online or in stores such as Jaycar (Cat WC7725). Because the USB interface on the Pico is now used for a keyboard/ VGA video output If you do not want to use HDMI, VGA video output is another option. VGA-capable versions of the firmware are available for both the Raspberry Pi Pico 2 (RP2350 processor) and the original Raspberry Pi Pico (RP2040). It is simpler to connect it to a VGA connector compared to HDMI, and that the processor does not need to be overclocked (although it still can be). VGA works the same as it did in the previous versions of the Pico­Mite firmware. It provides two video resolutions: 640 × 480 in monochrome and 320 × 240 with 16 colours. The RP2350 version supports a third mode, with a resolution of 640 × 480 in 16 colours. Refer to the VGA PicoMite article to see how the VGA socket is wired up (July 2022; siliconchip.au/Article/15382). Fig 1: this is how you connect a Pico 2 to an HDMI monitor. It is important to keep the PCB traces short and the same length. The adjacent table shows the function of each pin on the HDMI socket and how they are connected. 60 Australia's electronics magazine Silicon Chip siliconchip.com.au mouse, you will not be able to power the Pico via this connector, so the Pico must be powered via 5V applied to the VSYS pin. Another consequence is that you won’t be able to use the serial console over USB. In a self-contained computer with a keyboard and HDMI or VGA video, this is not normally a problem, as the MMBasic console output will be available on your monitor. For users who wish to retain access to the serial console, MMBasic automatically switches the console to pin 11 (GP8) for the serial transmit signal and pin 12 (GP9) for receive. It will also set the baud rate to 115,200. To access this console, you will need a USB to serial bridge that provides a TTL serial interface on one side and a USB interface on the other. These are cheap and commonly available on eBay and similar sites (search for modules using the keyword CP2102). You can also get them from the Silicon Chip Online Shop (Cat SC3437). Using a USB hub The PicoMite USB capability supports a USB hub and, by using one of these, you can connect up to four USB devices, including keyboards, mouse and Wii game controllers. You can even plug in multiple keyboards if you wish, and they will all operate in parallel, although why you would want to do that will remain a mystery! It is better to use an unpowered hub (ie, one that is powered by the Pico’s USB connector). This is because the USB protocol stack running on the Pico cannot reset the hub so, if the power on the Pico is cycled without powering down the hub, the hub will keep its previous connections and be confused when the Pico tries to reconnect. This phenomenon can also cause the hub to be confused if devices are swapped while the hub is powered. If this causes trouble, the simple solution is to cycle the power on the Pico followed by the hub, then plug in the USB devices one by one. USB mouse support The USB interface also supports a computer mouse. The main use for this is within the MMBasic program editor, but you can also use it within a program. If you use the editor with VGA/ HDMI video, colour coding turned on and a mouse connected, the mouse position will be indicated by a character in red on a white background. When you move the mouse, this highlight will move accordingly. Photo 1: you need this kind of converter to connect a standard USB keyboard, mouse, game controller or hub to the Pico or Pico 2. This example is Jaycar Cat WC7725. Clicking on the left mouse button will move the edit cursor to that position (like if you had used the arrow keys on the keyboard), while clicking the right button is the same as pressing F4 on the keyboard (ie, select and cut to the clipboard). Finally, clicking the scroll wheel is the same as using F5 (copy and paste). This means that, within the editor, you can use the mouse to position the edit cursor, cut or copy text to the clipboard, then paste it in a different location, all without touching the keyboard. This is similar to using an editor in a desktop computer’s graphical interface (such as Windows) and makes for a very productive environment. The mouse position and button states can also be read from within a program by using the DEVICE(MOUSE) function. Similarly, one or more USB Wii Classic game controllers can be used within a program using the DEVICE(WII) function to determine the position of the joysticks and buttons (you may need a USB adaptor to connect them). HDMI Pin Function To Pico Pin 1 TMDS Data 2+ (Red) GP16 (pin 21) via 220Ω resistor 2 Shield Ground 3 TMDS Data 2− (Red) GP17 (pin 22) via 220Ω resistor 4 TMDS Data 1+ (Green) GP18 (pin 24) via 220Ω resistor 5 Shield Ground 6 TMDS Data 1− (Green) GP19 (pin 25) via 220Ω resistor 7 TMDS Data 0+ (Blue + Sync) GP12 (pin 16) via 220Ω resistor 8 Shield Ground Support for external PSRAM 9 TMDS Data 0− (Blue + Sync) GP13 (pin 17) via 220Ω resistor 10 TMDS Clock+ GP14 (pin 19) via 220Ω resistor 11 Shield Ground 12 TMDS Clock− GP15 (pin 20) via 220Ω resistor 13 CEC (Consumer Electronics Control) NC (no connection) 14 ARC (Audio Return Channel) NC 15 DDS Clock (I2C Clock) NC 16 DDC Data (I2C Data) NC 17 Ground Ground 18 +5V +5V via schottky barrier diode 19 HPD (Hot Plug Detect) NC New in the RP2350 is support for PSRAM (pseudo-static RAM). This is a type of RAM chip that sits on a quad SPI bus (similar to flash memory) that can be used to increase the amount of RAM accessible by the RP2350. For MMBasic, this feature has limited application, as the RP2350 already has plenty of internal RAM (520kiB) for BASIC programs. Because it is accessed via a serial bus, PSRAM is slower than the internal RAM. However, there are programs that might need to create very large arrays and would not mind the slower access. siliconchip.com.au Australia's electronics magazine February 2025  61 An example of a module that includes PSRAM is the Pimoroni Pico Plus 2, which comes with 8MiB of PSRAM, a dramatic increase on the internal RAM of the RP2350. The PicoMite firmware supports PSRAM with the OPTION PSRAM command. When this is enabled, MMBasic will simply add this extra RAM to the general memory used for I/O buffers, strings and arrays. This is transparent to the BASIC programmer, who can then define truly enormous arrays. Clock speed We have mentioned before that the Pico’s processor can run at various clock speeds. It turns out that the RP2040 and RP2350 processors are quite tolerant of overclocking to above the stock frequency listed in the data sheet. The standard clock speed for the RP2040 is 133MHz, while for the RP2350, it is 150MHz. These are the defaults used by MMBasic. Most chips will run fine at speeds up to 400MHz, and will only experience a temperature rise of 5-6°C, which is hardly significant, so additional heatsinking is not required. When the clock speed is increased, it is also necessary for the CPU core voltage (supplied by an internal voltage regulator) to be increased in a balanced manner. The PicoMite firmware does this automatically; the programmer only needs to use the command CPU SPEED to set the clock rate. For example, with the RP2350 at its base clock speed (150MHz), the CPU core voltage is set to 1.1V, but above 300MHz, it is automatically increased to 1.4V. At these higher clock speeds, programs run proportionally faster. However, it might not be as easy as that. The main limitation on overclocking is not so much the RP2040 and RP2350 CPUs, but the layout of the Pico’s board and the memory (flash and PSRAM) attached to the quad SPI bus. All the official Raspberry Pi Pico and Pico 2 modules we have tested ran at high speeds without a problem (some as high as 400MHz), but other manufacturers might decide to use components that are less tolerant. For this reason, the degree of overclocking cannot be guaranteed and there is no way of knowing beforehand how a module may perform. The only 62 Silicon Chip certain way of discovering this is to test it yourself. Versions of the PicoMite firmware that support video output (VGA or HDMI) need to run at a specific clock frequency to generate the correct video timing and this is enforced by the firmware. For example, the HDMI firmware is fixed at 315MHz for a 640 × 480 pixel resolution and 372MHz for 1280 × 720. VGA defaults to a clock speed of 126MHz and you can only select integer multiples of this, such as 252MHz or 378MHz, if you wish to run it faster. RP2350 or RP2040 that have 16MiB of flash memory, the size of drive A: is almost 10MiB. That is a lot of storage (relatively speaking) and allows you to store many images, music tracks, configuration files, log files and more on the Pico without needing to connect an SD card. You can even store multiple versions of your program as you edit and experiment with it. Once you get used to it, you will find this feature invaluable. The amazing thing is that it is all internal to the Pico – nothing extra is required. The internal drive A: Another feature that was available in the previous firmware version but is worth mentioning is the library facility. This allows you to add your own commands, functions and features to MMBasic so that they are a permanent part of the BASIC language. To install components in the library, you write them as normal MMBasic subroutines and functions and use the LIBRARY SAVE command to transfer them to the library. They are then permanently added to MMBasic and will be available to any BASIC program running on the Pico. For example, you might have written a series of subroutines and functions to retrieve data from a specialised sensor. You could also add them to the library to perform similar functions to those that are already part of the language. This feature is very handy as, from time to time, you can find yourself thinking that it would be nice if MMBasic implemented some feature that you often need. Now you can easily add that feature yourself. One very useful feature in the firmware is drive “A:”, an internal filesystem created when the firmware is loaded. This feature was released in the previous version of the Pico­Mite firmware, but it is so handy that it deserves to be mentioned here. Drive A: is a portion of the flash memory on the Pico that is reserved to create a pseudo drive that looks like an SD card or hard disk. It has a normal file system with subdirectories and long filenames, and acts much the same as an SD card, except that you cannot remove it. Within MMBasic, you can open files on drive A: for reading/writing, rename files, create subdirectories, search for a file, list files and so on. By opening a file for random access, you can even create and operate a miniature database, all within the Pico. On the Raspberry Pi Pico 2 (with 4MiB flash), its size is just over 2MiB and this will increase if more flash memory is available. For example, with third-party boards using the Library support We recommend using a controller like this clone of a SNES controller which has a USB Type-A connector, so you don’t need to worry about adaptors. siliconchip.com.au More RP2350 features Some additional features available on the RP2350 versions include the ability to play MP3 audio files, so you can create your own MP3 player or employ high-quality music as a background to your games. Other audio formats that are supported are WAV, FLAC and MOD. For high-quality audio, you can use a VS1053 CODEC module or a MCP4822 DAC, so building your own music player is a possibility. MMBasic also includes support for the extra features in the PIO (Programmable Input/Output) peripherals provided by the RP2350. There are three in the RP2350, and each acts like a miniature CPU controlling a set of I/O pins. Within MMBasic, you can load program routines into the PIOs, set them running, and pass data to/ from them. The VGA output in the PicoMite firmware uses one PIO to generate the video. This is a good example of what you can achieve using this feature. The ability to convert GP1 into a high-speed frequency counter input is another new feature introduced with the RP2350 that MMBasic supports. This allows you to accurately measure frequencies up to half the CPU clock frequency. Firmware files When you unpack the Ver 6.00.01 firmware zip, file you might be surprised to find there are 12 firmware images in it. These are needed to cover the variations between the CPU (RP2040 or RP2350), the keyboard support (PS/2 or USB), the video output (none, VGA or HDMI) and whether it has WiFi capability or not. The features provided by the various firmware images fall into one of three categories. The first is a general embedded controller. This is where the Pico might be the brains inside a heating controller, burglar alarm etc. For this application, you might, for example, select a firmware image that supports an attached LCD panel. The second category is the self-­ contained, boot-to-BASIC computer reminiscent of the home computers in the 1970s and 80s, such as the Apple II, Tandy TRS-80, Commodore 64 and so on. This is where you turn the computer on and it boots straight to the MMBasic prompt, at which point you can enter a program, edit it and run it (no operating system is required). For this, you would select a firmware image that supports a PS/2 or USB keyboard and VGA or HDMI video output. The third category is the web/internet capable controller (ie, the WebMite) and you have two choices, using either the Raspberry Pi Pico W or the Pico 2 W. These can have an attached LCD panel for displaying data, but their best feature is that they can connect to your WiFi network to serve web pages, access the internet, send emails etc. This does not mean that you cannot use firmware optimised for one job in another role. The above categories are simply to help make sense of the available options and ultimately the choice will depend on what works best. A typical filename for a firmware image is “PicoMiteRP2350­ VGAUSBV6.00.01.uf2”, where: • RP2350 is the processor that the firmware is compiled for. • VGAUSB is the feature set supported (VGA and USB). • V6.00.01 is the version number. This will be incremented in future releases. • .uf2 is the extension, indicating a loadable Raspberry Pi Pico firmware image. Table 2 makes it easy to identify the feature set you need and the corresponding firmware image file. Conclusion The PicoMite firmware is a comprehensive BASIC programming environment for the Raspberry Pi Pico and Pico 2 that converts the Pico hardware into an easy-to-use platform for beginners and experts alike. It is completely free to download and use. In this introduction, we have covered many features of the firmware but, in reality, we have just skimmed the surface. There are many more features that are both useful and amazing. For the full story, download the Pico­ Mite User Manual and work your way through that. This manual runs to over 200 pages and covers all the features of the PicoMite firmware in detail. It even includes a beginner’s tutorial in programming in BASIC, so it is easy to get started. Both the firmware and user manual are available for download from: • https://geoffg.net/picomite.html SC • siliconchip.au/Shop/6/833 Table 2 – firmware variations Filename prefix CPU LCDs Keyboard Video WiFi Flash Default clock Max. clock PicoMiteRP2040 RP2040 Yes PS/2 None None 128kiB 133MHz 420MHz PicoMiteRP2350 RP2350 Yes PS/2 None None 256kiB 150MHz 396MHz PicoMiteRP2040USB RP2040 Yes USB None No 128kiB 133MHz 420MHz PicoMiteRP2350USB RP2350 Yes USB None No 256kiB 150MHz 396MHz PicoMiteRP2040VGA RP2040 No PS/2 VGA No 100kiB 126MHz 378MHz PicoMiteRP2350VGA RP2350 No PS/2 VGA No 180kiB 126MHz 378MHz PicoMiteRP2040VGAUSB RP2040 No USB VGA No 100kiB 126MHz 378MHz PicoMiteRP2350VGAUSB RP2350 No USB VGA No 180kiB 126MHz 378MHz PicoMiteRP2350HDMI RP2350 No PS/2 HDMI No 180kiB 315MHz 372MHz PicoMiteRP2350HDMIUSB RP2350 No USB HDMI No 180kiB 315MHz 372MHz WebMiteRP2040 RP2040 Yes PS/2 None Yes 88kiB 133MHz 252MHz WebMiteRP2350 RP2350 Yes PS/2 None Yes 208kiB 150MHz 252MHz siliconchip.com.au Australia's electronics magazine February 2025  63