This is only a preview of the September 2020 issue of Practical Electronics. You can view 0 of the 72 pages in the full issue. Articles in this series:
|
By Geoff
Graham
The Micromite
Explore-28
http://geoffg.net
The 28-pin Micromite has been used in many of our projects, and with good
reason. It is a low-cost, powerful microcontroller which allows you to create
advanced devices with minimal effort. Now the Explore-28 will make your
life even easier. It’s a small plug-in module with the same powerful PIC plus
a USB socket for comms and programming, giving you everything you need
to get started with the Micromite in one handy package.
T
he Micromite is a high
• A PIC32 programmer, so that you can Graeme Rixon and Robert Rozee. It
update the BASIC interpreter when- can be purchased as a kit of parts or as
performance 32-bit microcontrolever a new version is released.
a completely assembled module from
ler which can be programmed in a
• A power supply with a 4-16V input micromite.org or Graeme’s website – see
friendly BASIC programming language.
range and the ability to supply up to the last page of this article for details.
It has a lot of built-in capabilities,
150mA at 3.3V (plus 5V, when powGraeme Rixon also offers a full conincluding a variety of communications
ered from USB) for external circuitry. struction pack, which you can downprotocols (I2C, SPI, serial...), the ability to easily interface to many devices This means that if you purchase a pre- load from his website. This includes the
(LCD screens, GPS modules, tempera- assembled Explore-28 module, you can PCB Gerber files, parts list and firmware.
So, you can get your own PCBs made
ture sensors...). And it’s really easy to immediately start experimenting with
it. You do not need to source the mi- and build your Explore-28 modules
learn how to use it.
To start with the Micromite, you just crocontroller, program the firmware or from scratch if you wish.
need a programmed chip, which you setup a breadboard. It is a fully assemConnections
bled and ready-to-go package.
can then plug into a breadboard.
It is interesting to compare the Ex- The Explore-28 has the same ‘form facThis is not hard to do, but there is a
bit of fiddling about to be done before plore-28 to the Commodore 64 from tor’ as the Arduino Nano, which means
you can start programming the chip. 1982, which also came with a built-in that breakout boards designed for the
Many readers would prefer a pre-as- BASIC interpreter and was the most Nano will suit the Explore-28. But the
sembled module that can be immedi- popular computer in the 1980s. Many two are quite different in a programmillions were sold worldwide, for ming sense; the Micromite is vastly
ately put to use.
more powerful and is programmed in
That is the essence of the Explore-28. around US $600 each.
The Explore-28 is fifty times faster, BASIC, not C/C++.
You can plug it into a USB port on your
The pin-out of the Explore-28 is
laptop and in a few minutes, have a sim- with much more memory and costs
about US $20. While they clearly have shown in Fig.1. Essentially, it mimics
ple program up and running.
For readers who read the short in- different end uses, this still illustrates the pins on the 28-pin DIP version of
troductory series Meet the Mighty Mi- how far modern semiconductor tech- the Micromite, except pin 20 which is
not present. The module also includes
cromite (February to April 2017) and nology has progressed.
The Explore-28 printed circuit board two extra pins at the bottom, labelled
now follow the Make it with Micromite series (from February 2019), the and concept was developed by two Mi- +5V, which can be used to feed power
Explore-28 combines the 28-pin Mi- cromite enthusiasts in New Zealand: in or out.
cromite Mk2 with the Microbridge
interface (May 2018).
Another way to think about it is
Explore-28 features
that it is a bit like the Micromite LCD
• Complete microcontroller module with USB interface and power supply
Backpack V2 (May 2018) but without the LCD, and in a much smaller
• Programmed in BASIC, with 60KB program space and 50KB RAM for variables
package.
• 19 I/O pins with 10 capable of being used as analogue inputs
The whole module is only a little
• Supports communications protocols including async serial, I2C, SPI and Dallas OneWire
bit larger than a 28-pin DIL IC package but it packs a lot of hardware,
• Support for special devices such as temperature sensors, keypads, IR remote controls
including:
• Full support for touch-sensitive LCD panels up to 3.6-inch (9.2cm) diagonal
• A 28-pin Micromite pre-programmed with the latest MMBa• Embedded controller features such as sleep, control over clock speed and watchdog timer
sic interpreter.
• Built-in PIC32 programmer for updating the firmware
• A USB-to-serial interface, which
• Runs from 4-16V <at> 50mA
allows you to plug the Explore-28
into your computer and immedi• Compact size: 40mm long, 19mm wide and 8mm tall (without header pins)
ately start programming.
24
Practical Electronics | September | 2020
Fig.1: the Explore-28 has 19 I/O pins, with 10 that can be used as analogue
inputs. Other connections include a 3.3V output, ground and two pins which
can be a 5V output or external power input (4-16V). ANA means analogue I/O
capable, DIG means digital. The other notations refer to the special capabilities
of each pin – see the Micromite User Manual for a full description.
When the Explore-28 is plugged into
a USB port, it will power itself from the
USB 5V supply, and that voltage appears on the +5V pins. This is useful
if you want to power some other devices from 5V.
You can also power the Explore-28
by connecting an external power source
to either of the 5V pins. The input can
range from 4V to 16V. For example,
you could power the Explore-28 from
a 12V battery.
But note that if you are using an external power source, you cannot plug the
Explore-28 into your computer’s USB
port at the same time. The two power
supplies will conflict and possibly damage your USB port or computer.
Second, if you are powering the Explore-28 from a car battery, you will
need to include extra circuitry to protect it from the excessive voltage spikes
that can be found in an automotive electrical system.
Fig.2: when the Explore-28 is plugged
into a Windows computer, it is allocated
a virtual serial port number by the
operating system. You can check what
COM number was allocated by going
into Device Manager and looking for a
new device listed under Serial Ports (it
is COM5 in this example).
Fig.3: when you have connected
to the virtual serial port created
by the Explore-28, you will
see the MMBasic command
prompt (‘>’), as shown here.
At this point, you can try out
commands, set options, enter
programs and run them.
Practical Electronics | September | 2020
The Micromite chip itself requires
a 3.3V supply, and this is provided by
the onboard regulator. This voltage is
made available on pin 13 so that you
can power external components that
require 3.3V.
Up to 150mA can be drawn from this
pin; however, you will need to make
sure that this does not cause the regulator to overheat and shut down (particularly with high input voltages).
USB/serial interface
The Explore-28 includes a PIC16F1455
microcontroller, which is programmed to act as both a USB-toserial interface and also as a PIC32
programmer (used for updating the
Micromite firmware).
This is called the Microbridge and
when it is acting as a USB-to-serial interface, it creates a virtual serial port
on your computer. This acts like a normal serial port, but it works over USB.
As mentioned above, we introduced
the Microbridge in the May 2018 issue
of PE, and it is used in the later versions
of the Micromite LCD Backpack (for V2,
see May 2018; and V3 in August 2020).
The Microbridge connects your computer to the Micromite’s serial console.
This is the main programming interface
to the Micromite, and you can use it to
set options, enter programs, run them,
get feedback from running programs
and also receive data.
If you’re running Windows, it will
automatically create a virtual serial interface when the Explore-28 is plugged
into a USB socket on your computer.
This appears as a COM port, usually
with a high number such as COM5
or COM21.
On Windows 7 and earlier versions,
a device driver may be required (see
https://bit.ly/pe-sep20-win7), but Windows 8 and 10 already have the driver
built in.
You can check the COM number that
Windows allocated to the Explore-28 by
going into Device Manager and looking for a new device listed under Serial
Ports, as illustrated in Fig.2.
The Linux kernel and macOS operating systems usually do not need any
special configuration and, as an example, under Linux Mint, the Explore-28
normally appears as: /dev/ttyACM0.
Accessing the Micromite console
When you plug the Explore-28 into
your computer, the LED marked ‘PWR’
(LED1) will illuminate, to show that it
is powered.
To access the Micromite’s console,
you need to run a terminal emulator
on your computer.
This takes the key presses that you
make and sends them down the serial interface to the Micromite, while
also displaying any responses from
the Micromite.
For Windows, you have several choices. We recommend Tera Term (http://
tera-term.en.lo4d.com/), but there
are many other terminal emulators to
choose from, with some specially written for the Micromite (see the Micromite
resources panel).
The Micromite’s console defaults to
a speed of 38,400 baud, so all you need
to do is configure your terminal emulator for the correct COM port number
and this baud rate.
Then, when you press Enter, you
should see the Micromite command
prompt (a greater than symbol: ‘>’), as
shown in Fig.3.
At this point, you have full control of
the Micromite for entering commands
or setting options.
You can experiment by typing
PRINT 1/7 and pressing Enter. The
25
The Mighty Micromite
The Micromite is based on the Microchip PIC32, which is a high-performance 32-bit microcontroller. While this chip as supplied is powerful, it is
not that easy to write programs for it (the manuals run to over a thousand
pages!) and the standard programming languages used on it are assembler, C or C++. These languages and the programming software are complex and require experience to use properly.
For the average hobbyist, the Micromite firmware makes programming
much easier. It’s loaded into the Flash memory of the PIC32 and turns the
chip into a Micromite. The Micromite firmware insulates you from the complexities of the underlying silicon, while still allowing you to use its features.
To program the Micromite, you use the BASIC programming language,
which is designed to be easy for beginners and allows you to get started
almost immediately.
The BASIC language
The following is an elementary introduction to Micromite programming.
We published a comprehensive three-part series on using the Micromite
in the February to April 2017 issues, so refer to those articles for more detailed instruction. Plus of course the ongoing Make it with Micromite series.
The Micromite version of BASIC is called MMBasic (short for MicroMite
BASIC) which is loosely based on the Microsoft BASIC interpreter that was
popular years ago. ‘Interpreted’ means that the firmware reads through
your program line-by-line, executing each command as it finds them.
BASIC (an acronym for Beginner’s All-purpose Symbolic Instruction
Code) was initially developed by Dartmouth College in the US for teaching programming, and therefore emphasises ease of use. BASIC is also a
powerful language, and it became popular in the 1980s and 90s with the
introduction of small computers such as the Commodore 64 and Apple II.
These days, it is still used in some large commercial data systems (usually running Pick Basic).
BASIC program execution starts at the top of the program and continues until it runs off the bottom or hits an END command. Generally, there
is one command per line, although you can have more if you wish, each
separated by the colon (:) character.
A command can be something like PRINT which will output some text
to the console, PIN() which will set the state of an output pin, or SERVO
which will control a servo motor.
Decisions within the program are made using the IF…THEN command.
So, for example, your program can include something like:
IF t > 30 THEN PRINT “too high”
Your program can also run commands in loops. For example, the following will display the numbers from one to ten:
FOR nbr = 1 to 10
PRINT nbr
NEXT nbr
Micromite input/output
The Micromite is intended to be a controller that can be embedded in something like a burglar alarm or process controller. In this type of role, its ability to use the I/O pins to control external devices is critical.
Micromite will return the result of dividing 1 by 7, then display the command prompt again.
This is called ‘command mode’ and
it allows you to try out most BASIC
commands at the command prompt. It
is handy for testing commands while
you are learning the language.
Note that when you type something
on the console or the Micromite sends
some data to your PC, the LED marked
26
An I/O pin refers to the physical pin on the Micromite chip. On the Explore-28, these are routed to pin headers on the edge of the module, with
the same numbering.
So, when you refer to a pin number in your program, that is both the
physical pin on the chip and the pin header number.
In MMBasic, you configure an I/O pin on the chip using the SETPIN
command – it defines the pin as a digital input, digital output or analogue
input. For example, if pin 2 on the chip has been defined as an analogue
input, the function PIN(2) will read the voltage on pin number 2; eg:
PRINT PIN(2) would create a simple voltmeter.
To read the state of a pin configured as a digital input, you use the same
function, but in that case, it will return zero for a low voltage and one for
voltage high. You can set the output level of a pin configured as a digital
output by assigning a value to PIN(). For example, this will set the output on pin 24 to a logic high (3.3V):
PIN(24) = 1
There are many other things that you can do with the Micromite’s I/O pins,
including measuring frequency, timing, generating square waves and more.
Special device support
A great feature of the Micromite is that it has built-in support for many external devices like temperature and humidity sensors, keypads, real-time
clocks and servos. For example, using the IR command, you can receive
commands from an infrared remote control.
This is easy to do, and it adds flair (and utility) to your project when you
can control it by pressing a button on a remote control.
As another example, you can connect a low-cost ultrasonic distance
sensor to the Micromite and with one function, read the distance to an
object in centimetres.
Measuring temperature and humidity is just as easy; MMBasic will
query the sensor for you and return the temperature in degrees Celsius
and humidity in %RH.
Perhaps the most outstanding feature of the Micromite is its ability to
control a touch-sensitive LCD panel. The Micromite can display text and
graphics and respond to touch inputs on the panel’s face.
Communications protocols
There are many modules and chips that you can buy to measure anything from
air quality to acceleration. These all send their data via some communication
protocol, usually serial, and the Micromite supports four main protocols:
• Asynchronous serial, which is used by computers, lab equipment and
GPS modules.
• I2C, which is used by gas sensors, real-time clocks and many other chips.
• SPI, which is used, for example, by accelerometers, memory chips and
electronic compasses.
• Dallas One-Wire, which is mostly used for temperature sensors.
GPS modules are particularly valuable; they’re cheap (£8-20) and give you
your precise location, altitude, speed, heading and the exact time.
Using the Micromite’s serial interface, it is easy to retrieve this information and they open up a world of exciting projects that can be built.
‘MODE’ (LED2) will briefly flash to indicate that data is being sent over the
virtual serial port.
The tactile pushbutton near the LEDs
(switch S1) is used to put the Microbridge into its programming mode
(more about that later).
A handy feature of the Microbridge
is that you can reset the chip by sending a break signal over the virtual serial interface. In Tera Term, this is done
by pressing ALT-B, and this has the
same effect as cycling the power to
the Micromite.
Programming example
We mentioned how easy it is to get
started with the Explore-28, so here is a
short tutorial to illustrate that point.For
a beginner, the best method of entering a
program into the Micromite is to use the
Micromite’s built-in full-screen editor.
Practical Electronics | September | 2020
This is fully documented in the Micromite User Manual, but to get started,
all you need to know is that the arrow
keys on your keyboard will move the
cursor around the text and the backspace key will delete the character before the cursor.
At the command prompt, type EDIT
followed by the Enter key. This will
take you into the Micromite’s editor.
Then, enter this short program:
SETPIN 15, DOUT
DO
PIN(15) = 1
PAUSE 500
PIN(15) = 0
PAUSE 500
LOOP
To save this program, press the F1
key or CTRL-Q (which does the same
thing). This will return you to the command prompt. Then, to run the program, type RUN and press Enter.
This program toggles the voltage on
pin 15 of the Explore-28 from zero to
3.3V and then back again every second,
and continues doing it forever. You can
test this by probing pin 15 with a voltmeter, and you should see the voltage
jumping up and down at 1Hz.
While the program is running, you
will not see the command prompt in
the terminal emulator. This is because
the Micromite is now busy, but you
can regain control by pressing CTRL-C.
This is the break key and it will interrupt any running program and return
control to the command prompt, so
that you can edit the program or enter
other commands.
Circuit description
The circuit of the Explore-28 is shown
in Fig.4. As you can see, it isn’t terribly complex. It consists of three main
components: IC1, the 28-pin PIC32
microcontroller (the Micromite); IC2,
the PIC16F1455 (Microbridge) which
provides the USB interface; and a voltage regulator to provide the 3.3V supply (REG1).
The PIC32 used for the Micromite
(IC1) is in a 28-pin surface-mounting
package, with most of its pins going directly to the header pins on the edge of
the board (CON1-CON3). The 10µF capacitor on pin 20 is critical and must be
a high-quality multilayer ceramic type.
It is used to stabilise the chip’s internal
1.8V regulator, and if it is missing or
the wrong type is used, the Micromite
will not work.
The only Micromite pins which do
not go directly to a corresponding pin
on CON1-CON3 are: pin 11, the serial
data out line, which goes via a 1.5kΩ
resistor in order to protect IC1 if an
Practical Electronics | September | 2020
external device attempts to drive it
above +3.3V or below 0V (eg, a raw
RS-232 signal); and pin 20 (VCAP), as
this micro pin is already connected to
the required capacitor.
Several of the micro’s pins also connect to the Microbridge (IC2), to allow
the Microbridge to reprogram the chip
and for its USB/serial function. As mentioned earlier, the Microbridge chip has
two functions; it acts as a USB-to-serial
bridge and as a PIC32 programmer.
On power-up, it starts in the USB-toserial bridge mode, with the MODE LED
(LED2) off, except for flickering when
there is serial activity. Serial data is
transmitted from pin 6, which connects
to the receive data pin (pin 12) on IC1.
Similarly, the Micromite’s transmit
pin (pin 11) connects to receive (pin 5)
on the Microbridge chip.
A second 1.5kΩ resistor between the
TX pin of IC2 (pin 6) and the RX pin of
IC1 (in 12) protects IC2 in case external
circuitry tries to send data to the Micromite while the Microbridge is active.
A 10kΩ pull-up resistor from 3.3V to
pin 11 of IC1 prevents glitches on the
serial port when the Micromite is reset. Another 10kΩ pull-up resistor on
pin 1 (MCLR) prevents spurious resets
of the chip.
The tactile switch on pin 4 of IC2 is
used to place the Microbridge into its
PIC32 programming mode. In this mode,
the MODE LED (LED2) lights up, and
the Microbridge chip uses pin 7 to reset the PIC32 and pins 2 and 3 to drive
its programming interface.
In normal operation, these pins are
in a high-impedance state, so the corresponding I/O pins on the Micromite
can be used for other purposes.
The Explore-28 is just a little larger
than the original 28-pin Micromite
in a standard dual inline plastic
(DIP) package. But it has many more
features, including a USB-to-serial
interface, onboard PIC32 programmer
and a 3.3V regulator.
Parts list –
Micromite Explore-28
1 four-layer PCB coded 07108191,
39 × 18.5mm
1 15-pin male header, 2.54mm pitch
(CON1)
1 6-pin and 8-pin male header, 2.54mm
pitch (CON2,CON3) (optional)
1 mini type-B SMD USB socket (CON4)
[Altronics P1308, element14
2300434]
1 mini SMD tactile pushbutton switch
(S1) [element14 1629616]
Semiconductors
1 PIC32MX170F256B-50I/SO
microcontroller programmed with
MMBasic, SOIC-28 (IC1)
1 PIC16F1455-I/SL microcontroller
programmed for Microbridge, SOIC14 (IC2)
1 MCP1703A-3302E/DB low-dropout
3.3V regulator, SOT-223 (REG1)
2 red SMD LEDs, 2012/0805-size
(LED1,LED2)
Capacitors (all SMD 2012/0805
ceramic)
1 10µF 6.3V X5R
2 4.7µF 16V X5R
2 100nF 50V X7R
Resistors (all 1% SMD 2012/0805)
(Code 103)
2 10kΩ
(Code 152)
4 1.5kΩ
(Code 100)
1 10Ω
The power supply is based on a lowdropout linear regulator (REG1; Microchip MCP1703) with a fixed output of 3.3V.
This powers both the Microbridge
chip (IC2) and the Micromite (IC1)
and as mentioned, is also made available on pin 13 of CON1 for external
circuitry to use. The MCP1703 can
source up to 250mA, with about 50mA
of that being used by the Microbridge
and the Micromite.
Besides the critical 10µF capacitor
described above, there are two 100nF
bypass capacitors for the 3.3V supplies of IC1 and IC2, plus 4.7µF input
bypassing and output filtering ceramic
capacitors for REG1.
PIC32 programmer
We mentioned above that the Microbridge chip can act as a PIC32 programmer for loading firmware updates into
the Micromite (IC1).
You essentially get this feature for
free, which is handy, as previously you
needed to purchase a separate PIC32
programmer to take advantage of new
releases of the Micromite firmware.
If you purchased the Explore-28
as a fully assembled module or a kit,
27
both microcontrollers (the PIC32 and
PIC16F1455) will be supplied pre-programmed, so this programming feature
is only required if you want to update
the firmware with a new release.
The process of loading new firmware into the Micromite is painless
and only takes a minute or two. Start
by switching the Microbridge into its
programming mode and then, using
free software on your laptop, you upload the new firmware via USB to the
Microbridge, which in turn programs it
into the flash memory of the Micromite.
To enter into the programming mode,
momentarily press the tactile switch
on the Explore-28. The Microbridge
chip will then immediately switch to
its PIC32 programming mode, and the
MODE LED will illuminate to confirm
this. If you did not intend to enter this
mode, you can revert to the USB-to-serial mode by simply cycling the power.
The software you need to reprogram
the Micromite is called pic32prog. The
Windows version is available from the
September 2020 page of the PE website,
while the macOS and Linux versions
are available from other sites.
The Windows version does not
need to be installed; you can copy
the executable to a convenient location and start a command window in
that folder.
New versions of the Micromite firmware can be found at the author’s website, http://geoffg.net/micromite.html
(scroll to the bottom of the page). The
Micromite firmware download on the
PE website is also updated periodically,
but there may be a delay between a new
release and it appearing on our website.
Generally, the firmware is contained
in a .zip file, along with the Micromite manuals, so you need to unzip
its contents and locate the firmware
file (it has a .hex extension). Then,
copy this file to the same folder as the
pic32prog program.
Programming the firmware
To program this file into the Micromite
chip, run pic32prog with the following arguments:
pic32prog -d ascii:comxx
yyyy.hex
Here, xx is the COM port number and
yyyy.hex is the name of the firmware
file. The COM port number is the same
as that allocated by Windows when the
Microbridge was in its USB-to-serial
converter mode.
As an example, if your Microbridge
was allocated the virtual serial port of
COM23 and the file that you wanted to
program was Micromite_V5.05.09.hex,
the command would be:
pic32prog -d ascii:com23
Micromite_V5.05.09.hex
Before you do this, make sure that you
have closed the terminal emulator that
you were previously using to communicate with the Microbridge in its USB-toserial mode. Not doing this is a common
mistake and it will cause pic32prog to
abort with an error message, because
it cannot open the virtual serial port.
When you press enter at the end of
this command, pic32prog will upload
the hex file to the Microbridge, program it into the PIC32, then read back
the programmed data to verify that the
programming operation was executed
correctly. The whole operation will take
less than a minute and sample output
of the whole process is shown in Fig.5.
After the programming operation, the
MODE LED will switch off, the Microbridge will revert to operating as a USBto-serial converter, and
the Micromite will
automatically restart
with the new firmware.
Updating the Micromite’s firmware will reset any options set and
completely erase the
BASIC program memory. So make sure that
you make a copy of the
program stored on the
Micromite before starting the upgrade.
Micromite Explore 28
Fig.4: the circuit of the Explore-28 module is elegant in its simplicity. IC1 is the PIC32 which
runs MMBasic; IC2 is the Microbridge which provides a USB serial port and the ability to
reprogram IC1; and REG1 is a low-dropout regulator which provides both ICs with a 3.3V
supply rail, derived from USB 5V or a source of 4-16V DC fed in via CON1 and/or CON2.
28
Construction
Because the Explore-28
is readily available as
an assembled module,
we expect that many
readers will take that
option. However, if
you decide to assemble your own module,
you will find that it is
not hard but you will
need a steady hand and
ideally, some experience soldering surfacemount components,
even though the ones
used in this project are
not that small (at least,
by SMD standards).
We have often covered soldering surface mounted components before, and
Practical Electronics | September | 2020
using them is nothing to be feared.
The secret is to use plenty of flux paste
and keep only a small amount of solder on the soldering iron’s tip. The flux
makes the solder flow smoothly around
the joint while using only a minimal
amount of solder means that you will
avoid solder bridges and blobs.
The PCB used for the Explore-28 is
a four-layer board, coded 07108191,
measures 39 × 18.5mm, and has components mounted on both sides. It is
available from the PE PCB Service.
The overlay diagrams, Figs.6(a) and
(b), show where the components are
mounted, along with top and bottom
layer tracks.
We haven’t shown the two inner
layers because that would make the
diagrams hard to read. The outer layer
tracks shown are used for signal routing, while the two inner layers consist of a ground plane and a power
(+3.3V) plane.
These cover most of the board and
only have holes where vias pass between the top and bottom layers.
Other vias are used to connect these
planes to component pins.
While Fig.6 shows where all the components need to be mounted, the silk
screen printing on the board will also
guide you during assembly.
It’s best to solder the SMD components on the bottom side first (the side
with IC2 and REG1), then add the components to the top side, and finish with
the pin headers.
Before soldering IC2, if you haven’t
purchased a pre-programmed kit, you
need to program it with the Microbridge firmware. This can be downloaded from the PE website or from:
Fig.5: the typical output from pic32prog after it has programmed a new version
of the MMBasic firmware into the Micromite using the Microbridge. The whole
operation is straight forward and takes less than a minute.
http://geoffg.net/microbridge.html
(scroll to the bottom of the page).
You will also need a narrow SOIC
programming socket to do this, so unless you have one, you’re better off acquiring a programmed chip.
You do not need to program the
PIC32 microcontroller used for the
Micromite because the Microbridge
will do that for you when you have
finished construction.
Solder IC2 on the bottom side of the
board first, taking care that its pin 1 dot
is oriented towards the nearby empty
square pads, as shown in Fig.6.
If you bridge two pins with solder,
clean up the bridge by applying a little
flux paste and then solder wick.
CON2/3 (UNDER)
28
Follow with REG1, which can only
go in one way around. It’s best to apply a little flux paste to the large pad
first, then solder the three smaller pins
before finishing with the large tab. You
may need to turn your iron up to get a
good solder joint on the tab.
Now add the seven resistors and
five capacitors to the bottom side, being careful not get any of the different
values mixed up.
Flip the board over and then solder
the USB socket. Make sure its five signal pins line up correctly with the pads
(aided by the two plastic posts going
into holes on the board), then solder
those signal pins and ensure there are
no bridges between them.
CON2 /3 (UNDER)
28
15 5V
15
5V
K
CON4
IC1
K
1
S1
1
CON1 (UNDER)
14 5V
LED2
MODE
ACTUAL SIZE
1.5kW
10kW
1.5kW
10W
1
100nF IC2
100nF
28
1.5kW
(b)
CON1
1
1.5kW
10mF
CON2/3
IC1
K
S1
CON4
4.7mF
1
REG1
4.7mF
15 5V
Fig.6: use these same-size photos and PCB overlay diagrams (top
and bottom view) as a guide to assembling the Explore-28.
Because the Micromite Explore-28 is so small, we’ve also prepared
the twice-life-size diagrams at right to make life a little easier!
As mentioned in the text, it’s easiest to populate the bottom side
first (with IC2 and REG1) since these components are all similar
heights, so the board should still sit relatively flat while you solder
the remaining components on the top side. If you’re having trouble
getting it to sit flat, try plugging a pair of 15-pin headers into a
breadboard and then resting the PCB on top.
Practical Electronics | September | 2020
K
14 5V
10kW
1
LED1
PWR
1
(a)
14
CON1 (UNDER)
5V
2:1 SCALE FOR CLARITY (DOUBLE ACTUAL WIDTH & HEIGHT)
1
1.5k
CON1
10k
10
100nF
28
1.5k
IC2
100nF
5V
4.7 F
1.5k
1
1.5k
14
10k
1
10 F
REG1
4.7 F
CON2/3
15
5V
29
to indicate the cathode,
we’ve seen LEDs where it
indicates the anode.
So to be extra safe (and
avoid a lot of fiddly rotating of components later),
it’s best to probe each end
of the LEDs with a multimeter set on diode-test
mode.
When they light up, the
red probe is on the anode
and the black probe on
the cathode.
Finish up by soldering
pushbutton S1 in place,
followed by the headers,
fitted to the underside of
the board as shown.
Testing
To test the completed
Explore-28, simply connect it to a USB port on
your computer and program the latest firmware
The Explore-28 is designed to plug into a standard
into the Micromite as
(solderless) breadboard for easy prototyping. Using
the pre-assembled module, you can plug it into a
described above (if your
USB port on your laptop, and in a few minutes have
Micromite chip wasn’t ala simple program running.
ready programmed).
Then check that you
If there are bridges, apply some flux can get the MMBasic command
paste and clean them up using solder prompt via a terminal emulator. If
wick. Then solder the four large mount- you can, it means that everything is
ing tabs, to hold the socket firmly to working perfectly.
If you do not see the virtual serial
the board.
port
created by the Microbridge on your
With that done, you can continue
computer,
the first thing to check is that
with soldering IC1; again, watch its
orientation – pin 1 goes at the opposite the voltage regulator is producing 3.3V
(measure between pins 13 and 8).
end from the USB socket.
If this is OK, then the Microbridge
Then fit LED1 and LED2, with their
chip
is probably at fault, with the most
cathodes (generally indicated with a
green stripe or dot) towards the ‘K’ likely causes being poor soldering or an
shown in Fig.6 (shown on the PCB itself incorrectly programmed chip.
If you can connect via the USB-toas white squares). But note that while
serial
interface but you do not see the
most LEDs have a green dot or stripe
Where to buy the Explore-28...
... parts, kits and modules
• A full kit, major parts or a
complete pre-assembled module
is available from the dedicated UK
Micromite store at:
https://micromite.org/
• Also visit the Rictech Ltd website
for a downloadable construction
pack with PCB and firmware:
www.rictech.nz/micromite-products
Micromite’s prompt, you should check
that the Micromite was programmed
correctly, that the capacitor on pin 20
is of the correct type and, of course,
that your soldering is good.
A handy check is the current drawn
by the completed module. This is normally about 36mA.
You would need to connect an ammeter between a 4-16V DC supply and
the bottom row of pins on the board to
measure this.
If it is closer to 15mA, the Micromite
chip is not running correctly, while a
current draw of less than 5mA points
to a problem with the voltage regulator.
So, there you have it. The Explore-28
is an easy-to-use microcontroller module that you can use as the brains of
your next project. It is a fun electronic building block to play with and an
excellent way of learning to program
in the BASIC programming language.
Reproduced by arrangement with
SILICON CHIP magazine 2020.
www.siliconchip.com.au
Micromite Resources
Latest firmware versions, manuals and tutorials: ..................................................................................................... http://geoffg.net
‘Getting Started with the Micromite’ and ‘Micromite User Manual’: ........................... http://geoffg.net/micromite.html#Downloads
The Back Shed forum, where many knowledgeable users can help newcomers: .... www.thebackshed.com/forum/Microcontrollers
Microbridge Resources
Firmware for the Microbridge (PIC16F1455) in the Explore-28: .............................. http://geoffg.net/microbridge.html#Downloads
pic32prog, used to program new firmware into the Micromite (Windows):............. http://geoffg.net/microbridge.html#Downloads
P32P, a user-friendly GUI interface for pic32prog.exe (Windows): .... www.thebackshed.com/docregister/ViewDoc.asp?DocID=21
Terminal Emulators
Tera Term, the standard terminal emulator used with the Micromite: .................................................. http://tera-term.en.lo4d.com/
GFXterm, a terminal emulator designed specifically for use with the Micromite. It works with the Micromite’s
built-in editor and supports a set of graphics extensions: ................. www.thebackshed.com/docregister/ViewDoc.asp?DocID=22
MMEdit, a complete IDE (Integrated Development Environment) specifically designed for the Micromite. It includes
advanced features such as colour-coded text, formatting, download and run, and more: ............ www.c-com.com.au/MMedit.htm
30
Practical Electronics | September | 2020
|