Silicon ChipNoughts & Crosses game using just two modules - January 2023 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Using DRC correctly avoids errors
  4. Feature: Computer Memory, Part 1 by Dr David Maddison
  5. Review: 2W RF Amplifier & Wattmeter by Allan Linton-Smith
  6. Project: Q Meter by Charles Kosina
  7. Feature: How to build a Mini-ITX PC by Nicholas Vinen
  8. Project: Raspberry Pi Pico W BackPack by Tim Blythman
  9. Project: Active Subwoofer, Part 1 by Phil Prosser
  10. Subscriptions
  11. Feature: Magnetic Amplification by Fred Lever
  12. Circuit Notebook: Noughts & Crosses game using just two modules by Keith Anderson
  13. Project: Noughts & Crosses Machine, Pt1 by Dr Hugo Holden
  14. Vintage Radio: UDISCO L6 circa 1927 by Dennis Jackson
  15. Product Showcase
  16. Serviceman's Log: Sometimes it all just falls into place by Dave Thompson
  17. PartShop
  18. Market Centre
  19. Advertising Index
  20. Notes & Errata: LC Meter Mk3, November 2022
  21. Outer Back Cover

This is only a preview of the January 2023 issue of Silicon Chip.

You can view 39 of the 112 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.

Articles in this series:
  • Computer Memory, Part 1 (January 2023)
  • Computer Memory, Part 1 (January 2023)
  • Computer Memory, Part 2 (February 2023)
  • Computer Memory Addendum (February 2023)
  • Computer Memory, Part 2 (February 2023)
  • Computer Memory Addendum (February 2023)
Items relevant to "Q Meter":
  • Q Meter main PCB (CSE220806B or CSE220701] (AUD $5.00)
  • Q Meter front panel PCB (CSE220807A or CSE220704] (AUD $5.00)
  • 0.96in cyan OLED with SSD1306 controller (Component, AUD $10.00)
  • Q Meter short-form kit (Component, AUD $80.00)
  • Firmware for the Q Meter (Q Meter Rev3.HEX) (Software, Free)
  • Q Meter PCB patterns (PDF download) [CSE220806B] (Free)
  • Q Meter front/lid panel artwork (Free)
Items relevant to "Raspberry Pi Pico W BackPack":
  • Pico BackPack stereo jack socket adaptor PCB [07101222] and connectors (Component, AUD $2.50)
  • Raspberry Pi Pico BackPack PCB [07101221] (AUD $5.00)
  • DS3231MZ real-time clock IC (SOIC-8) (Component, AUD $8.00)
  • DS3231 real-time clock IC (SOIC-16) (Component, AUD $7.50)
  • 3.5-inch TFT Touchscreen LCD module with SD card socket (Component, AUD $35.00)
  • Raspberry Pi Pico W BackPack kit (Component, AUD $85.00)
  • Matte/Gloss Black UB3 Lid for Advanced GPS Computer (BackPack V3) or Pico BackPack (PCB, AUD $5.00)
  • Matte/Gloss Black UB3 Lid for Micromite LCD BackPack V3 or Pico BackPack using 3.5in screen (PCB, AUD $5.00)
  • Raspberry Pi Pico W BackPack software (Free)
  • Raspberry Pi Pico BackPack PCB pattern (PDF download) [07101221] (Free)
Items relevant to "Active Subwoofer, Part 1":
  • Active Monitor Speakers power supply PCB [01112221] (AUD $10.00)
  • Active Monitor Speakers cutting and assembly diagrams (Panel Artwork, Free)
  • High-Performance Subwoofer cabinet cutting diagrams (PDF download) (Panel Artwork, Free)
Articles in this series:
  • Active Monitor Speakers, Part 1 (November 2022)
  • Active Monitor Speakers, Part 1 (November 2022)
  • Active Monitor Speakers, Part 2 (December 2022)
  • Active Monitor Speakers, Part 2 (December 2022)
  • Active Subwoofer, Part 1 (January 2023)
  • Active Subwoofer, Part 1 (January 2023)
  • Active Subwoofer, Part 2 (February 2023)
  • Active Subwoofer, Part 2 (February 2023)
Items relevant to "Noughts & Crosses game using just two modules":
  • Firmware for the Noughts & Crosses game using just two modules (Software, Free)
