This is only a preview of the January 2022 issue of Silicon Chip. You can view 0 of the 112 pages in the full issue. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. You can also log in if you are already a subscriber. Articles in this series:
Items relevant to "Two Classic LED Metronomes":
Articles in this series:
Items relevant to "Multi-Channel Speaker Protector":
Items relevant to "Conway's Game of Life on the Micromite":
Items relevant to "Alternative PCB joiner for Linear MIDI Keyboard":
Items relevant to "Compact reed relay module":
Items relevant to "The Raspberry Pi-based PicoMite":
Articles in this series:
Items relevant to "Remote Control Range Extender":
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.
Conway’s Game of Life on the Micromite
In 1970, mathematician John Horton Conway devised The Game of Life.
It illustrates how complex patterns
can be created by very simple rules.
This has many parallels in the natural world. The Game is based on an
infinite 2D grid of square cells. Thus,
each cell has eight neighbours.
Four simple rules are then applied:
1. If a live cell has one or no neighbours, it dies through loneliness
or under-population.
2. If a live cell has two or three
neighbours, it lives on to the next
generation.
3. If a live cell has four or more
neighbours, it dies through
over-population or overcrowding.
4. If a dead cell has exactly three
neighbours, it is born by reproduction.
An initial pattern of live cells is
entered into the grid, and the Game is
started. The Game then steps through
siliconchip.com.au
each generation. Some patterns die
out quickly, some become stable, and
others multiply indefinitely. For more
information, see https://w.wiki/3TKJ
I have developed two versions of
the Game of Life. The first runs on the
Micromite LCD BackPack with the
2.8in ILI9341-based touchscreen and
does not require any additional hardware. In addition to several pre-defined
starting patterns, the user can create
their own.
The second is designed as a standalone PCB (using the circuit shown
here) with a small 0.96in IPS display, and it can be used as an interactive display with the addition of
two pushbuttons or an infrared (IR)
remote control.
Alternatively, it can operate in fully
automatic mode, taking about 55 minutes to complete an entire cycle of all
the preset starting patterns. This can
be incorporated as wearable jewellery
Australia's electronics magazine
such as a brooch, or in other novelty
applications.
The software driver for the IPS display was written by Peter Mather and
edited by Peter Carnegie – see www.
thebackshed.com/forum/ViewTopic.
php?TID=7137
While the original Game was
designed for an infinite 2D grid of
cells, in the Micromite version, the
grid is limited to 32 x 24 cells for the
BackPack version or 32 x 20 cells for
the smaller IPS display. There is the
option for cells to drop off the edge
of the display, or wrap around from
one side to the other. The best choice
depends on how the initial pattern
develops.
For the circuit of the BackPack-based
version, see one of the BackPack
articles. The standalone version
shown here uses the same PIC32MX170F256B-50I/SP microcontroller programmed with the Micromite software,
plus a simple power supply and the
0.96in ST7735S-based 80 x 160 pixel
January 2022 61
The circuit built on a home-etched PCB at upper left, with two close-up shots
of the display in action. The software and PCB gerber files can be downloaded
from siliconchip.com.au/Shop/6/6085
IPS display. The display is controlled
using the SPI protocol via eight connections:
• GND and Vcc supply 3.3V.
• SCL (SCK in SPI mode) and SDA
(SDI in SPI mode) are the two SPI
protocol pins that connect to pin
25 (SPI Clock) and pin 3 (SPI out)
on the PIC chip, respectively.
• RES, DC and CS are control signals connected to pins 23, 22 and
21 on the PIC.
• BLK is the backlight control pin.
It is not used in this application.
The power supply is a simple 3.3V
linear regulator. An infrared (IR)
receiver or two push buttons (or both)
can optionally be connected to control
the display.
The IR receiver connects to pin 16
on the micro. If installed, you can
access the menu of preset demonstration patterns. The optional pushbuttons connect to pins 9 and 10. They
provide forward and backward scrolling through the menu of preset demonstration patterns.
Alternatively, pin 9 or 10 (or both)
can be permanently connected to
ground by fitting a wire link in place
of the switch. In this case, the display
runs in automatic mode, scrolling
through each of the pre-defined starting
patterns in turn as soon as the power
is applied. Pins 9 and 10 have weak
internal pull-up currents and thus do
62
Silicon Chip
not require external pull-up resistors.
In operation
Both versions start automatically
when power is applied. With the
BackPack version, you can select the
various pre-defined starting patterns
by using the up and down arrows on
the touchscreen. Touching the screen
whilst the Game is running returns to
the menu.
There is also the option of defining
your own starting pattern by touching
individual cells on the screen. Each
touch toggles a cell on or off. In this
case, a small red square at the bottom
right-hand corner acts as an Enter and
Start key. As mentioned above, the
standalone version uses the IR receiver
or pushbuttons to move through the
starting patterns menu.
Pressing the ‘next’ and ‘previous’
remote control buttons scroll through
the menu of preset demonstration
patterns. Pressing any other button
on the remote selects the menu item.
Pressing the ‘next’ or ‘previous’ button whilst the Game is running returns
to the menu.
You can set up your remote control
codes without amending the program
by pressing any key on your remote
control while the initial screen is displayed. You will then be asked to press
the key you want to assign to ‘next’
and then the one you want to assign
to ‘previous’.
These are then stored in non-volatile
memory so that they will be preserved
when the power is removed.
Alternatively, set the constants IR_
device, IR_next and IR_previous in the
Micromite program to match the codes
produced by your remote control.
With the pushbutton version, holding the pushbutton scrolls through the
menu items and releasing the pushbutton selects the menu item. Pressing
a button while the Game is running
returns to the menu.
Kenneth Horton,
Woolston, UK. ($150)
Circuit Ideas Wanted
Got an interesting original circuit that you have cleverly devised? We will pay
good money to feature it in Circuit Notebook. We can pay you by electronic
funds transfer, cheque or direct to your PayPal account. Or you can use the
funds to purchase anything from the SILICON CHIP Online Store, including PCBs
and components, back issues, subscriptions or whatever. Email your circuit
and descriptive text to editor<at>siliconchip.com.au
Australia's electronics magazine
siliconchip.com.au
|