Silicon ChipColour Maximite 2 (Generation 2) - November 2021 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Subscriptions: PE Subscription
  4. Subscriptions: PicoLog Cloud
  5. Back Issues: PICOLOG
  6. Publisher's Letter
  7. Feature: The Fox Report by Barry Fox
  8. Feature: Techno Talk by Mark Nelson
  9. Feature: Net Work by Alan Winstanley
  10. Project: Dual Battery Lifesaver by Nicholas Vinen
  11. Project: USB Supercodec by Phil Prosser
  12. Project: Thermometer Calibrator by Allan Linton-Smith
  13. Feature: I/O Expander Modules by Tim Blythman
  14. Feature: Radio Controlled House Lights by Peter Brunning
  15. Project: Colour Maximite 2 (Generation 2) by Phil Boyce, Geoff Graham, Peter Mather
  16. Feature: AUDIO OUT by Jake Rothman
  17. Feature: Circuit Surgery by Ian Bell
  18. Feature: Max’s Cool Beans by Max the Magnificent
  19. Feature: PICn’Mix by Mike Hibbett
  20. PCB Order Form
  21. Advertising Index

This is only a preview of the November 2021 issue of Practical Electronics.

You can view 0 of the 72 pages in the full issue.

Articles in this series:
  • (November 2020)
  • Techno Talk (December 2020)
  • Techno Talk (January 2021)
  • Techno Talk (February 2021)
  • Techno Talk (March 2021)
  • Techno Talk (April 2021)
  • Techno Talk (May 2021)
  • Techno Talk (June 2021)
  • Techno Talk (July 2021)
  • Techno Talk (August 2021)
  • Techno Talk (September 2021)
  • Techno Talk (October 2021)
  • Techno Talk (November 2021)
  • Techno Talk (December 2021)
  • Communing with nature (January 2022)
  • Should we be worried? (February 2022)
  • How resilient is your lifeline? (March 2022)
  • Go eco, get ethical! (April 2022)
  • From nano to bio (May 2022)
  • Positivity follows the gloom (June 2022)
  • Mixed menu (July 2022)
  • Time for a total rethink? (August 2022)
  • What’s in a name? (September 2022)
  • Forget leaves on the line! (October 2022)
  • Giant Boost for Batteries (December 2022)
  • Raudive Voices Revisited (January 2023)
  • A thousand words (February 2023)
  • It’s handover time (March 2023)
  • AI, Robots, Horticulture and Agriculture (April 2023)
  • Prophecy can be perplexing (May 2023)
  • Technology comes in different shapes and sizes (June 2023)
  • AI and robots – what could possibly go wrong? (July 2023)
  • How long until we’re all out of work? (August 2023)
  • We both have truths, are mine the same as yours? (September 2023)
  • Holy Spheres, Batman! (October 2023)
  • Where’s my pneumatic car? (November 2023)
  • Good grief! (December 2023)
  • Cheeky chiplets (January 2024)
  • Cheeky chiplets (February 2024)
  • The Wibbly-Wobbly World of Quantum (March 2024)
  • Techno Talk - Wait! What? Really? (April 2024)
  • Techno Talk - One step closer to a dystopian abyss? (May 2024)
  • Techno Talk - Program that! (June 2024)
  • Techno Talk (July 2024)
  • Techno Talk - That makes so much sense! (August 2024)
  • Techno Talk - I don’t want to be a Norbert... (September 2024)
  • Techno Talk - Sticking the landing (October 2024)
  • Techno Talk (November 2024)
  • Techno Talk (December 2024)
  • Techno Talk (January 2025)
  • Techno Talk (February 2025)
  • Techno Talk (March 2025)
  • Techno Talk (April 2025)
  • Techno Talk (May 2025)
  • Techno Talk (June 2025)
