This is only a preview of the August 2021 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:
Items relevant to "Second Generation Colour Maximite 2 – Part 1":
Items relevant to "Nano Pong using an 8-pin PIC":
Items relevant to "Multi-Purpose Battery Manager":
Articles in this series:
Items relevant to "Simple Linear MIDI Keyboard":
Purchase a printed copy of this issue for $10.00. |
Second-Generation
Colour Maximite 2
The Colour Maximite 2 computer, published about a year ago, has been a huge
hit, with thousands built. Now we present the second generation of the Colour
Maximite 2. This does not make the first generation obsolete; it is an evolution
with several improvements that will be appreciated by enthusiasts who are pushing
the boundaries.
Part 1: introduction
F
or readers who missed the introduction of the Colour Maximite
2 (July & August 2020; siliconchip.
com.au/Series/348), this computer is
inspired by the personal computers
of the early 1980s. Computers such as
the Apple II, Commodore 64 and the
Tandy TRS-80. But thanks to modern
technology, it’s way more powerful
and costs much less.
Like those computers, the Colour
Maximite 2 has a built-in BASIC interpreter and boots up instantly, straight
into the BASIC prompt. You can immediately enter a command or a program
and start doing something useful.
The emphasis of the Colour Maximite 2 is on ease of use and having fun.
Plug it in, and within seconds, you can
be entering a program to draw on the
screen, calculate astronomical movements or play music. It is ideal for
learning to program, educating children and just exploring what you can
do with this small and cheap computer
you program yourself.
While the concept of the Colour
Maximite 2 (CMM2) is borrowed from
the computers of the 80s, the technology used is very modern. The CPU
is an ARM Cortex-M7 32-bit RISC
26
Silicon Chip
Words and MMBasic by Geoff Graham
Design and firmware by Peter Mather
processor running at 480MHz, hundreds of times faster than the 8-bit
CPUs of the 80s.
This chip also includes integrated
memory, communication systems
and its own video controller, capable
of generating a VGA output at resolutions of up to 1920x1080 pixels with
some resolutions supporting 24-bit
‘true colour’.
New features
The second-generation CMM2 offers
three main improvements over the
original Colour Maximite 2. The first
is that the random access memory has
been boosted to 32MB compared to
the original 8MB, and it is also much
faster. The revised circuit is shown in
Figs.1 & 2.
This increased memory capacity
and speed have enabled several new
features, including a 1920x1080 pixel
VGA mode, 24-bit colour and more
RAM for BASIC programs to use for
arrays, I/O buffers, etc.
The second improvement is the
video DAC (digital-to-analog converter) which now uses eight bits for
each colour channel. That means that
this version can generate 24-bit colour,
Australia’s electronics magazine
supporting over 16 million different
colours. This is known as ‘true colour’
and is the same colour range used
by PCs. So photographs can now be
displayed without noticeable colour
banding (eg, in the sky).
The third feature is the use of a fourlayer PCB with all components placed
on the top side of the PCB. With the
first generation, we were able to get
away with mainly using through-hole
parts, but as we are now mounting
the CPU directly on the board (rather
than via a module), that is not a viable option.
As a result, most vendors will offer
this design partially or fully assembled rather than a simple kit of parts.
There are a few other minor new features in the Generation 2 design, which
we will cover later. These include two
Wii game controller connectors, the
ability to connect a mouse easily, an
optional high-accuracy real-time clock
and the ability to mount an ESP-01
WiFi module on the PCB.
Circuit description
The circuit consists mostly of connectors and ICs surrounding the main
processor, IC3, so we’ll just mention
siliconchip.com.au
some of the more noteworthy aspects
of the circuit. The full circuit is shown
in Figs.1 & 2.
The 24-bit colour VGA output is
generated using 24 digital outputs
from IC3 arranged in three groups:
one for red, one for green and one for
blue. Each group drives an R-2R ladder
DAC made from discrete resistors. The
effect of this is that the 7th output in
a group has half the effect on the output voltage as the 8th, the 6th half that
of the 7th and so on down the ladder.
Almost all components require a
3.3V supply. As the incoming power is
5V DC, the power supply is very simple, consisting mainly of linear regulator REG1 plus many bypassing and
filter capacitors.
IC4, the RAM chip, connects to IC3
via a 16-bit data bus and 13-bit address
bus, plus 10 control lines.
Assembly options
The new four-layer PCB with mainly
SMD components mounted onboard
makes scratch-building the CMM2
Gen2 a bit more challenging than the
earlier version.
If you’re keen to build it yourself, you can still do that, although
you might find sourcing the processor somewhat tricky given the severe
shortages affecting the semiconductor
industry at the time of publishing this
article. But it is an option for those who
are confident in their SMD assembly
skills (or keen for a challenge!).
Another option would be to use a
PCB fabrication company to populate and solder the surface-mounted
components for you, using their
pick-and-place machines and reflow
ovens. They can do this reasonably
cheaply in small quantities. But it will
probably be cheaper and easier for
you to buy one of the kits that come
with a mostly pre-populated PCB, as
described below.
If you want to solder your own
Colour Maximite 2 but are not confident that you can handle the SMDs,
especially the 144-pin main CPU,
consider building the first-generation
design. It primarily uses through-hole
parts and offers many of the same features as this revised version.
Upgrades to the original
In the following discussion, we will
describe the second-generation design,
including its new features. However,
many of its features also apply to the
siliconchip.com.au
Features & Specifications
480MHz ARM Cortex-M7 32-bit CPU with 2MB of flash and 1MB of RAM
Additional 32MB off-chip RAM, used for BASIC variable storage and video
pages
Colour VGA output with 15 software-selectable resolutions from 240x216
pixels to 1920x1080 pixels, in both standard 4:3 and widescreen 16:9 ratios
Four colour modes from 8-bit (256 colours) to 24-bit (16 million colours)
Full-featured BASIC interpreter with support for strings, double-precision
floating-point and 64-bit integers, long variable names, arrays with up to
five dimensions and ‘unlimited’ user-defined subroutines and functions
BASIC programs can be up to 516KB (typically 25,000 lines or more) and
run at 200,000+ lines per second
24MB storage memory for BASIC programs
Seven selectable fonts, user-designed fonts, line drawing, circles, squares
and full control over all pixels.
Can load image files formatted as BMP, GIF, JPG or PNG from the SD card,
positioned anywhere on the screen and scaled and rotated
USB keyboard support for US, UK, French, Spanish or German layouts and
wireless keyboards with a USB dongle
PS/2 mouse support for dual-mode USB mice with a PS/2 adaptor – an
optional chip provides support for standard USB mice.
SD card support up to 128GB for storing programs and files (FAT16, FAT32
or exFAT)
Built-in graphical file manager makes it easier to manage files and
directories, along with mouse support
Stereo audio output; can play WAV, FLAC and MP3 files, computergenerated music (MOD format), robot speech, synthesised sound effects
and sinewave tones
Battery-backed real-time clock (RTC) will keep the time even when
powered down
28 I/O lines which can be configured as analog inputs, digital inputs/
outputs, for frequency measurement etc; pin layout is compatible with
Raspberry Pi HATs
Support for communications protocols including serial, I2C, SPI and 1-wire
USB socket for connecting to a personal computer (Windows, Mac or
Linux) as a terminal or for file transfer
Special features for animated games including multiple video layers with
selectable levels of transparency, multiple video pages with high-speed
copying between pages, BLIT (copy a block of video), SPRITE (animated
sprites) and support for Wii game controllers
Built-in full-screen editor with colour coded text, up to 255 character line
lengths, clipboard for copy and paste, advanced search and replace and
mouse support
Powered from USB 5V, drawing less than 300mA
Firmware upgrades via USB with no special hardware required
Compatibility mode for running programs written for the original Colour
Maximite
Australia’s electronics magazine
August 2021 27
REG1 AMS1117-3.3
4
4
2 D–
6
5
3 D+
C ON2
7
8
Vcc
V3
RTS
DTR
R232
DCD
IC8
CH340G
UD–
UD+
RI
DSR
RXD
XI
TXD
XO
GND
CTS
12pF
14
10 W
13
10
3
2
+3.3V
9
X3 1
100nF
19
38
37
39
15
21
20
23
24
25
26
4
VDD
ST
8MHz
OUT
XO
3
MODE
JP7
GND
3
40
100nF
1mF
10mF
11
+ 3 .3 V
16
17
18
12pF
12
1
6x
100nF
X1 32768Hz
9 43 49
VDDQ
1
14 27
VDD
53
DQ15
51
DQ14
50
DQ13
48
DQ12
NC
47
DQ11
45
WE
DQ10
44
DQ9
CAS
42
RAS
DQ8
13
DQ7
CS
11
DQ6
10
DQ5
8
DQ4
CKE
IC4
7
CLK
MT48LC16M16A2 DQ3 5
DQ2
4
DQ1
DQMH
2
DQ0
DQML
36
A12
35
A11
22
BA1
A10
34
BA0
A9
33
A8
32
A7
A0
31
A6
A1
30
A5
A2
29
A3
A4
VSSQ
VSS
6 12 46 52
28 41 54
2
TO NUNCHUK 1
(SEE FIG.2)
TO A3 ON CON1 (SEE FIG.2)
TO A2 ON CON1 (SEE FIG.2)
AUDIO
C ON4
SC
Ó2021
28
4.7kW
4.7kW
2.2mF
COLOUR MAXIMITE 2 GEN2
Silicon Chip
2.2mF
45
10
79
118
117
39
38
157
156
111
120
121
164
152
26
27
29
30
172
159
149
136
103
127
82
91
62
49
72
PE2
PB12
PD3
PD2
PC12
PH4
PB10
PC9
PC8
VDDA
VREF+
PG14
PG13
PG7
PA9
PA10
PB6
PG9
MAIN CIRCUIT
Australia’s electronics magazine
13
1
92
145
144
141
139
140
89
110
57
32
PC10
PC11
PH12
PG6
PB1
PC0
87
PH10
86
PH9
85
PH8
44
PH3
43
PH2
176
PI7
175
PI6
174
PI5
173
PI4
154
PG11
150
PD6
155
PG12
3
PE4
11 VERT SYNC
PI9
12 HORIZ SYNC
PI10
PC15/OSC32_OUT
PF8
PF9
PH0/OSC_IN
PH1/OSC_OUT
151
PD7
45
PA2
80
PB11
98
PD10
97
PD9
96
PD8
78
PE15
77
PE14
76
PE13
75
PE12
74
PE11
73
PE10
70
PE9
69
PE8
68
PE7
143
PD1
142
PD0
105
PD15
104
PD14
106
PG2
67
PG1
66
PG0
65
PF15
64
PF14
63
PF13
60
PF12
21
PF5
20
PF4
19
PF3
18
PF2
17
PF1
16
P F0
108
PG4
109
PG5
169
PE0
170
PE1
112
PG8
84
PH7
58
PB2
101
PD13
100
PD12
99
PD11
83
PH6
59
PF11
160
PG15
46
PH5
123
PA12
122
PA11
50
PA4
51
PA5
125
VCAP
81
VCAP
VSSA
80
31
171
+3.3V
2
4
6 COM2:Tx
8
1
16
15
USB TYPE B
PWR/CONSOLE
2x
10k W
+ 3 .3 V
PI11
PD4
PA14
PA13
PC14/OSC32_IN
166
107
IC3
STM32H743IIG
1
3
5
7
5
6
100nF
PA14
PA13
GND
RST
C ON8
SDA
COM2:Rx
133
132
131
130
153
128
5
4
165 I2C #2 SDA
168 I2C #1 SDA
2
167 I C #1 SCL
33 COUNT1
129 COM2:Rx
34
COUNT2
35
COUNT3
163
SPI1 MOSI
PB5
162
SPI1 MISO
PB4
161
SPI1 CLK
PB3
PWM1C
56
PB0
116
PWM2B
PC7
GPIO
134
PI3
SPI2 MISO
94
PB14
41
COM1:DE
PA1
SPI2 CLK
93
PB13
95
SPI2 MOSI
PB15
115
PWM2A
PC6
7
GPIO
PI8
2
88
I C #2 SCL
PH11
55
GPIO
PC5
54
COUNT4
PC4
53
PWM1B
PA7
138 FAST COUNT
PA15
COM2:Tx
40
PA0
PWM1A
52
PA6
COM1:Rx
47
PA3
COM1:Tx
42
PA2
119
PA8
2
PE3
PI2
PI1
PI0
PH15
PG10
PH13
PE6
PE5
PB7
PB9
PB8
PC1
PH14
PC2_C
PC3_C
VSS
158
SDA
7
148
RESET
PA13
5
SCL
SCL
135
4
SQW/INT
126
3
GND
4
100nF
RST
BOOT0
PG3
PB11
RST
PDR_ON
113
PA14
CR1220
BATTERY
6 VBAT
VDD
VBAT
PC13
PF6
PF7
PF10
PD5
102
3
2
Vcc
VBAT
IC7
DS3231MZ
8
32kHz
8
24
25
28
147
146
137
124
9
71
1
3.3V
1
6
90
100nF
ST-LINK
2
61
+3.3V
POWER
4.7mF
14x
100nF
48
1m F
22
100mF
GND
23
10mF
S1
36
PWR
+3.3V
+ 3 .3 V
OUT
IN
14
+5V
15
JP1
37
TO CON3
PINS 37 & 39
JP3
JP4
TO B3 ON CON1 (SEE FIG.2)
TO B2 ON CON1 (SEE FIG.2)
siliconchip.com.au
BOOT0
+ 3 .3 V
+ 3 .3 V
2.2W
ESP_3.3V
100nF
10kW
10kW
100mF
1k W
RESET
S2
100nF
RST
10k W
A
l
JP2
1kW
4.7kW
3
2
A
POWER
SD CARD
K
l
K
1
IC2
100nF
Vcc
DS18B20
DQ
DIGITAL
THERMOMETER
1
TSOP4838
IR SENSOR
3
l
GND
PROG/RUN
IRD1
2
2. 2 W
LED1
10 m F
100nF
CON6
SD CARD SKT
CARD PRESENT
CD
240W
240W
120 W
240W
240W
240 W
240W
240 W
DATA TO CARD
240W
CLOCK TO CARD
DATA FROM CARD
120 W
120 W
120 W
120W
120 W
120 W
CARD WRITE PROTECT
240W
240W
VERT SYNC
240W
120 W
HORIZ SYNC
9
1
2
3
4
5
6
7
8
CARD ENABLE
240W
240W
240 W
240 W
CON5
VGA CONNECTOR
75 W
240W
240W
WP
VIDEO – RED
6
11
7
12
8
13
9
14
10
15
1
VIDEO – GREEN 2
120 W
120 W
120 W
120W
120 W
75W
120 W
240W
VIDEO – BLUE 3
75W
CON9
4
5
(HEADER FOR CONNECTING
ESP-01 WIFI MODULE)
240 W
240W
120 W
240 W
120 W
240W
240 W
240W
240W
240 W
IC3 PI10
120W
120 W
120W
120W
240W
2
I C #2 SDA
IC3 PI9
2
I C #2 SDA
2
I C #1 SDA
2
I C #1 SCL
120 W
10kW
VERT SYNC
HORIZ SYNC
TO NUNCHUK 2
(SEE FIG.2)
+3.3V
10k W
COUNT1
COM2:Rx
COUNT2
COUNT3
SPI1 MOSI
SPI1 MISO
SPI1 CLK
10kW
PWM1C
PWM2B
GPIO
SPI2 MISO
+3.3V
COM1:DE
2
28
30
32
34
36
38
40
PWM2A
GPIO
2
4
6
8
10
12
14
16
18
20
22
24
26
SPI2 CLK
SPI2 MOSI
GPIO
COUNT4
PWM1B
FAST COUNT
1
3
5
7
9
11
13
15
17
19
21
23
25
27
29
31
33
35
37
39
I C #2 SCL
COM2:Tx
PWM1A
COM1:Rx
COM1:Tx
2
I C #2 SDA
2
I C #2 SCL
IC5_PIN18
IC5_PIN17
CON3
EXTERNAL
I/O
+5V
10kW
COUNT4
PWM1B
FAST COUNT
COM2:Tx
PWM1A
COM1:Rx
COM1:Tx
Fig.1: the Colour Maximite 2 is centred around
the ARM Cortex-M7 processor, IC3. This, along with 32MB (512Mb) RAM chip IC4, does most of the work. The rest of the
circuit is mainly concerned with supplying power to those chips and connecting the processor to the outside world. The
keyboard & mouse interface didn’t fit in this diagram, so it is shown separately in Fig.2.
siliconchip.com.au
Australia’s electronics magazine
August 2021 29
first generation version via firmware
upgrades, for example, mouse support and the 1280x720 pixel display
resolution.
So, if you have the original Colour
Maximite 2, you should upgrade the
firmware to the latest version to get
these features. The firmware download
is available from the Silicon Chip website or the Author’s website at http://
geoffg.net/maximite.html
Note that the same firmware file will
load and run on both the first- and
second-generation designs. The firmware automatically detects the hardware that it is running on and configures itself accordingly.
Basic operation summary
To use the Colour Maximite 2, all
you need to do is plug in a monitor,
keyboard and power supply. The computer generates a VGA output with
one of 15 different video modes, some
widescreen and some that work best
with older 4:3 aspect ratio monitors.
The highest resolution is 1920x1080
pixels; the 1280x720 resolution works
well with a widescreen monitor, and
the text is easy to read.
The CMM2 defaults to an 800x600
resolution which suits all monitors,
but this can be changed using the
OPTION DEFAULT MODE command.
The keyboard interface accommodates most USB keyboards, including
keyboards that use a wireless dongle.
Keyboards that have been tested and
work well include the Logitech K120,
K270, K400+ or K800 models, HP
SK2885, Lenovo KU-0225 and Microsoft 600.
We have discovered that some keyboards will not work correctly for an
unknown reason related to the USB
protocol stack. This is rare, but if you
run into keyboard problems, try one
of the above-listed types. The Logitech
K120 works well, is cheap (under $20)
and is readily available.
The power supply can be any USB
source of 5V. The typical power draw
of the computer with just a keyboard
and monitor is 250mA; however, when
you connect external circuitry to the
rear I/O connector, this can increase.
If you are using a USB charger as a
power supply you need to be careful,
as many of these struggle when they
are anywhere near their limit. So make
sure that it is rated for at least 500mA,
and preferably at least 1A. Also be
careful if you are using a laptop as the
30
Silicon Chip
The front view showing the infrared receiver (for remote control), two Wii
controller ports for the Wii Nunchuck or the Wii Classic game controllers, status
LEDs for power and SD card activity, the SD card slot, the audio output socket
and the power switch.
power source, as they often limit the
current delivered via their USB ports
to conserve their battery capacity.
With the first generation Colour
Maximite 2, we found that most problems encountered by our readers could
be traced to the power source, closely
followed by the quality of the USB
cable used for the power. These are
the first things you should investigate
if you have strange problems such
as failure to boot, errors with the SD
card, intermittent crashes, keyboard
problems etc.
You will need an SD card to hold
your programs. The Colour Maximite 2 supports cards up to 128GB formatted with FAT16, FAT32 or exFAT.
Generally, you do not need a very large
capacity, so an 8GB or 16GB card formatted with FAT32 will provide more
than enough space and will be quite
cheap (under $10).
With a power supply, keyboard
and monitor attached, flipping on the
power switch will result in the Colour
Maximite 2 booting up in under a
second, straight into the MMBasic
interpreter. It will display the BASIC
prompt (a greater than symbol, “>”),
and you are ready to enter your first
command or program.
MMBasic
BASIC is a programming language
that has been around for a long time.
Initially developed in the 1960s by
Dartmouth College (USA) for teaching
Australia’s electronics magazine
programming, it is easy to use and
learn. It became popular in the late 70s
and early 80s as the default language
for early personal computers.
MMBasic is the name given to the
BASIC interpreter running on the
Colour Maximite 2. It is an interpreter,
which means that the computer will
decode each line of the program as it
encounters it. This is different from
compiled languages such as C and
C++, where code is converted to native
machine instructions before execution.
Compilers use a series of programs
(a compiler, linker and loader) to
take your program and convert it into
machine code. This is then used to
create a program file that the computer can run.
This process results in a higher execution speed than an interpreter, but
creates certain restrictions in how programs can be written. It also means
you need to wait each time you make
a change for the code to compile before
you can launch it and see what effect
that change has had.
Many programs don’t need the absolute fastest execution speed, especially
with modern processors being quite
fast. So interpreted languages are popular with non-professional programmers (and even with professionals for
specific tasks).
MMBasic in the Colour Maximite 2
is the same as the BASIC interpreter
that runs on our popular Micromite
series of embedded controller chips.
siliconchip.com.au
Along the back panel, you can see the VGA output socket, the external I/O
socket for a ribbon cable, a Type-B USB connector for power and serial console
access and two stacked Type-A USB connectors. The top connector is for the
keyboard, while the lower connector is for a mouse.
MMBasic has over 500 built-in
commands and functions. It is also
designed to emulate Microsoft BASIC,
the premier programming language for
personal computers in the 80s. This
means that you can get Micromite programs or programs written for Microsoft BASIC working on the CMM2 with
minimal changes.
You can type in almost any command at the MMBasic prompt, and
the interpreter will execute it immediately. For example, if you type PRINT 2
+ 2 and press Enter, it displays “4” on
the screen as you would expect. This
immediate feedback is one of the benefits of running an interpreter, and it
allows you to easily test the commands
and functions in the BASIC programming language.
ARM Cortex-M7 processor
The hardware and firmware of the
Colour Maximite 2 are fully covered in
the Colour Maximite 2 User Manual,
so we will not go into all the details
here (there are a lot of details).
The computer is centred around the
ARM Cortex-M7 processor. This is the
large central IC that you can see in the
photographs. Along with the 32MB
(512Mb) RAM chip, this does most of
the work; the other components and
connectors supply power and connect
the processor to the outside world.
When we designed the original
Colour Maximite 2, the STMicroelectronics STM32H743IIT6 chip came in
siliconchip.com.au
two speed types – the older 400MHz
version and a later 480MHz version.
STMicro was transitioning from the
slower to the faster variant, but annoyingly, they used the same part number
for both versions.
This made it difficult for suppliers
and you, the end user, to know what
variant you were going to receive.
It seems that now the supply chain
has flushed out most of the 400MHz
chips, as over the past few months,
all the chips that we have seen are
the 480MHz version. So you can be
reasonably sure that the second generation Colour Maximite 2 will run at
this speed. But, that is not guaranteed.
Regardless, either speed is very fast,
and the firmware will automatically
support whatever chip is supplied. If
you are curious, you can determine
the variant you have by using the following command to report the speed:
PRINT MM.INFO(CPUSPEED)
Oscillator module
The ARM processor is clocked by
an external 8MHz oscillator module.
This signal is multiplied within the
processor to generate all the various
clocks required, including the instruction clock, USB clock, VGA timing etc.
In the original Colour Maximite 2,
we used the crystal on the Waveshare
CPU module and the oscillator built
into the ARM processor to generate
this clock. But it turned out that this
Australia’s electronics magazine
arrangement created a slight jitter in
the signal, which sometimes caused a
corresponding instability in the VGA
video output.
Generally, this was not a problem at
the standard 800x600 pixel resolution.
But as higher resolutions were enabled
via firmware upgrades, it became more
of a problem.
With the second generation design
capable of generating a 1920x1080
pixel video output, the requirement
for a more stable clock became critical.
This is why an external (to the ARM
processor) 8MHz oscillator module
has been specified. This oscillator is
very stable and supports the extended
resolutions that many users would
like to use.
If you have the original Colour Maximite 2 and would like to use the high
resolutions provided by the later firmware upgrades, we recommend that
you also upgrade the hardware to an
external oscillator. The first generation PCB was designed for this possibility, and the second article in this
series will have the details of how to
perform the upgrade.
Usually, video images are stored in
the RAM within the ARM Cortex-M7.
But for high-resolution images, we
needed more RAM than it has. This,
in part, is the reason for the external 32MB RAM chip. Using this, the
firmware can assemble much larger
images. This RAM is also used to
support 24-bit graphics modes and
provide more memory for BASIC programs.
The internal clock/calendar used by
MMBasic is derived from the real-time
clock built into the ARM Cortex-M7
processor. This is effective, but if you
want a much better level of accuracy,
you can add an optional DS3231MZ+
to the PCB, and it will typically only
lose or gain a second or two in a week.
The command to enable this optional
feature is:
OPTION DS3231
Whichever real-time clock is used, it
is powered by the coin battery on the
PCB. This is also used to keep alive
some static memory within the ARM
Cortex-M7 that stores option settings
and saved variables so that they are
not lost on power down. The current
drawn from this battery is tiny, so it
should last for many years.
The main board now has provision
for mounting an ESP-01 WiFi module.
August 2021 31
This module uses the ESP8266 chip,
a self-contained SOC (system on a
chip) that includes the TCP/IP protocol stack, 2.4GHz transmitter/receiver
and other features to allow the Colour
Maximite 2 to access a WiFi network.
Currently, MMBasic does not have
Internet features built in, but you can
access the ESP8266 using a standard
serial interface and the AT commands
built into the ESP8266. With special
firmware running on the ESP8266, you
can extend the BASIC console over
WiFi so that you can remotely connect
to the Colour Maximite 2 to upload,
edit and run programs.
Front panel arrangement
The two Wii Controller ports dominate the front panel. These will accept
either the Wii Nunchuck or the Wii
Classic game controllers; MMBasic
can work with either. Many games
written for the Colour Maximite 2 use
such a controller, so they are a useful
addition if you plan on playing some
games. MMBasic can support up to
three controllers, with the third via
the rear I/O connector.
Positioned between the two game
controller connectors are two LEDs.
The bottom green LED illuminates
when power is applied. The top red
LED initially illuminates to indicate
that the firmware has successfully
found and enumerated the USB keyboard. This is a handy indicator if you
are experiencing problems with your
keyboard.
Following this, the red LED is used
to indicate SD card activity. It will
illuminate while the SD card is being
accessed, and this is a warning: do not
remove the card while the LED is lit.
The SD card acts as the computer’s
“disk drive”, where programs and
data are stored. Next to it is the audio
socket. The tip is the left channel, the
ring is the right channel and the sleeve
is ground – the standard configuration. The output is a high-impedance
signal at about 1V RMS, suitable for
feeding to an amplifier or amplified
speakers.
Programs can generate audio in
many formats, ranging from simple
sinewave tones through to playing
WAV, FLAC, and MP3 files.
Next along the front panel is the
power switch, which has a special feature: it can be set to be on when the
toggle is down (for Australian and New
Zealand readers), or the opposite for
32
Silicon Chip
our North American cousins.
This is configured via the three
jumper pins beside the switch. When
the centre pin and the pin to the rear
are connected, down will be on. The
reverse is true if the centre pin and
the pin towards the front panel are
connected.
Rear panel features
Along the back panel (starting from
the left) is the VGA connector for your
monitor. As described previously, this
supports a wide range of resolutions
and colour depths.
We have been asked why the Colour
Maximite 2 does not support HDMI,
and the answer is that the ARM CortexM7 does not support this protocol. So
an expensive and complicated HDMI
controller chip would be required.
There are also difficulties associated
with HDMI licensing, so this feature
was just not practical.
VGA to HDMI converters are readily
available and inexpensive, so if you
want to connect the CMM2 to a monitor via HDMI, that is the best way to
do it. These converters cost a lot less
than it would cost us to implement
onboard HDMI.
Next on the back panel is the 40-pin
external I/O connector. This supports
28 inputs or outputs, with 12 of these
able to be configured as analog inputs.
Many of the I/O pins can also be used
as PWM outputs or to handle serial
communications, including asynchronous serial, I2C, SPI and more.
The pin allocations on this connector are inverted compared to the first
generation Colour Maximite 2. This is
because while the I/O signal allocation
on the first generation was compatible
with the Raspberry Pi, the pin numbering was inverted, which sometimes
caused problems.
So the Generation 2 version corrects this by exactly matching the
Raspberry Pi configuration, including
pin numbering. With the first generation, you had to cut a new key slot in
the shroud if you wanted to plug in a
device intended for the Raspberry Pi.
With the second generation design,
this is no longer necessary.
Continuing across the back panel,
the Type-B USB connector provides
both power and a serial console. We
covered the power requirements of
the Colour Maximite 2 earlier, but the
serial console feature needs a little
explanation.
Australia’s electronics magazine
The console is where you enter commands and programs into the computer. Typically, this is done using a
keyboard and VGA monitor, but the
serial console allows you to connect a
PC or laptop to the Colour Maximite 2’s
console via a serial interface over USB.
You can do everything that can be
done via the keyboard and monitor
(except graphics) via this interface.
You can enter and edit programs, set
options, run programs etc.
A CH340C USB-to-serial bridge is
used. This converts the serial I/O from
the ARM Cortex-M7 to USB using the
CDC (communication device class)
protocol over USB. Support for this
chip and the CDC protocol is included
in Windows 10 and other operating
systems.
The first generation Colour Maximite 2 used a different chip for the same
task, but the CH340C is cheaper and
more readily available, so we have
switched to that.
Mouse interface
The last connector on the back panel
consists of two stacked USB Type-A
sockets. These are for the keyboard
(top connector) and a mouse (lower
connector).
The second-generation design supports two types of mouse interfaces.
The first is a USB-only mouse, which
requires a Hobbytronics mouse controller chip (www.hobbytronics.co.uk/
usb-host-soic) to be installed as IC5,
along with its supporting components.
You can then plug the mouse into the
USB mouse socket (the lower socket).
This feature is optional, and the circuit for it is shown in Fig.2. Typically,
suppliers of the second generation
Colour Maximite 2 will not include
this chip as it is easier to use a dual
USB-PS/2 mouse, which is the second
type of mouse interface supported.
Most wired mice will automatically
switch between USB and PS/2 modes,
and many come with a USB to PS/2
adaptor. This adaptor simply signals
the mouse to switch to PS/2 mode via
a pull-up resistor inside the adaptor.
The adaptor also provides the physical PS/2 connector.
Even if your wired mouse did not
come with this adaptor, it is very likely
that it will work as a PS/2 mouse – so
it is worth giving it a try. A typical
example is the Microsoft Basic Optical Mouse, which is low in cost (under
$20), widely available and works well
siliconchip.com.au
Fig.2: the keyboard & mouse connector, along with the optional USB mouse interface chip, IC5. You generally won’t need
this chip as most wired USB mice will work in PS/2 mode, regardless of whether they came with a PS/2 adaptor.
as a PS/2 mouse with the Colour Maximite 2.
To use a dual USB-PS/2 mouse, IC5
must not be populated, and all four
solder jumpers marked PS/2-CLK and
PS/2-DAT on the PCB (JP3-JP6) must
be joined with solder blobs. You can
then plug the mouse into the USB
mouse socket (the lower socket). A
USB to PS/2 adaptor is not required,
as the Colour Maximite 2 will force the
mouse into PS/2 mode, even though it
is plugged into a USB socket.
MMBasic has built-in support for a
mouse via the MOUSE() function. The
program can query the mouse cursor’s
position and detect clicks or double
clicks of the mouse buttons using this.
Both the file manager and the editor built into MMBasic can also use
the mouse for most functions that
you might expect. For example, you
can use the mouse to point and select
a file or line; you can select text with
the mouse, scroll using the scroll
wheel, double click to open/run a file
and so on.
While the second-generation design
makes it easy to plug a dual-function
mouse into the USB socket (without
an adaptor), the first generation design
running the latest firmware also supports a PS/2 mouse via the rear I/O
connector. The only difference is that
you will need to solder some wires
from the mouse’s connector to the I/O
connector, as illustrated in Fig.3.
siliconchip.com.au
The mouse CLOCK (pin 5) line connects to pin 33 of the I/O connector,
and the DATA (pin 1) connects to pin
32. Both must have a 4.7kW pull-up
resistor to +5V. This can be assembled on a small piece of perforated
stripboard.
Where to get it
The Colour Maximite 2 is available
from several suppliers around the
world. Many of these will supply it
with all the SMDs already soldered, as
building it from scratch requires good
soldering skills.
Vendors selling kits for the second
generation Colour Maximite 2 include
Rictech Ltd in New Zealand (www.
rictech.nz) and Micromite.org in the
UK (https://micromite.org). Both will
send kits anywhere in the world.
They offer partially assembled kits
and, by that, we mean that the PCB is
populated with all the small surfacemount components already soldered
in place. The larger components (connectors, SD card socket, battery holder,
etc) are supplied loose for you to solder yourself. This only takes half an
hour or so.
These suppliers might also offer
fully assembled and tested versions,
pre-cut front/rear panels and a suitable case for the completed computer
– check the supplier’s website for the
details. You will also need USB cables
and a 5V supply, as these are generally
not included.
For brave readers, a construction
kit is available from the Author’s website (http://geoffg.net/maximite.html)
and this contains the parts list, PCB
Fig.3: If you have a first-generation Colour Maximite 2, you can add a PS/2 mouse
to it by wiring it to the rear I/O connector as shown here. For the mouse to be
recognised by MMBasic, you must upgrade the firmware to version 5.07 or later.
Australia’s electronics magazine
August 2021 33
Parts List – Colour Maximite Gen2
1 partially assembled PCB module – see below
1 USB 5V power supply or computer with powered USB socket
1 DS18B20+ temperature sensor (IC2; optional)
1 3-pin infrared receiver (IRD1; optional)
1 USB Type-A to Type-B cable (for power)
1 dual horizontal USB Type-A PCB socket (CON1; Amphenol FC1 723098034BLF) ∎
1 USB2 Type-B right-angle PCB socket (CON2; Amphenol FC1 61729-0010BLF) ∎
1 40-way DIL right-angle box header, 2.54mm pitch (CON3; Hirose HIF3F-40PA2.54DS(71)) ∎
1 3.5mm stereo jack socket (CON4; Switchcraft 35RASMT4BHNTRX) ∎
1 15-pin right-angle HD D-sub PCB socket (CON5)
[RS 481-443, element14 2401183/2857990, Digi-Key AE11036-ND,
Mouser 523-7HDE15SDH4RHNVGA]
1 SD card socket (CON6; Hirose DM1AA-SF-PEJ(21) or DM1AA-SF-PEJ(82)) ∎
1 3-pin header (CON7; optional – for serial comms)
1 6-pin header (CON8; optional – for ST-LINK programmer)
1 4x2-pin header (CON9; optional – for connecting an ESP-01 WiFi module)
1 right-angle vertical PCB-mount SPDT toggle switch (S1)
[Altronics S1320, RS 734-7107, element14 9473297, Digi-Key EG2364-ND,
Mouser 34ASP27T7M2QT]
1 button cell holder for CR1220 (BAT1; Harwin S8411-45R) ∎
1 CR1220 lithium button cell (BAT1)
1 3mm dual green/red LED assembly (LEDs1a & 1b; Dialight 553-0112F) ∎
1 3-pin header with jumper shunt (JP2)
1 short length of 0.7mm diameter tinned copper wire, or a component lead offcut (PWR)
1 plastic instrument case, 140 x 110 x 35mm
[Jaycar HB5970, Altronics H0472, element14 1526699]
4 5mm untapped spacers
∎ available from [RS, element14, Digi-Key and Mouser]
Partially assembled PCB module parts
1 four-layer PCB with plated through holes coded 07108211, 128mm x 107mm
1 32768Hz 12.5pF SMD crystal, 3.2 x 1.5mm two-pin package (X1)
[eg, Seiko Epson Q13FC1350000400]
1 8MHz 3.3V SMD crystal oscillator module, 7 x 4mm four-pin package (X3)
[eg, Seiko Epson X1G004481001400]
1 5.1 x 5.1mm SMD four-pin tactile switch (S2)
[eg, XKB Connectivity TS-1187A-C-C-B]
Semiconductors
1 STM32H743IIT6 32-bit microcontroller, LQFP-176 (IC3)
1 Micron MT48LC16M16A2P-6A IT:G 256Mb (32MB) SDRAM, TSOP(II)-54 (IC4)
1 DS3231MZ real-time clock, SOIC-8 (IC7; optional)
1 CH340C USB/serial converter, SOIC-16 (IC8)
1 AMS1117-3.3 3.3V low-dropout linear regulator, SOT-223 (REG1)
Capacitors (all SMD 50V X7R ceramic, M3216/1206 size unless otherwise stated)
2 100μF 6.3V SMD tantalum, SMB, SMC or SMD case
4 10μF 16V SMD tantalum, SMA case
1 4.7μF
2 2.2μF
2 1μF
32 100nF
2 6pF C0G/NP0 ceramic, M2012/0805 size
3 1kW
1 10W
Resistors (all SMD 1/8W 1% thick film, M2012/0805 size)
5 4.7kW
27 240W
21 120W
3 75W
2 2.2W
Optional parts for USB Mouse
1 Hobbytronics USBHOST-SOIC, SOIC-28 (IC5) – www.hobbytronics.co.uk
1 16MHz 10ppm 9pF SMD crystal, 3.2 x 2.5mm four-pin package (X2)
[eg, Yangxing Tech X322516MLB4SI]
1 SMD LED, M2012/0805 size (LED2)
2 18pF 50V C0G/NP0 ceramic capacitors, M2012/0805 size
34
Silicon Chip
Difficulty obtaining parts
When you are purchasing a Colour
Maximite 2, be aware that large scale
semiconductors such as the ARM
Cortex-M7 are in short supply worldwide. It has got so bad that some car
manufacturers such as Ford have
had to shut down plants and lay off
workers because they cannot get the
semiconductors needed to finish the
vehicles.
We have seen this effect with both
the ARM Cortex-M7 and the 32MB
RAM chip used in the Generation 2
design. So you might experience longer delivery times for your Colour
Maximite 2 kit than you would typically expect. This is caused by events
outside the control of the supplier, and
patience is the only answer.
Next month
Resistors (all SMD 1/4W 1% thick film, M3216/1206 size)
13 10kW
fabrication files, schematic, and the
pick-and-place assembly files.
You can also get the PCB for the
revised Colour Maximite 2 from the
Silicon Chip Online Shop, but you
will have to gather all the other bits
yourself. Note that we still sell a kit
for the original CMM2, which includes
almost everything you need; it just
lacks the case.
The design and firmware for the
Colour Maximite 2 are in the public domain (free to anyone), and two
other vendors have created their own
versions of the Generation 2 design.
These are compatible with the standard firmware and offer additional
features such as a sea-of-holes PCB
prototyping area, more Wii Controller ports, etc.
These vendors are CircuitGizmos in
the USA (https://circuitgizmos.com)
and PS Labs in Poland (http://maximite.
pslabs.pl). Both of these will ship
worldwide, and you should check
their websites for the various features
of their versions, including the supplied cases.
Australia’s electronics magazine
In the follow-up article next month,
we’ll have PCB layout details, for if
you’re planning on building it yourself, debugging/testing, or you just
want to see what connection is where.
The final construction details will follow that, plus information on loading
the firmware into the STM32 chip, a
short guide on writing BASIC programs on the CMM2 and some links
to external resources that you will
find helpful.
SC
siliconchip.com.au
|