Silicon ChipPico Digital Video Terminal, Pt2 - April 2024 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Asking questions
  4. Feature: Becoming a Radio Amateur by Dr David Maddison, VK3DSM
  5. Project: Pico Gamer by Geoff Graham
  6. Project: Pico Digital Video Terminal, Pt2 by Tim Blythman
  7. Review: ROCK Model 4C+ SBC review by Tim Blythman
  8. Project: Skill Tester 9000, Pt1 by Phil Prosser
  9. Project: ESP32-CAM BackPack by Tim Blythman
  10. Product Showcase
  11. Project: Reference MEMS Microphones by Phil Prosser
  12. Serviceman's Log: Power tool batteries, part two: electric boogaloo by Dave Thompson
  13. Vintage Radio: Fender Bassman Guitar Amp by Brandon Speedie
  14. PartShop
  15. Subscriptions
  16. Market Centre
  17. Advertising Index
  18. Notes & Errata: Microphone Preamplifier, February 2024; Arduino DCC Controller, January 2020
  19. Outer Back Cover

This is only a preview of the April 2024 issue of Silicon Chip.

You can view 39 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 "Becoming a Radio Amateur":
  • Ham radio links (Software, Free)
Items relevant to "Pico Gamer":
  • Pico Gamer PCB [08104241] (AUD $10.00)
  • 3.2-inch TFT Touchscreen LCD module with SD card socket (Component, AUD $30.00)
  • Pico Gamer kit without case or battery (Component, AUD $85.00)
  • Pico Gamer kit with white case, no battery (Component, AUD $125.00)
  • Firmware for the Pico Gamer (Software, Free)
  • Pico Gamer PCB pattern (PDF download) [08104241] (Free)
Articles in this series:
  • Pico Digital Video Terminal (March 2024)
  • ETI BUNDLE (March 2024)
  • Pico Digital Video Terminal (March 2024)
  • ETI BUNDLE (March 2024)
  • Pico Digital Video Terminal, Pt2 (April 2024)
  • Pico Digital Video Terminal, Pt2 (April 2024)
Items relevant to "Skill Tester 9000, Pt1":
  • Skill Tester 9000 PCB [08101241] (AUD $15.00)
  • Skill Tester 9000 PCB pattern (PDF download) [08101241] (Free)
Articles in this series:
  • Skill Tester 9000, Pt1 (April 2024)
  • Skill Tester 9000, Pt1 (April 2024)
  • Skill Tester 9000, Part 2 (May 2024)
  • Skill Tester 9000, Part 2 (May 2024)
  • The Skill Tester 9000, part one (May 2025)
  • The Skill Tester 9000, part one (May 2025)
  • Skill Tester 9000, Part 2 (June 2025)
  • Skill Tester 9000, Part 2 (June 2025)
Items relevant to "ESP32-CAM BackPack":
  • ESP32-CAM BackPack PCB [07102241] (AUD $5.00)
  • 3.5-inch TFT Touchscreen LCD module with SD card socket (Component, AUD $35.00)
  • CP2102-based USB/TTL serial converter with microUSB socket and 6-pin right-angle header (Component, AUD $5.00)
  • ESP32-CAM LCD BackPack short-form kit (Component, AUD $42.50)
  • Firmware for the ESP32-CAM BackPack (Software, Free)
  • ESP32-CAM BackPack PCB pattern (PDF download) [07102241] (Free)
Items relevant to "Reference MEMS Microphones":
  • Calibrated Measurement Microphone PCB (SMD version) [01108231] (AUD $2.50)
  • Calibrated Measurement Microphone PCB (TH version) [01108232] (AUD $2.50)
  • Short-form kit for the Calibrated Microphone (SMD version) (Component, AUD $22.50)
  • Short-form kit for the Calibrated Microphone (TH version) (Component, AUD $25.00)
  • Simulation and calculation files for the Calibrated Measurement Microphone (Software, Free)
  • Calibrated Measurement Microphone PCB patterns (PDF download) [01108231/2] (Free)
Articles in this series:
  • Calibrated Measurement Mic (August 2023)
  • Calibrated Measurement Mic (August 2023)
  • Reference MEMS Microphones (April 2024)
  • Reference MEMS Microphones (April 2024)

Purchase a printed copy of this issue for $12.50.