Colour Maximite 2 (Generation 2) Part 2 Words Phil Boyce Design Geoff Graham Firmware Peter Mather Assembly and setup of our retro home computer L ast month, we introduced the new, and extremely powerful, Colour Maximite 2 Generation 2 computer (CMM2 G2, or just ‘G2’ for short). The specification and features list (see Part 1, last month) shows that this latest version of the Maximite certainly packs a lot of punch into a small package. Fig.1 shows various screenshots from different programs, and from these you can begin to get an idea of the G2’s graphics capability; and do remember that all these programs are coded in BASIC. In keeping with all previous versions of the Maximite family, the G2 makes for a very rewarding self-assembly electronics project. Fig.2 shows that the G2 PCB contains many surface-mount devices (SMDs); however, don’t let this put you off building it yourself. I guarantee that even if you have never soldered an SMD component before, providing you can use a soldering iron with through-hole components then you will be more than able to build the kit version of the G2; and probably complete it in just a couple of hours. If you look at the circuit diagram in Fig.3, you may be wondering why I am so confident with this claim. Put simply, the G2 kit contains a part-assembled PCB that just needs finishing off with a handful of through-hole parts. Fig.1. Various screenshots from some early programs showing the potential of the G2’s impressive graphical output – all coded in MMBASIC. 42 PCB, kit, or fully assembled? The G2 PCB has been optimised for automated machine assembly, but what does this actually mean? Well, you could use the PCB Gerber files (supplied in this month’s downloads from the November 2021 page of the PE website) and get a PCB made from one of the many Far-East PCB fabricators. You would then need to painstakingly solder all the SMDs yourself. I have done this on several occasions when the prototype was being developed; however, this method of assembly does require you to be extremely confident with SMD soldering, not to mention very patient – especially when soldering the Fig.2. The assembled (4-layer) G2 PCB mostly contains SMDs, all mounted on the top side. Around the edge, there are a handful of connectors, sockets and through-hole components. Practical Electronics | November | 2021 176-pin STM processor. For most people, this assembly approach is not an option (and is not one that I would recommend). Instead, you can request that the PCB fabricator use their automation tools for soldering the SMDs for you. To do this, you need to supply two additional files alongside the Gerber files – the BoM and CPL (Bill of Materials and Component Layout). The list of SMDs that the PCB fabricator can solder for you are shown in Parts List 1, and this should result in you receiving a board with most of the SMDs pre-soldered (see Fig.4). This saves a lot of soldering time, and also eliminates any silly mistakes and/or damage to SMDs. It is then just a matter of soldering the remaining components by hand, and then carefully fixing the assembled PCB (Fig.2) into the recommended enclosure. This approach is a much more practical assembly method and what we recommend if you wish to build your own G2. To save you having to deal with the PCB fabricator, and generating the two assembly files in the correct format (often specific to whichever fabricator you use), all the parts required to perform this process are included in the kit version of the G2. However, if this still seems like too much soldering, then you’ll be glad to hear that the G2 is also available as a ready-assembled unit. NOTE: As discussed last month, sourcing the required STM32 processor is currently very dificult. This is frustrating, but outside of our control, so it may be a while before the STM32 becomes readily available again from the manufacturer. Assembling the kit See Parts List 2 for what is included in the G2 Kit. It includes the part-assembled PCB, along with all the connectors, sockets and through-hole components required to finish the PCB (in other words – the parts that the PCB fabricator won’t assemble). Also included is the case, front and rear panels and all the mounting hardware to fix the PCB into the case. We will now briefly step through these items in the correct sequence to end up with a complete working G2 kit. Begin with the IR receiver, ensuring that the rounded face is closest to the edge of the PCB (this is the receiver side which detects any incoming IR signal, so it needs to be outward facing). Ensure you push it down all the way into the PCB (rather than ‘floating’ in the air). This will ensure it lines up with the ‘IR window’ hole in the front panel. Next, mount the dual LED assembly, mounting it flush with the PCB. Next is the SD socket, and even though this is an SMD component, the spacing of the pins is large enough to make soldering it in place very straightforward. Do not worry if you don’t have a temperature-controlled soldering iron (a bit of a misconception is that you must have one if you’re soldering SMDs). I recommend a standard iron which has a power rating of 15-25W. The important point to bear in mind is not to leave the iron on any one of the SD socket’s pins for too long as this could melt the plastic body that holds the pins in place. Liquid flux and a clean soldering iron tip is the key to a neat finish. The SD socket has a pair of plastic locating pins on the underside that holds it in correct alignment while soldering it in place. Begin by soldering the four larger corner pins (legs), then move onto the nine pins on the back edge, followed by the three pins on one side. Next, solder in the stereo socket. This is also an SMD component with locating pins to assist with alignment. Once positioned, solder the five pins, but do be careful not to allow too much solder to form on any one pin. Use de-soldering wick if you do end up with excess solder on any joint. Next, solder the power switch into position – nothing to point out here apart from ensuring it remains upright (and at right-angles) to the PCB. The coin-cell holder is another SMD component, but with only two large legs to solder. Ensure that the holder’s orientation matches the shaped outline shown on the silkscreen (otherwise the battery will connect into the circuit with reverse polarity!). Do not install the battery at this stage – that comes at the end of assembly. Practical Electronics | November | 2021 Next, mount the four connectors across the back-edge of the PCB. These are all through-hole parts so nothing to really mention other than to ensure that they all sit flush on the PCB. Once they’ve been soldered in place your PCB should look similar to Fig.2 (but with nothing in IC5’s location near the top-left corner). Finally, solder the two 3-way headers into place. The BOOT header (JP2) is the one that is close to the top-left corner of the SD socket; and the PWR header (JP1) is the other one between the stereo socket and the power switch. Slide the two jumper links into place – one into the ‘PRG’ position (ie, the left two pins of the BOOT header), and the other jumper link onto the top two pins of the PWR header (closest to C11). The latter makes the power switch active in the down position. That completes the electrical assembly of the G2, so before we proceed it is now worth doing a thorough visual check of all the joints on the parts just soldered to ensure there are no shorts. Once you’re happy with your soldering, place the PCB onto a cleared working surface so that there is no risk of any damage. I like to use the bottom half (the base) of the enclosure as this minimises the risk of accidentally placing the PCB onto any odd strand of metal which could damage it. Initial testing Before we load the MMBASIC firmware into the STM32 processor, it’s worth testing how much current the unit draws from a 5V PSU. For this test, you will need a meter capable of measuring up to a minimum of 250mA and a 5V supply that supplies at least 300mA. I like to use Raspberry Pi PSU along with a decent thickness USB type-B lead. At around £8, these PSUs are relatively cheap, yet are more than capable of supplying enough current. To measure the current, attach only the 5V PSU, and if you’re not using a lab power supply, then you can put your meter leads across the 3-way PWR jumper (JP1). Place one probe on the bottom pin of the 3-way PWR header, and the other probe on either of the top two pins (or onto the jumper link if it has exposed metal). With the power switch in the up position (off), your meter will short out the 5V rail from the USB socket (CON2) direct to the 3.3V voltage regulator (REG1) allowing you to measure the current draw. If everything is OK, you should see a reading of around 50mA. If you observe something significantly different to this, then first check that the PSU is indeed outputting 5V, and if so, thoroughly re-check all solder joints resolving any issues you find. Excessive current draw indicates that there is likely to be a solder short somewhere (or a misplaced component). Fig.4. A PCB fabricator can pre-solder all the smaller SMD components, resulting in a board like this. 43 1 0 0 nF 1 6 4 1 5 U SB T Y P E B P W R / C O N SO L E 1 4 2 D – 2 x 1 0 k Ω + 3. 3V V cc V 3 1 2 D C D 6 5 3 D + C O N 2 IC 8 C H 34 0 G U D – U D + 8 1 0 D SR X I T X D X O C T S G N D 3 2 + 3. 3V 9 1 1 0 0 nF + 3. 3V 9 4 3 4 9 1 1 4 V D D V D D Q 4 0 1 9 N C W E C AS R AS C S 38 C K E 37 C L K IC 4 MT 4 8L C 1 6 M1 6 A2 39 D Q MH 1 5 D Q ML 2 1 2 0 BA1 BA0 2 3 A0 2 4 A1 2 5 A2 2 6 A3 6 V SSQ 1 2 4 6 52 V SS 2 8 4 1 T O T O AU D I O C O N 4 X 3 1 4 ST V D D MO D E 8MH z X O O U T 3 J P 7 G N D 3 6 x 1 0 0 nF 1 6 1 7 1 8 1 0 0 nF 1 µ F 1 0 µ F 1 1 R I R X D 7 1 2 pF 1 0 Ω 1 3 D T R R 2 32 1 2 pF 1 4 R T S X 1 32 7 6 8H z 2 7 2 T O N U N C H U K 1 53 D Q 1 5 51 D Q 1 4 50 D Q 1 3 4 8 D Q 1 2 4 7 D Q 1 1 4 5 D Q 1 0 4 4 D Q 9 4 2 D Q 8 1 3 D Q 7 1 1 D Q 6 1 0 D Q 5 8 D Q 4 7 D Q 3 5 D Q 2 4 D Q 1 2 D Q 0 36 A1 2 35 A1 1 2 2 A1 0 34 A9 33 A8 32 A7 31 A6 30 A5 2 9 A4 54 A3 O N C O N 1 A2 O N C O N 1 4 .7 k Ω 4 .7 k Ω 2 .2 µ F 2 .2 µ F 1 57 P G 1 4 1 56 P G 1 3 1 1 1 P G 7 1 2 0 P A9 1 2 1 P A1 0 1 6 4 P B6 1 52 P G 9 2 6 P F 8 2 7 P F 9 2 9 P H 0 / O SC _ I N 30 P H 1 / O SC _ O U T 1 51 P D 7 4 5 P A2 80 P B1 1 9 8 P D 1 0 9 7 P D 9 9 6 P D 8 7 8 P E 1 5 7 7 P E 1 4 7 6 P E 1 3 7 5 P E 1 2 7 4 P E 1 1 7 3 P E 1 0 7 0 P E 9 6 9 P E 8 6 8 P E 7 1 4 3 P D 1 1 4 2 P D 0 1 0 5 P D 1 5 1 0 4 P D 1 4 1 0 6 P G 2 6 7 P G 1 6 6 P G 0 6 5 P F 1 5 6 4 P F 1 4 6 3 P F 1 3 6 0 P F 1 2 2 1 P F 5 2 0 P F 4 1 9 P F 3 1 8 P F 2 1 7 P F 1 1 6 P F 0 1 0 8 P G 4 1 0 9 P G 5 1 6 9 P E 0 1 7 0 P E 1 1 1 2 P G 8 84 P H 7 58 P B2 1 0 1 P D 1 3 1 0 0 P D 1 2 9 9 P D 1 1 83 P H 6 59 P F 1 1 1 6 0 P G 1 5 4 6 P H 5 1 2 3 P A1 2 1 2 2 P A1 1 50 P A4 51 P A5 1 2 5 V C AP 81 V C AP V SSA 1 7 2 1 59 1 4 9 1 36 1 0 3 1 2 7 82 + 3. 3V IC 3 ST M32 H 7 4 3I I G 4 6 C O M2 : T x 8 5 6 C O N 8 P A1 4 P A1 3 G N D 1 3 1 P E 2 9 2 P B1 2 1 4 5 P D 3 1 4 4 P D 2 1 4 1 P C 1 2 1 39 P C 1 0 1 4 0 P C 1 1 89 P H 1 2 1 1 0 P G 6 57 P B1 32 P C 0 87 P H 1 0 86 P H 9 85 P H 8 4 4 P H 3 4 3 P H 2 1 7 6 P I7 1 7 5 P I6 1 7 4 P I5 1 7 3 P I4 1 54 P G 1 1 1 50 P D 6 1 55 P G 1 2 3 P E 4 1 1 V E R T SY N C P I9 1 2 H O R I Z SY N C P I1 0 P I1 1 2 SD A 1 3 5 7 R ST SD A SC L 7 C O M2 : R x 1 33 P I2 1 32 P I1 1 31 P I0 1 30 P H 1 5 1 53 P G 1 0 1 2 8 P H 1 3 5 P E 6 4 P E 5 2 1 6 5 I C # 2 SD A P B7 2 1 6 8 I C # 1 SD A P B9 2 1 6 7 I C # 1 SC L P B8 33 C O U N T 1 P C 1 1 2 9 C O M2 : R x P H 1 4 C O U N T 2 34 P C 2 _ C 35 C O U N T 3 P C 3_ C 1 6 3 SP I 1 MO SI P B5 1 6 2 SP I 1 MI SO P B4 1 6 1 SP I 1 C L K P B3 P W M1 C 56 P B0 1 1 6 P W M2 B P C 7 1 34 G P I O P I3 9 4 SP I 2 MI SO P B1 4 4 1 C O M1 : D E P A1 9 3 SP I 2 C L K P B1 3 9 5 SP I 2 MO SI P B1 5 1 1 5 P W M2 A P C 6 G P IO 7 P I8 2 88 I C # 2 SC L P H 1 1 55 G P I O P C 5 C O U N T 4 54 P C 4 53 P W M1 B P A7 1 38 F AST C O U N T P A1 5 C O M2 : T x 4 0 P A0 P W M1 A 52 P A6 C O M1 : R x 4 7 P A3 C O M1 : T x 4 2 P A2 1 1 9 P A8 2 P E 3 V SS T O T O B3 O N B2 O N 1 58 5 R E SE T 8 1 4 8 P A1 3 SC L 1 0 0 nF 1 35 4 SQ W / I N T V BAT 1 2 6 3 G N D 4 C R 1 2 2 0 BAT T E R Y 6 1 1 3 P A1 4 V BAT IC 7 D S32 31 MZ 1 0 2 3 2 z 7 1 1 32 kH 6 1 V cc 1 R ST 1 6 6 BO O T 0 1 0 7 P G 3 80 P B1 1 31 R ST 1 7 1 P D R _ O N V BAT 8 P C 1 3 2 4 P F 6 2 5 P F 7 2 8 P F 1 0 1 4 7 P D 5 1 4 6 P D 4 1 37 P A1 4 1 2 4 P A1 3 9 P C 1 4 / O SC 32 _ I N 4 5 P H 4 1 0 P C 1 5/ O SC 32 _ O U T 7 9 P B1 0 1 1 8 P C 9 1 1 7 P C 8 39 V D D A 38 V R E F + 4 8 2 1 0 0 nF ST - L I N K 3. 3V V D D 6 9 0 + 3. 3V P O W E R 9 1 4 .7 µ F 1 4 x 1 0 0 nF 6 2 1 µ F 7 2 1 0 0 µ F G N D 4 9 1 0 µ F S1 2 2 P W R + 3. 3V + 3. 3V 2 3 O U T IN 36 R E G 1 AMS1 1 1 7 - 3. 3 1 4 + 5V 1 5 J P 1 37 T O C O N 3 P I N S 37 & 39 J P 3 J P 4 C O N 1 C O N 1 Fig.3. The circuit diagram highlights that the G2 is built around the STM32 processor. There are just a handful of connectors, sockets and support components directly connected to the STM32. Three other support ICs (RAM, USB driver, and real-time clock), and one optional IC (for using a USB-protocol COLOUR MAXIMITE 2 GEN2 MAIN CIRCUIT mouse) complete the circuit. (Diagram courtesy of Silicon Chip magazine) USB driver 44 Practical Electronics | November | 2021 To install the MMBASIC firmware into the STM32 processor, you simply need to connect the G2 to a computer (this can be either a Windows PC or Mac) BO O T 0 + 3. 3V + 3. 3V 2 .2 Ω E SP _ 3. 3V 1 0 0 nF 1 0 k Ω 1 0 k Ω 1 0 0 µ F 1 k Ω R E SE T J P 2 1 k Ω 4 .7 k Ω 3 2 A S2 1 0 0 nF R ST 1 0 k Ω A λ P O W E R SD λ C AR D K K 1 IC 2 V cc D Q 1 0 0 nF DS18B20 DIGITAL THERMOMETER T SO P 4 838 I R SE N SO R 3 1 λ G N D P R O G /R U N IR D 1 2 2 .2 Ω L E D 1 1 0 µ F 1 0 0 nF C AR D P R E SE N T SD C O N 6 C AR D SK T C D 2 4 0 Ω 2 4 0 Ω V E R T SY N C 2 4 0 Ω H O R I Z SY N C 2 4 0 Ω 2 4 0 Ω 2 4 0 Ω 2 4 0 Ω 2 4 0 Ω 2 4 0 Ω 9 C AR D E N ABL E D AT A T O C AR D 2 4 0 Ω 1 2 3 2 4 0 Ω C L O C K T O 4 C AR D 5 6 7 8 D AT A F R O M C AR D 1 2 0 Ω 1 2 0 Ω 1 2 0 Ω 2 4 0 Ω 2 4 0 Ω 2 4 0 Ω 1 2 0 Ω 1 2 0 Ω 2 4 0 Ω 1 2 0 Ω 2 4 0 Ω 1 2 0 Ω 1 2 0 Ω C AR D W R IT E P R O T E C T C O N 5 V G AC O N N E C T O R 7 5Ω 2 4 0 Ω 1 2 0 Ω V ID E O V ID E O 1 2 0 Ω 1 2 0 Ω 1 2 0 Ω 1 2 0 Ω 7 5Ω 1 2 0 Ω 1 2 0 Ω W P – R E D – G R E E N 2 – BL U E 3 V ID E O 7 5Ω C O N 9 6 1 1 7 1 2 8 1 3 9 1 4 1 0 1 5 1 4 5 ( H E AD E R F O R C O N N E C T I N G E SP - 0 1 W I F I MO D U L E ) 2 4 0 Ω 2 4 0 Ω 1 2 0 Ω 2 4 0 Ω 2 I C 2 4 0 Ω 1 2 0 Ω 2 4 0 Ω IC 3P I9 2 4 0 Ω IC 3P I1 0 1 2 0 Ω 1 2 0 Ω 1 2 0 Ω 1 2 0 Ω 2 I C # 2 SD A 2 4 0 Ω 2 4 0 Ω 2 4 0 Ω 2 I C 2 I C 1 2 0 Ω V E R T SY N C H O R I Z SY N C T O N U N C H U K 2 1 0 k Ω # 2 SD A # 1 SD A # 1 SC L + 3. 3V 1 0 k Ω C O U N T 1 C O M2 : R x C O U N T 2 C O U N T 3 SP I 1 MO SI SP I 1 MI SO SP I 1 C L K 1 0 k Ω P W M1 C P W M2 B G P IO SP I 2 MI SO + 3. 3V C O M1 : D E C O M2 : T x P W M1 A C O M1 : R x C O M1 : T x 2 I C # 2 SD A 2 # 2 SC L I C I C 5_ P I N 1 8 I C 5_ P I N 1 7 via a single USB (type-B) lead (this single lead will also supply power to the G2 from your computer’s USB port). However, you might need to install a USB driver first so that your computer’s Practical Electronics | November | 2021 7 G P IO C O U N T 4 P W M1 B F AST C O U N T 2 8 30 32 34 36 38 4 0 C O N 3 E X T E R N AL I/O 9 1 1 1 3 1 5 1 7 1 9 2 1 2 3 2 5 2 7 2 9 31 33 35 37 39 # 2 SC L 1 3 5 2 I C 4 6 8 1 0 1 2 1 4 1 6 1 8 2 0 2 2 2 4 2 6 P W M2 A G P IO 2 SP I 2 C L K SP I 2 MO SI + 5V 1 0 k Ω C O U N T 4 P W M1 B F AST C O U N T C O M2 : T x P W M1 A C O M1 : R x C O M1 : T x operating system (OS) can detect the G2. The G2 uses the popular CH340G USB-to-serial IC (IC8) and the relevant driver can be downloaded and installed from here: https://bit.ly/pe-nov21-drv Once installed, connect the G2 to your computer and check it can detect the G2 (for example, use Windows Device Manager and see which COM port has been assigned to the G2). 45 8mm M3 bolt Motherboard 5mm M3 spacer ABS case with mounting pillar Fig.5. The PCB is fitted to the base using four 5mm nylon spacers and M3 screws. Fig.6. Lower the PCB together with the front and rear panels into the base, ensuring the panels slide into the grooves. Four M3 screws fasten the PCB into place. Installing MMBASIC firmware To load the MMBASIC firmware, you will first need to download the STM32CubeProgrammer software, which is available from: https://bit.ly/pe-nov21-stm32 This software is free, but STM do require you to have an STM account, or at least to provide your name and email address. They will email you a link to download the software. Then install this software on your computer (Windows, Linux and macOS are supported). You will also need the latest version of the MMBASIC firmware. Visit https:// geoffg.net/maximite.html and scroll down to the bottom of the page to download the latest firmware file. Extract the file, and save it on your computer. (At the time of writing, the latest version was CMM2v5.07.01.bin) With the G2 connected to your computer (via the single USB type-B lead), ensure that the BOOT jumper link is positioned on the PRG position (ie, the left two pins are shorted). Then turn on the G2 and check the green power LED lights up – this will indicate that the 3.3V line is operating correctly. Then press the Reset button (S2 – located near the VGA socket) which will put the STM32 into firmware programming mode. Next, run the STM32CubeProgrammer software on your computer. On the top right of the program window select UART as the communications method. If the program does not automatically recognise the UART connection, click on the small blue circle to the right of the Port drop down list to refresh the entry. Click on the ‘Connect’ button. You should then see a series of messages finishing with the message ‘Data read successfully’. Any messages in red will indicate an error. Click on the download button on the left side of the STM32CubeProgrammer window and the software will switch to the ‘Erasing and Programming’ mode. Use the ‘Browse’ button to select the firmware file (it will have an extension of .bin). Tick the ‘Verify programming’ checkbox. Finally, click on the ‘Start Programming’ button. The STM32CubeProgrammer software will then program the firmware into the Flash memory of the STM32 (the STM32CubeProgrammer software calls this ‘downloading’). After a short time, a dialog box will pop up saying ‘File download completed’. Do not do anything at 46 this point as the software will then start reading back the firmware programmed into Flash. When this has successfully completed, another dialog box will pop up saying ‘Download verified successfully’. The whole operation will take around a minute – and remember, any messages in red will indicate an error. Once the firmware has been successfully installed, disconnect the G2 from your computer, and set the jumper-link on the BOOT header to the RUN position (right-two pins shorted). It is now time to carefully insert the CR1220 coin cell. Initial testing Now for the moment of truth – testing your G2 powers up successfully. Connect your 5V PSU along with a VGA monitor, and a USB keyboard (to the top USB port). Use the front panel power switch to turn the G2 on, and after less than a second, you should see the Maximite logo and the version number of the firmware that you have just loaded. If your monitor remains blank, ensure that you have not left the BOOT jumper link in the PRG position. Note that depending upon your monitor, it may take longer than one second for an image to appear (the VGA signal will however be outputted from the G2 within one second of powering up). The delay is purely the time it takes for your monitor to ‘sync’ to the VGA signal; I have one ‘branded’ monitor that takes eight seconds, and a TV that is instant. The first time the G2 is powered up, it will ask for the keyboard layout – press 1 for UK (other language options will be listed). Then it will request the date and time – simply enter the relevant numbers as guided. If nothing appears to happen when you press a key, it may be because the USB keyboard you’re using is not fully compatible – simply try another one. I prefer to use a Logitech K400+ wireless keyboard (costs around £30) since it is nice and compact, and it has never failed me during many hundreds of CMM2 tests. There is another bonus to using the aforementioned keyboard (or any other wireless keyboard for that matter). When hooked up to a large TV the G2 can be comfortably used from the sofa! At this point, it is worth performing another power test (especially if you fail to see anything on the monitor). If you disconnect the monitor and keyboard, you should see a current draw of around 200mA. Any excessive deviation from this means you’ll need to go back and check things over Testing the SD socket Before mounting the PCB into the case, there are a couple of quick tests to perform. With the monitor and USB keyboard connected, insert an SD card (ideally a branded one with a capacity between 8GB and 128GB). Power down, and after a couple of seconds, power back up. This time you should see the command prompt appear immediately (without requests for the keyboard layout or the date and time options). If it does ask for these items again then the chances are that the battery is either missing, incorrectly located, or flat. With a fresh battery correctly mounted, these options are retained whenever the G2 is powered down (ie, the main USB 5V power is removed). Now check in the very bottom-right corner of the display for the correct date and time. If not correct, then you can use the DATE and TIME commands to amend this (see the CMM2 User Manual for more details). Next, eject the SD card (by gently pushing it in to release the internal latching mechanism), and in the bottom-centre of the screen you should see a ‘Check Disk’ message appear. Re-insert the SD Card and make sure the message disappears. If ‘Check Disk’ remains on the screen no matter whether an SD card is inserted or not, then ensure that the solder joints on the SD socket’s three side pins are not shorting to the main body of the socket. If everything is working up to this point, we can move onto the final step. Mounting the PCB The case used for the G2 is the same compact one that has been used for all Colour Maximites. It comprises two main body parts, the base (which has four mounting Practical Electronics | November | 2021 pillars built in), and the lid. The G2 PCB is mounted in the base, and four 5mm spacers are added between the PCB and the pillars, as shown in Fig.5. These pillars raise the PCB and the connectors so that they will match the cut-outs in the front and rear panels. The pre-cut front and rear panels need to be positioned over the connectors before lowering the PCB down so that the panels slide into the grooves cut into the base (see Fig.6). This will then line up the four PCB holes with the four pillars and spacers. To save your sanity, it is worth using a small piece of Blu Tack under each spacer to avoid them falling off the pillars when lowering the PCB into place. Use four M3 screws to fasten the PCB securely into place but do not over-tighten them. Finally, slide the lid down into position by ensuring the panels line up with the lid’s grooves, and use the two longer case screws to hold the case together securely. This results in a professional-looking assembled unit. Parts list 1 (SMDs on part-assembled PCB) Resistors All 0805 unless otherwise indicated 2x 2.2Ω R42, R69 1x 10Ω R44 (1206) 2x 75Ω R11, R22, R33 21x 120Ω R1, R7-10, R12, R18-21, R23, R29-32, R35, R43, R50, R56, R58, R62 27x 240Ω R2-6, R13-17, R24-28, R34, R45, R53-55, R57, R59-61, R63-65 3x 1kΩ R36, R37, R68 (1206) 5x 4.7kΩ R49, R72, R73, R80, R81 13x 10kΩ R38-41, R46-48, R51, R52, R66, R67, R70, R71 (1206) Capacitors All 0805 unless otherwise indicated 2x 6pF C12, C13 2x 12pF C42, C43 32x 100nF C2-4, C10, C14, C15, C17-20, C22-39, C44-47 (1206) 2x 1µF C6, C16 (1206) 2x 2.2µF C7,C9 (1206) 1x 4.7µF C40 (1206) 4x 10µF C1, C5, C8, C41 (CASE-A_3216) 2x 100µF C11, C21 (CASE-D_7343) Welcome Tape Now that you have finished assembling your G2, you are probably keen to see what it can do. To get you started, we recommend the Colour Maximite 2 Welcome Tape. This was curated by Thomas Williams, and it comprises a collection of programs written by the user community. These include games, demonstrations and utilities. It has an easy-to-use menu, and you can always press CTRL-C to break out of a program and then LIST its code to see how it works. Download the Welcome Tape here: https://bit.ly/pe-nov21-maxwel Semiconductors and crystals All one-off STM32H743IIT6 IC3 (LQFP-176) processor CH340G IC8 (SOIC-16) USB driver MT48LC16M16A2 IC4 TSOP54 SDRAM DS3231MZ IC7 (SOIC-8) RTC AMS1117 REG1 (SOT-223) 3.3V LDO 32.768kHz X1 (SMD-3215_2P) crystal 8MHz X3 (SMD-7050) crystal oscillator 16MHz X2 (SMD-CRY-3225_4P) LED LED2 (0805) Keeping up to date Parts list 2 (kit) It’s well worth regularly visiting Geoff Graham’s website (https://geoffg.net/ maximite.html) for links to review websites, and other sites of interest for both the CMM2 and CMM2 G2. Also keep an eye on whether you have the latest version of the MMBASIC firmware from this same link. If you wish to upgrade the firmware, then simply download the relevant .bin file, connect your G2 to your computer (via a single USB lead), and move the G2’s BOOT jumper link to the PRG position. Press the small reset button and use the STM32CubeProgrammer software as outlined above to download the .bin file into the STM32. Once installed, move the BOOT jumper link back to RUN. Then, on power-up, check that the new firmware version number is displayed in the start-up screen. Finally, there is a great community on The BackShed Forum that discuss all topics related to Maximites and Micromites. if you have any questions, then this is a good place to seek answers. The link to this friendly forum is: https://bit. ly/pe-nov21-bshd Practical Electronics | November | 2021 Switch Tactile Switch S2 (SMD-SW-4_5.1x5.1x2.5) Reset Switch All one-off unless otherwise indicated Part-assembled PCB IR remote receiver, Vishay TSOP4838/40 (IRD1) 3mm dual LED assembly, Dialight 553-0112F (LED1) SD card socket, Hirose DM1AA-SF-PEJ(72) (CON6) 3.5mm stereo socket, Switchcraft 35RASMT4BHNTRX (CON4) Right-angle vertical PCB-mount SPDT toggle switch (eg, RS 734-7107) (S1) Coin cell holder, HARWIN S8411-45R 15-pin VGA socket (CON5) 40-way, 2 row, right-angle PCB header, 2.54mm pitch. Hirose HIF3F-40PA-2.54DS(71) (CON3) USB V2.0 type-B connector Amphenol FCI 61729-0010BLF, power (CON2) Dual USB type-A PCB socket, Amphenol ICC 72309-8034BLF CR1220 3V lithium battery Multicomp Pro G738 case 140x110x35 Front panel Rear panel 2x 3-way header 0.1-inch pitch (JP1, JP2) 2x Jumper link (0.1-inch slide on) 4x 5mm nylon spacers 4x 8mm M3 bolt Next month, we will add the optional USB mouse controller chip if you want to use a USB-protocol mouse with the G2. Until then, have fun! Questions? Please email Phil at: contactus<at>micromite.org 47