Items relevant to "Noughts & Crosses Machine, Pt1":
  • Static Noughts & Crosses Computer game board PCB [08111221] (AUD $12.50)
  • Static Noughts & Crosses Computer compute board PCB [08111222] (AUD $12.50)
  • W27C020-70 EEPROM programmed for the Static Noughts & Crosses Computer [0811122A.bin] (Programmed Microcontroller, AUD $10.00)
  • EEPROM data for the Static Noughts & Crosses Computer (0811122A.bin) (Software, Free)
Articles in this series:
  • Noughts & Crosses Machine, Pt1 (January 2023)
  • Noughts & Crosses Machine, Pt1 (January 2023)
  • Noughts & Crosses, Part 2 (February 2023)
  • Noughts & Crosses, Part 2 (February 2023)

Purchase a printed copy of this issue for $11.50.

CIRCUIT NOTEBOOK Interesting circuit ideas which we have checked but not built and tested. Contributions will be paid for at standard rates. All submissions should include full name, address & phone number. Noughts & Crosses game using just two modules In the October 2021 issue of Silicon Chip, the Australian entrepreneur Dick Smith announced a competition to develop a Noughts and Crosses machine. Dick Smith mentions that he built a machine using electromechanical components in his announcement. I’d love to be able to build something like that, possibly using modern relays. But I’d need an enormously large number of them and they cost a few dollars each. I decided that something using an Arduino or Raspberry Pi would be the obvious way to do the job in 2021. More or less randomly, I decided to follow the Arduino path. An Arduino Uno and an Adafruit TFT LCD are an obvious combination; mine is a ‘plain jane’ implementation. Each of the cells of the Noughts and Crosses grid becomes a button to be pressed to indicate the move the human wants to make. My design includes an extra rectangular button at upper left to toggle who plays X to start each game. The Adafruit TFT LCD is available in two versions: V1 and V2. Adafruit supply and support only V2, but most clones are V1. If a clone is used, it is important not to use the Adafruit support library but a different library: MCUFRIEND_kbv. The Arduino Library Manager knows of this library, 76 Silicon Chip and it is easy to install, but it is necessary to do quite a lot of careful reading of fine print to persuade it all to work. I have not debugged my program for V1 clones, only for V2 TFT LCDs. I implemented the Newell, Simon strategy as published. Although I eventually got it to work, the descriptions of it are not easy to follow. I studied at least three and became thoroughly bamboozled by all three of them. There are eight components of the Newell, Simon strategy and seven of them are simple, obvious, and easy to understand. One isn’t. The problem strategy is described as “Block Fork”, but it tries to do two or maybe three jobs at once, and all descriptions have “unless...” qualifications. Because I struggled to understand the Newell, Simon strategy, I tested my implementation often. I found mistakes often. I’m reasonably confident that the program submitted never allows a human to create a fork and consequently always forces a draw, unless it wins. An Excel file is available to confirm this. The Adafruit examples demonstrating the touchscreen don’t mention debouncing, but it is essential. Each touch sends a stream of X and Y coordinates of many touches, not just one. Simple delays don’t flush the redundant points out of the FIFO. I read Australia's electronics magazine several examples to discover how to combine an appropriate delay while flushing the buffer to avoid unexpected touch events. Although the Adafruit library includes several font sizes, they must be integers, and I found that size 1 is too small but size 2 is too big. Ideally, I’d like size √2, but it is unavailable. For most text, I’ve used size 1 even though that is a bit small. I’ve used size 2 for the game’s name at the top of the screen and size 3 for the Xs and Os played within the board cells. A box at the top left advises who is X and who is O. This box is touch sensitive. If it is touched at any time, including during a game, it will toggle who is X and O, and start a new game, aborting the game in play if necessary. If a game is won, it is traditional to draw a line through the winning row, column, or diagonal. I don’t do exactly that; instead, I change the colour of the text in the winning cells to white. Note that the computer doesn’t attempt to vary its moves. After a few games, it becomes a bit predictable. The software sketch (NaughtyCross. ino) is available for download from siliconchip.com.au/Shop/6/92, along with the Excel spreadsheet demonstrating that it will play a perfect game. Keith Anderson, Kingston, Tas ($70). siliconchip.com.au