The Pico Digital Video Terminal allows you to use boot-to-BASIC computers like the Micromite or PicoMite with a USB keyboard and HDMI display. You can even embed a PicoMite or WebMite inside the compact enclosure to create a small, standalone system. Raspberry Pi Pico Digital Video Terminal Part 2: by Tim Blythman T he Pico Digital Video Terminal is intended to be an update to the ASCII Video Terminal from 10 years ago. These terminals allow a microcontroller board to be directly connected to a keyboard and display so that a separate computer is not required. The ASCII Video Terminal only works with a VGA monitor and PS/2 keyboard. These items are becoming rarer and more expensive, while USB keyboards and monitors with HDMI inputs are inexpensive and widely available. A PicoMite attached to the Pico Digital Video Terminal becomes a modern equivalent of older eight-bit computers like the Commodore 64 or early Apple computers that were ready to be programmed in BASIC immediately after they were powered on. Last month, we described the operation of the Pico Digital Video Terminal, including how it interfaces with these modern peripherals. Now we’ll cover assembling, configuring and using it. We’ll also explain how to put a Pico­ Mite or WebMite inside the Terminal. on jumper JP2 (not JP1, JP3 or JP4). You can still install the headers but leave them open. Link terminal LK1 should have jumpers between pins 1 & 2 and pins 3 & 4. Permanent wire links can replace those headers if you won’t use the Terminal board for any other purpose. JP3 and JP4 select different default display modes, although the mode can also be configured in software via the virtual USB-serial interface. LK1 can be changed to enable a PicoMite or WebMite to be installed inside the Terminal instead of using a separate device connected externally to CON2. We recommend building the Terminal with header pins and sockets for each Raspberry Pi Pico, allowing them to be detached. That will ease testing, troubleshooting and initial programming, although it does preclude using the slimmer H0190 enclosure since the headers are too tall. Digital Video Terminal features & specifications To act as a standard Video Terminal, there should only be a shorting block » 640×240 pixel monochrome (80×30 character) display option » 320×240 pixel colour (53×20 character) display option » HDMI socket with DVI-compatible digital video » USB-A socket for keyboard (works with wireless keyboards) » VT100 terminal compatibility » USB-C socket for 5V USB power » Three status LEDs » Fits in a compact enclosure (105 × 80 × 25mm) » Tested with the Micromite, PicoMite and WebMite » Turns a development board into a standalone computer » Works with other USB-serial capable boards, including: Raspberry Pi Pico/Pico W (including CircuitPython & MicroPython); Arduino Leonardo; CP2102 USBserial converters; and Micromite/Microbridge » Baseline DVI output over HDMI connector » USB host for keyboard » Flexible and modular design siliconchip.com.au Australia's electronics magazine Options April 2024  49 Fig.4: there are a few small SMD parts in the Terminal, but nothing too tricky. Even if you have a fixed application in mind, we recommend fitting the headers, jumpers and links to allow it to be reconfigured in the future. Different front panel PCB designs suit the H0190 and H0191 enclosure options. The rear panel might require a single hole to suit a micro-USB cable, but we have not designed a rear panel PCB; it is easy enough to make the hole in the supplied plastic panel if required. We will have cutting diagrams later for those who wish to cut their own front and back panels. connector. Otherwise, reapply the iron to the existing joints and gently push the socket in the desired direction. It’s best to get this right before too much solder is applied. Solder the remaining pins, applying extra flux and fresh solder as needed. If you get a solder bridge, use flux and braid to wick up the excess. If in doubt, add more flux paste! To thoroughly check the soldering on these fine pins, clean up the flux Construction residue using an appropriate solvent First, check that you have equip- to give you a better view of the solder ment for basic SMD work. You will joints. If you are unsure, it’s better to need solder, flux paste (ideally in a do this now, as the nearby resistors syringe), a fine-tipped or medium-­ might make it difficult to repair later. tipped soldering iron, tweezers and Soldering CON4 could also be a litsome solder-wicking braid. A magni- tle tricky as it does not have any alignfier and some sort of fume extraction ment pegs. Apply flux and position the are also recommended. USB-C socket in place. Tack one lead Refer to the PCB overlay, Fig.4, and check the position before proceedduring construction; you can refer to ing. You could even use the front panel the photos too. The Video Terminal PCB (over the HDMI socket against the is built on a double-sided PCB coded edge of the PCB) to check that CON4 07112231 that measures 98 × 69mm. is positioned correctly. Start by fitting the HDMI socket, Adjust it if necessary, then solder the CON1, as it has the tightest pitch pins. remaining pins. These are more widely We found that the socket’s through- spaced than on the HDMI socket, but hole pins had some movement within you can also use solder braid to clean their pads, even though they are the up any bridges if they occur. recommended size. Gently holding the The two SOT-23 transistors, Q1 and socket towards the edge of the PCB Q2, are the smallest components and should help to centre it. can be fitted next. They are near the Apply flux to the pins and the pads, then clean the iron’s tip and add a Table 1 – SMD resistor codes minimal amount of fresh solder. Tack Value Possible codes one or an adjacent pair of the smaller 10kW 103, 1002 pins in place and check that they are 5.1kW 512, 5101 aligned, using a magnifier if necessary. You might be able to see better around 1kW 102, 1001 the unsoldered pins. 270W 271, 270, 270R If the alignment looks good, solder the four larger pins to secure the 22W 22R, 220, 22R0 50 Silicon Chip Australia's electronics magazine right-hand edge of the PCB. Apply flux, tack one lead, check for alignment of all the pins and solder the remaining leads when you are happy with the positioning. The last of the surface-mounting parts are 23 resistors of five different values. Be sure not to mix up the values. The M2012 (imperial 0805) sized resistors are large enough to have their values marked, so you can check these as you go along, referring to Table 1. They aren’t polarised. In each case, apply flux to the pads, position the resistors with tweezers, then tack one lead. Adjust if necessary, then solder the other lead once the initial joint has cooled and solidified. You can go back and refresh the first lead, adding more flux if needed. With all the resistors in place, clean off any excess flux. Use the recommended solvent and allow the board to dry. You can use this time to perform another inspection before the subsequent components make fixing any problems harder. Through-hole components Fitting the remaining parts by height, shortest to tallest, will ease the process. Slot the three tactile switches into place and solder them to the PCB. Follow with USB sockets CON2 and CON3. The sockets should all line up neatly with the holes in the front panel PCB. Next, mount the header sockets for MOD1, MOD2 and MOD3. Use the header pins and Picos to ensure they are fitted squarely and will align when needed. Check that the headers are pushed flat against the PCB when soldering them. You can then use the sockets to hold the header pins in place while they are soldered to the Picos. Like the sockets, ensure that all the pins are fully pushed in. Unplug the Picos after soldering the pins; do this carefully so as not to bend their pins. If you wish to solder the Picos directly to the PCB, you can use 2mm screws fitted temporarily to the corner holes of the Picos to align them to the PCB. It’s also possible to solder the Picos to the PCB using header pins only. Next, solder the four two-way jumper headers JP1-JP4 and the single four-way header LK1. Fit a jumper to JP2 (but not JP1, JP3 or JP4). Also, fit jumpers between pin 1 and pin 2 of siliconchip.com.au LK1 and from pin 3 to pin 4 of LK1. These correspond to the positions marked “USB” on the PCB. The three LEDs are mounted with the horizontal lead section about 3.5mm above the PCB, so the lenses shine through the front panel holes. Bend the leads by 90° directly behind the lens, being sure to bend the correct way, accounting for the polarity markings on the PCB (the shorter lead is the cathode [K]). The LEDs will be set back slightly from the edge of the PCB but will still protrude out the front panel enough to be seen. If you want them to be more visible, start the bend a bit further from the rear of the lens. The easiest way to align them with the front panel is to temporarily assemble the main PCB and front panel PCB into the enclosure. Trim the LED leads to around 6mm long and place the lenses in the holes in the front panel. There should be enough exposed pad area to tack each LED in the correct location from above. Remove the PCB from the enclosure and refresh each solder joint on the LEDs. That completes the PCB assembly. Initial tests Some basic tests can be done before plugging in the Picos. Connect a USB power supply to CON4, and you should be able to measure 5V between the pins of JP2 (or pin 40 of MOD1, MOD2 or MOD3) and the grounded shell of any of the connectors. 5V power will also be available at CON2 and CON3, so you should be able to power up a USB device plugged into these sockets. The two 5.1kW resistors only come into play if you are using a USB-C to USB-C cable. If you find that 5V is not present when such a cable is used, try a USB-A to USB-C cable. If that works, it points to a problem with those resistors or the CC1 or CC2 (configuration channel) pins of CON4. If you can’t measure 5V, check the soldering around CON4 and CON1. At CON1, the 5V and GND pins are adjacent, so a short circuit there will prevent 5V from being supplied. Correct any problems before proceeding. Programming Next, the Picos need to be programmed. Each has a different siliconchip.com.au firmware image, so naturally, they should not be mixed up. The Picos have a bootloader that emulates a USB drive, so programming requires nothing more than a computer and a micro-B USB cable. You can just plug the Picos into your computer if they are blank. If they have already been programmed, hold the tactile switch (S1, S2 or S3) corresponding to the Pico (MOD1, MOD2 or MOD3). While holding that switch, press and hold the BOOTSEL button on the Pico, then release S1/ S2/S3 and finally, release the BOOTSEL button. When the bootloader runs, a drive called RPI-RP2 should appear on your computer. This is only a virtual drive; a firmware file in the uf2 format can be loaded by copying it to the drive. Once the firmware is loaded, the drive will disappear. Start with MOD1, which is loaded with the file named 0711223A.uf2. After copying this file to the RPI-RP2 drive, MOD1’s onboard LED should light. We added this feature to indicate that the firmware is running on all three Picos. You won’t get any other immediate indications, although MOD1 should now present as a virtual USB-serial device to your computer. A serial terminal program like TeraTerm or minicom might display some data, but that is the most you will see until MOD1 is plugged into the PCB. Plug MOD1 into the PCB and apply power to CON4. If the LED on MOD1 lights up, you can connect your HDMI display. That should cause LED1 to light up, indicating that a display sink has been detected on the HPD pin. The display should also show a black screen with a white flashing cursor in the top left corner. If so, everything is working as expected so far, and you should power off the unit. MOD2 and MOD3 MOD2 is programmed with the file 0711223B.uf2. Again, not much will happen apart from the onboard LED illuminating. There will be a virtual USB-serial port, but nothing will be transmitted yet. Similarly, MOD3 is programmed with 0711223C.uf2 and its onboard LED will light when programming finishes. It also has a virtual USB-­serial port, but it will not show anything immediately. Plug MOD2 and MOD3 into their respective slots on the PCB and apply power at CON4. Plugging a USB keyboard into CON3 should cause LED3 to illuminate within a second or so. LED3 will also flicker if any keys are pressed on the keyboard. The Terminal is a compact unit once assembled. It certainly wouldn’t look out of place tucked under a TV, next to the Blu-ray player. Attach the dongle for a wireless keyboard, and you can program in BASIC from the comfort of your recliner! Australia's electronics magazine April 2024  51 You can also plug a USB-serial device into CON2 to test it; similarly, LED2 should illuminate and flicker when keys are pressed on CON3’s keyboard. If you don’t have such a device on hand, running a USB cable from CON2 to MOD3’s micro-USB socket should have much the same effect, since MOD3 (and indeed MOD1 and MOD2) are programmed to be USB-­ serial devices. If LED2 lights up when a keyboard is attached to CON2, you might have MOD2 and MOD3 mixed up. The sockets will make it easy to swap them. You can also power the Terminal from MOD2’s onboard micro-USB socket, which should transparently transmit data from whatever device is connected to CON2. Final assembly If all is well, slot the front panel into place and secure the PCB to the enclosure using the included screws. A few configuration steps require access to the micro-USB sockets of all three modules, so they should be done before closing up the Terminal unless you provide access through the rear panel to do this. If you wish to cut your own front panel, refer to Fig.5. Fig.6 is the cutting diagram for the back panel. The latter shows three rectangular cutouts, although most people will only need the middle one (or none). If you want to be able to access the USB connector on MOD2 from the back of the enclosure, you just need to make the hole in the middle of Fig.6. Note the different vertical offsets that are used depending on your Pico mounting option. If you need access to MOD1 or MOD3, then their cutout locations are also shown in Fig.6. Configuration It is possible to use the Terminal itself (plus a monitor and keyboard) to configure MOD1 and MOD3 by running a cable from the micro-USB socket on MOD1 or MOD3 to CON2. As long as all three modules are in a working configuration, you can enter commands on a USB keyboard attached to CON3 and view the output on a display attached to CON1. Unsurprisingly, though, MOD2 quickly locks up if connected to itself in this fashion! The configuration options for each Pico are different and are explained below. All three Picos can be configured from their virtual USB-serial terminals, so if you are using a computer to Fig.5: we have produced a front panel PCB to suit the H0190 and H0191 enclosures but you can follow this diagram if you want to cut your own. The included panels are 22mm tall for the H0190 case and 27mm tall for the H0191 case. Fig.6: the horizontal spacings for the rear panel are the same as the front, although the size and height will vary depending on how you have mounted your Picos. Since the included panels are translucent, it is easy to visually confirm the measurements before cutting. 52 Silicon Chip Australia's electronics magazine do this, you will need a serial terminal program like TeraTerm on Windows or minicom on Linux. Connect each Pico in turn by a cable attached to its micro-USB socket. That makes it less likely to interact with the wrong Pico! Open your serial terminal program and select the serial port corresponding to the Pico you wish to configure. TeraTerm, for example, will only display the available devices, so having just one device plugged in at a time will make it clear which Pico is being configured. MOD1 (display) options There are four groups of settings, each corresponding to one of the four possible combinations of JP3 and JP4. This means that the Terminal’s display can be configured either by the jumper setting or through the Terminal. You could also connect an SPST switch to either or both of JP3 and JP4 and use that to switch between the different modes if you plan to switch modes often. For simplicity, only the active (according to JP3 and JP4) settings can be edited. Changing the JP3 or JP4 settings while the Terminal is powered on will cause MOD1 to reboot and load the new settings. This is necessary due to the way the digital video library uses the Pico’s memory. Also, certain settings can’t be changed once set, so the simplest method is to restart the processor. That means you should also reboot MOD1 after changing settings to ensure they are correctly loaded. Due to memory and processor constraints, the monochrome video mode has a higher resolution than the colour mode. One of the options selects between those two alternatives. There are also options to set the visible number of rows and columns. Due to the higher memory requirements, the number of visible rows and columns are reduced in colour mode. If too high a value is selected, the display is truncated. The colour mode can display up to 20 rows of 53 characters. Each character is twelve by six pixels to fit within a 320 by 240 pixel display. The monochrome mode can display 30 rows of 80 characters, with the characters being eight by eight pixels (stretched vertically) within a 640 by 240 pixel grid. The pre-loaded default settings may siliconchip.com.au well work for you. With these defaults, if JP3 is out, the text is white on black, while it is inverted (black on white) if JP3 is shorted. With JP4 out, the monochrome 80 by 24 character display is selected; that is what the various Micromites and PicoMites expect by default. With JP4 in, a colour 53 by 20 character display is selected. The colour mode depends on the correct colour-encoding Escape sequences to display colours different to the defaults. Screen 1 shows the initial status display you can get by pressing the ‘~’ key in a serial terminal window, followed by the menu of configuration options. Pressing ‘A’ selects colour mode, while ‘B’ enables black and white mode. Typing ‘C’ or ‘D’ followed by a number will change the number of columns and rows respectively. Entering ‘E’ or ‘F’ will allow a colour to be chosen for the foreground and background. A list of the eight colours is provided to choose from. These are the colours available in VT100 terminals. Using ‘G’ to enable debugging will display information about the VT100 data being decoded, including regular keystrokes and VT100 Escape sequences. After setting your parameters, use ‘Y’ to save and then ‘X’ to reboot and reload the settings. If you plan to use multiple jumper settings, change the jumpers and repeat for each setting. In other words, the jumpers allow you to have up to four custom configurations, replacing the four default configurations. Screen 1: the MOD1 status display and setup menu. This is a display from the Terminal, which is configuring itself by connecting MOD1’s micro-USB socket to CON2. The Terminal is already doing away with the need for a separate computer! Serial options (MOD2) Only one setting is available to change on MOD2: the downstream USB-serial connection baud rate. That is only important if you are connecting it to something that implements a hardware UART (universal asynchronous receiver transmitter). For example, the Microbridge on a Micromite BackPack communicates with the Micromite using a UART at 38,400 baud by default. Other boards, like the PicoMite, do not use such a signal, so this setting is effectively ignored. The baud rate is set by MOD2 whenever its host changes it; the value is stored immediately in flash memory, so the setting is retained even if the Terminal is powered off. To set the baud rate to work with a siliconchip.com.au Screen 2: the only setting for MOD2 is the downstream baud rate. This can be set by simply using a serial terminal program to set the current baud rate, which is then saved to flash memory for later use. Here is where that setting is found in TeraTerm. USB Keyboard to UART Press ~ to show Setup Menu ----------------------------------------------------------------------Setup Menu: A: Typematic delay (300 ms) B: Typematic repeat (200 ms) C: Terminal emulation mode (VT100) D: Line ending (CR only) E: Toggle debugging (currently OFF) F: Set baudrate (currently 115200) Y: Save to flash Z: Restore defaults Enter typematic delay in ms: 300 Typematic delay set to 300 ms. Screen 3: MOD3 has numerous setup options, but none need to be changed to use the Terminal with a Micromite or PicoMite. The debugging option will report USB keyboard packets as they are received. Australia's electronics magazine April 2024  53 Screen 4 (above): MOD3 will also report (over its USB-serial link) what data is sent to MOD2, including VT100 Escape sequences, as shown here. device like the Micromite, open a terminal program, select the desired baud rate, then close the terminal program. That’s all there is to it! Screen 2 shows this setting in the TeraTerm program; it is found under Setup → Serial Port. Keyboard options (MOD3) Pressing ‘~’ in the serial terminal window for MOD3 should show something like the top part of Screen 3. Each displayed setting can be changed by selecting an alphabetic option, possibly followed by a number, then Enter. For example, to change the Typematic rate to 300ms, press ‘A’, then ‘300’ followed by Enter. Then use ‘Y’ to save the changes to flash memory. Typematic is a feature that makes a key auto-repeat if it is held down. The delay is the time between the first two characters appearing. The Typematic repeat is the time between subsequent characters (second and third, third and fourth etc). These times are set in milliseconds. The Terminal supports three emulation modes, like the USB Keyboard Adaptor for Micros (February 2019; siliconchip.au/Article/11414). The default is the VT100 mode that will work with Micromites and the like. Plain ASCII mode will only send 7-bit ASCII codes and cannot handle any special keys like arrow keys or function keys. Extended ASCII mode adds extra codes to map special keys to 8-bit codes beyond those defined by 7-bit ASCII. The codes are the same as for the USB Keyboard Adaptor for Micros and are listed on page 71 of that article. 54 Silicon Chip ◀ Screen 5 (right): if your Terminal is configured correctly, its display output from CON1 should match that seen in a serial terminal program. We’ve used a(n) HDMI capture device to overlay the two displays to show that they match. You could use these modes for a custom microcontroller application if you don’t want the complexity of multibyte VT100 Escape sequences. The line ending (generated when Enter is pressed) can be set to CR only, LF only (like Linux) or CR and LF (like Windows). When switched on, the debugging option will print USB HID packets as they are received from the attached (CON3) keyboard. The Terminal will also show debugging data when keys on the keyboard (attached at CON3) are pressed; Screen 4 shows the outcome of typing ‘test’, followed by the Enter key, four different arrow keys and a function key. The baud rate setting here is for the data from the GP4 pin of MOD3. The default of 115,200 is what is expected by MOD2, so don’t change it unless you are connecting MOD3 to something other than the Terminal. The ‘Save to flash’ option stores the current settings to non-volatile memory so that the settings are loaded at power-up. ‘Restore defaults’ can be used if the settings are corrupted; that is triggered automatically if an error is detected in the saved flash data. For standard uses of the Terminal, you should not need to change any keyboard settings. Still, you may like to tweak the Typematic options to suit personal preferences [a shorter delay and faster repeat rate makes moving the cursor around the screen quicker – Editor]. Secure the lid and affix the feet to the underside of the enclosure. The Terminal is now ready to use. Australia's electronics magazine If any of the Picos have unexpected behaviour, try programming them with the “flash_nuke.uf2” file. It will completely erase the flash memory, including any saved settings that could be corrupted. Then reflash the appropriate uf2 firmware file for the module. Final testing A complete functional test requires a device connected to CON2. One with an interactive terminal will allow the main features to be exercised thoroughly. A Micromite, PicoMite or WebMite would be ideal for this. If you have a spare Pico or Pico W, loading it with the PicoMite or WebMite firmware is easy. The uf2 files for these can be found on Geoff Graham’s website at https://geoffg.net/ or the Silicon Chip website: siliconchip.au/Shop/6/20 siliconchip.au/Shop/6/230 Hold the BOOTSEL button while plugging the Pico into the computer, then copy the uf2 file to the RPI-RP2 drive that appears. You can then unplug the Pico from your computer and connect it to the Terminal. You can also use a Micromite but MOD2 must have its baud rate set to match the Micromite. The Micromite’s default baud rate is 38,400; however, it can be changed by the ‘OPTION BAUDRATE’ command. Hook everything up as needed to operate the Terminal. The HDMI display should be plugged into CON1 and a USB keyboard into CON3. The Micromite or PicoMite should be connected to CON2. siliconchip.com.au Screen 6: many different USB-serial devices will work with the terminal, including most of those based on PIC16F1455 and PIC16F1459 chips. Here is the Ol’ Timer II from 2020 being set up without a computer. You won’t need to connect power to CON4; instead, connect MOD2’s micro-USB socket to the computer and open a terminal for that virtual USB-serial port. Now type on the keyboard and check that the Terminal shows the same result as the HDMI display. For the various ‘Mites, using the EDIT command to view and modify a program should exercise the VT100 Escape sequences quite well. Screen 5 shows a WebMite connected to the Terminal. We have laid a TeraTerm window over a view of the HDMI capture device connected to CON1. Both show much the same display, so the Terminal is working and configured correctly. If all is well, you can disconnect MOD2’s micro-USB lead and use the Terminal as a standalone device. If things don’t work as expected, you might need to modify some settings. For the Micromite and PicoMite, there are several applicable OPTIONs that can be set. To use the colour-coded editor in the Micromite or PicoMite, you will need to enable the colour display mode and run the following command on the Micromite/PicoMite: match the settings used by MOD1. If the display is wrapping or scrolling oddly, try reducing the number of rows or columns by one. Some TVs will ‘overscan’ and render parts of the display outside the screen’s viewable area. If you can’t fix this from within the TV’s settings, change MOD1’s settings to reduce the number of rows or columns. You might also need to tweak the OPTION DISPLAY setting similarly. Other devices You’ve probably already hooked up a wireless keyboard and 65in TV so that you can program your Micromite from the comfort of your recliner. But when it comes to other devices that will work with the Terminal, we are specifically considering those that will plug into CON2 and behave as USB-serial devices. We mentioned earlier that Micromites and PicoMites are not the only devices that can work with the Terminal. It supports many USB-serial devices, particularly those that don’t require special drivers to operate. Since many microcontroller boards implement a virtual USB-serial port, we have found that many of them will work. These USB-serial ports are often configured in software, so we can’t guarantee that all implementations will be configured in a compatible way. We have tested boards like the Arduino Leonardo; MOD2 recognises these and will communicate with them. The Terminal also works well with the USB-serial library we use for projects based on PIC16F1455 and PIC16F1459 chips. That includes the Microbridge (as built into some Micromites), but we have tested projects such as the Ol’ Timer II from July 2020 (siliconchip. au/Article/14493). Screen 6 shows Ol’ Timer II’s configuration interface being accessed from the Terminal. We haven’t tested them all, but we expect that projects like the DC Motor Speed Controller (October and December 2018, siliconchip.au/Series/328) or the USB Digital and SPI Interface Module (November 2018, siliconchip. au/Article/11299) will also work with the Terminal. So, if you can’t (or don’t want to) hook up a fully-fledged computer to a device in your workshop to configure it, there is now an alternative. A small wireless USB keyboard and a OPTION COLOURCODE ON Since the 53 columns available in colour mode are less than the default 80 columns used by the Micromite and PicoMite, you can also use this command: OPTION DISPLAY rows,columns It will make the ‘Mite’s terminal siliconchip.com.au The middle Pico is the regular version, while the ones on both sides are the H suffix version that comes with headers fitted. Australia's electronics magazine April 2024  55 Compiling the code yourself We supply precompiled uf2 files, making programming easy. However, if you wish, you can compile the sketches yourself using the Arduino IDE. We used version 3.6.0 of the arduino-pico board profile, along with version 1.1.0 of the PicoDVI library and version 0.5.3 of the Pico PIO USB library. The libraries can be installed from the IDE, as can the board profile for the Pico. More information about the board profile can be found at https://github. com/earlephilhower/arduino-pico portable HDMI monitor combined with the Terminal would be handy for places where you don’t want to risk damage to a device like a laptop computer (or don’t have room). We have also found that modules based on the CP2102 USB-serial chip communicate with the Terminal. That opens up the possibility of easily communicating with devices with only a plain hardware UART since those modules provide 3.3V level UART outputs. We sell such modules in our Online Shop (siliconchip.au/ Shop/7/3543). Programming in Python with the Terminal Shown next to a 15in laptop for scale, the Terminal is connected to a 40in monitor and a WebMite. The text is clear, even with sunlight on the screen. If you were looking for something larger than a 3.5in LCD panel, the Terminal offers many possibilities. Screen 7: the included font has extended characters from code page 437, used on the original IBM PC. It contains symbols and characters that can be used to display boxes, mathematical equations and low-resolution graphics. The BASIC code at the bottom shows how the extended glyphs can be printed. 56 Silicon Chip Australia's electronics magazine We tested Picos programmed with the MicroPython and CircuitPython firmware. They were recognised by the Terminal when plugged into CON2. MicroPython and CircuitPython are variants of the Python programming language optimised to work with microcontrollers. They typically implement a REPL (read, evaluate, print, loop) interface similar to that on the Micromites, so they could be used interactively if you prefer Python over BASIC. These Python variants do not appear to have a built-in editing program, but some people are working on adding features like that. Nevertheless, the Terminal is a good way to interact with such a device if it is already running some code. Embedding a PicoMite or WebMite If you want to tinker with BASIC and don’t need much in the way of external access to I/O pins, you can embed a PicoMite or WebMite inside the Terminal’s enclosure. To do this, the ‘Mite replaces MOD2 and directly communicates with MOD1 and MOD3 over their respective serial links. In this case, CON2 and the corresponding 22W resistors are not needed. LED2 can be kept and driven from BASIC by setting the GP14 digital output high. Start by loading a Pico or Pico W with the PicoMite or WebMite firmware. You will need to use a computer or Terminal to configure the PicoMite from the USB-serial port, as the hardware serial port is not configured by default. Run the following OPTION command (on one line): siliconchip.com.au OPTION SERIAL CONSOLE COM1,GP0,GP1,BOTH Now slot the PicoMite in place of MOD2 and change the LK1 settings to only bridge pins 2 and 3. This matches the INT setting marked on the PCB silkscreen. Assuming you are using the default MOD1 configuration, leave JP3 and JP4 off. If you want to use colour mode, fit JP4 and set the following options: OPTION COLOURCODE ON OPTION DISPLAY 20, 52 Now you can power the Terminal via CON4 or a USB cable attached to the PicoMite that has replaced MOD2. You should see the BASIC prompt on your display (try pressing Ctrl-C) and be able to use the keyboard to enter BASIC commands. Graphics The VT100 emulation that the Terminal provides does not have native support for graphics. Still, the included fonts contain some elements that can display low-resolution bitmap graphics, line elements and symbols that can be used to draw things like line art and mathematical equations. The whole font is shown in Screen 7. This is the output of a BASIC program that prints the entire character set. The line at the end shows some BASIC code demonstrating how the character codes can be used to display characters beyond the standard ASCII set. Future enhancements This is a handy bit of hardware, and we have covered some of the many possible uses of the firmware we have written. Both the Pico-PIO-USB and PicoDVI libraries are under active development, and we expect to see enhancements to them in the future. It may be possible in the future to add support for different USB devices (connected via CON2 or CON3) or new display features. In particular, the Pico-PIO-USB library is adding support for devices that can be connected when it is operating in host mode. Devices like USB flash drives and mouses appear to be already usable from the library. So, if you want to build a custom device that interacts with other USB devices, these and other uses may eventually be possible. As the PicoDVI library is developed, more display modes may become available. Since HDMI can also carry a digital audio signal over the TMDS interface, future versions might add sound as a capability. Library updates might even allow minor improvements to the Terminal without affecting its fundamental operation. Stay tuned! Conclusion The Pico Digital Video Terminal is a comprehensive upgrade to the ASCII Video Terminal. It allows the use of a modern USB keyboard and HDMI display with devices like the Micromite and PicoMite, turning them into standalone computers reminiscent of those from the 1980s. Its USB interface also works with all manner of USB-serial devices; it provides a cheap and convenient substitute to a fully-fledged computer when all that is needed is a keyboard and display. It is modular, and we expect many readers will rework and reprogram the Terminal to perform different roles, possibly even emulating other comSC puters and terminal types. USB to PS/2 Keyboard Adaptors Make it easy to use a USB keyboard on most devices that support a PS/2 interface. Both kits include everything except the Jiffy box and 6-pin mini-DIN to mini-DIN cable(s) – see SC6869, $10. The mounting hardware and optional headers and sockets are supplied. The Pico is supplied blank and requires programming. This version is standalone and includes a mouse adaptor. Perfect for older PCs with PS/2 sockets. ps2x2pico Kit SC6864 : $32.50 + postage This version fits into our VGA PicoMite project (July 2022, siliconchip.au/Article/15382), replacing its PS/2 socket. Can also be used standalone. For the VGA PicoMite Kit SC6861 : $30.00 + postage For more details, see the January 2024 issue: siliconchip.au/Article/16090 siliconchip.com.au Australia's electronics magazine April 2024  57