Silicon ChipMicromite Plus Explore 100 Module, Pt.2 - October 2016 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: El cheapo electronics modules - the new standard components
  4. Order Form
  5. Feature: China's Gigantic Telescope: Scanning Deepest Space by Ross Tester
  6. Feature: Implantable Medical Devices by Dr David Maddison
  7. Feature: El Cheapo Modules From Asia - Part 1 by Jim Rowe
  8. Project: Lure & Liquidate Lovelorn Zika Virus Mozzies by John Clarke
  9. Subscriptions
  10. Project: A New Transformer For The Currawong Valve Amplifier by Leo Simpson
  11. Project: Touchscreen Appliance Energy Meter, Pt.3 by Jim Rowe & Nicholas Vinen
  12. Project: Two Micropower LED Flasher Modules by John Clarke
  13. Serviceman's Log: How I got trapped inside my MG by Dave Thompson
  14. Project: Voltage/Current Reference With Touchscreen, Pt.1 by Nicholas Vinen
  15. Project: Micromite Plus Explore 100 Module, Pt.2 by Geoff Graham
  16. Vintage Radio: The valve mantel’s last hurrah: Astor’s DLP 2-valve receiver by Ian Batty
  17. Product Showcase
  18. Market Centre
  19. Notes & Errata: Stereo LED Audio Level/VU Meter (June & July 2016); Touchscreen Appliance Energy Meter (August - October 2016)
  20. Advertising Index
  21. Outer Back Cover

This is only a preview of the October 2016 issue of Silicon Chip.

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

Items relevant to "El Cheapo Modules From Asia - Part 1":
  • DS3231-based Real Time Clock & Calendar module with mounting hardware (Component, AUD $6.00)
Articles in this series:
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • A Gesture Recognition Module (March 2022)
  • A Gesture Recognition Module (March 2022)
  • Air Quality Sensors (May 2022)
  • Air Quality Sensors (May 2022)
  • MOS Air Quality Sensors (June 2022)
  • MOS Air Quality Sensors (June 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Heart Rate Sensor Module (February 2023)
  • Heart Rate Sensor Module (February 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • VL6180X Rangefinding Module (July 2023)
  • VL6180X Rangefinding Module (July 2023)
  • pH Meter Module (September 2023)
  • pH Meter Module (September 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 1-24V USB Power Supply (October 2024)
  • 1-24V USB Power Supply (October 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
  • Low-cost electronic modules: 8×16 LED Matrix module (July 2025)
  • Low-cost electronic modules: 8×16 LED Matrix module (July 2025)
Items relevant to "Lure & Liquidate Lovelorn Zika Virus Mozzies":
  • Mosquito Lure PCB [25110161] (AUD $5.00)
  • PIC12F675-I/P programmed for the Mosquito Lure [2511016A.HEX] (Programmed Microcontroller, AUD $10.00)
  • Mosquito Lure SMD parts: TPA2005D1DGNR (MSOP-8) Class-D 1.45W amplifier IC and microUSB socket (Component, AUD $7.50)
  • Firmware (ASM and HEX) files for the Mosquito Lure [2511016A.HEX] (Software, Free)
  • Mosquito Lure PCB pattern (PDF download) [25110161] (Free)
  • Mosquito Lure trap details, cutting diagrams and panels (PDF download) (Panel Artwork, Free)
Items relevant to "A New Transformer For The Currawong Valve Amplifier":
  • Currawong 2 x 10W Stereo Valve Amplifier main PCB [01111141] (AUD $55.00)
  • Currawong Remote Control PCB [01111144] (AUD $5.00)
  • PIC16F88-I/P programmed for the Currawong Remote Volume Control [0111114A.HEX] (Programmed Microcontroller, AUD $15.00)
  • Front & rear panels for the Currawong 2 x 10W Stereo Valve Amplifier [01111142/3] (PCB, AUD $30.00)
  • Currawong 2 x 10W Stereo Valve Amplifier acrylic top cover (PCB, AUD $30.00)
  • Currawong 2 x 10W Stereo Valve Amplifier top cover cutting diagram (Software, Free)
  • Firmware and source code for the Currawong Remote Volume Control [0111114A.HEX] (Software, Free)
  • Currawong 2 x 10W Stereo Valve Amplifier main PCB pattern [01111141] (Free)
  • Currawong 2 x 10W Stereo Valve Amplifier panel artwork (PDF download) (Free)
Articles in this series:
  • Currawong Stereo Valve Amplifier: A Preview (October 2014)
  • Currawong Stereo Valve Amplifier: A Preview (October 2014)
  • Currawong 2 x 10W Stereo Valve Amplifier, Pt.1 (November 2014)
  • Currawong 2 x 10W Stereo Valve Amplifier, Pt.1 (November 2014)
  • Currawong 2 x 10W Stereo Valve Amplifier, Pt.2 (December 2014)
  • Currawong 2 x 10W Stereo Valve Amplifier, Pt.2 (December 2014)
  • The Currawong 2 x 10W Stereo Valve Amplifier, Pt.3 (January 2015)
  • The Currawong 2 x 10W Stereo Valve Amplifier, Pt.3 (January 2015)
  • Modifying the Currawong Amplifier: Is It Worthwhile? (March 2015)
  • Modifying the Currawong Amplifier: Is It Worthwhile? (March 2015)
  • A New Transformer For The Currawong Valve Amplifier (October 2016)
  • A New Transformer For The Currawong Valve Amplifier (October 2016)
Items relevant to "Touchscreen Appliance Energy Meter, Pt.3":
  • Touchscreen Appliance Energy Meter PCB [04116061 RevI] (AUD $15.00)
  • PIC32MX170F256B-50I/SP programmed for the Micromite-based Touchscreen Energy Meter v1.01 [0411606A.hex] (Programmed Microcontroller, AUD $15.00)
  • CP2102-based USB/TTL serial converter with microUSB socket and 6-pin right-angle header (Component, AUD $5.00)
  • CP2102-based USB/TTL serial converter with microUSB socket and 6-pin right-angle header (clone version) (Component, AUD $3.00)
  • DS3231-based Real Time Clock & Calendar module with mounting hardware (Component, AUD $6.00)
  • ACS718 20A isolated current monitor (Component, AUD $15.00)
  • Firmware (HEX) file and BASIC source code for the Micromite-based Touchscreen Appliance Energy Meter [v1.01] (Software, Free)
  • Touchscreen Appliance Energy Meter PCB pettern (PDF download) [04116061 RevG] (PCB Pattern, Free)
  • Touchscreen Appliance Energy Meter lid panel artwork (PDF download) (Free)
Articles in this series:
  • Touchscreen-Controlled Energy Meter, Pt.1 (August 2016)
  • Touchscreen-Controlled Energy Meter, Pt.1 (August 2016)
  • Touchscreen Appliance Energy Meter, Pt.2 (September 2016)
  • Touchscreen Appliance Energy Meter, Pt.2 (September 2016)
  • Touchscreen Appliance Energy Meter, Pt.3 (October 2016)
  • Touchscreen Appliance Energy Meter, Pt.3 (October 2016)
Items relevant to "Two Micropower LED Flasher Modules":
  • Micropower LED Flasher PCB [16109161] (AUD $5.00)
  • Mini Micropower LED Flasher PCB [16109162] (AUD $2.50)
  • PIC12F675-I/P programmed for the Micropower LED Flasher [1610916A.HEX] (Programmed Microcontroller, AUD $10.00)
  • Firmware (ASM and HEX) files for the Micropower LED Flasher [1610916A.HEX] (Software, Free)
  • Micropower LED Flasher PCB patterns (PDF download) [16109161/2] (Free)
Items relevant to "Voltage/Current Reference With Touchscreen, Pt.1":
  • Touchscreen Voltage/Current Reference PCB [04110161] (AUD $12.50)
  • PIC32MX170F256B-50I/SP programmed for the Micromite-based Touchscreen Voltage/Current Reference v1.00 [0411016A.HEX] (Programmed Microcontroller, AUD $15.00)
  • Short Form Kit for the Touchscreen Voltage/Current Reference (Component, AUD $120.00)
  • Translucent Blue UB1 Lid for the Precision Voltage & Current Reference with Touchscreen Control (PCB, AUD $10.00)
  • Firmware (HEX) file and BASIC source code for the Micromite-based Touchscreen Voltage/Current Reference v1.00 [0411016A.HEX] (Software, Free)
  • Touchscreen Voltage/Current Reference PCB pattern (PDF download) [04110161] (Free)
Articles in this series:
  • Voltage/Current Reference With Touchscreen, Pt.1 (October 2016)
  • Voltage/Current Reference With Touchscreen, Pt.1 (October 2016)
  • Voltage/Current Reference With Touchscreen, Pt.2 (December 2016)
  • Voltage/Current Reference With Touchscreen, Pt.2 (December 2016)
Items relevant to "Micromite Plus Explore 100 Module, Pt.2":
  • Micromite Plus Explore 100 PCB [07109161 RevC] (AUD $15.00)
  • PIC32MX470F512L-120/PF programmed for the Micromite Plus (Programmed Microcontroller, AUD $25.00)
  • CP2102-based USB/TTL serial converter with microUSB socket and 6-pin right-angle header (Component, AUD $5.00)
  • CP2102-based USB/TTL serial converter with microUSB socket and 6-pin right-angle header (clone version) (Component, AUD $3.00)
  • DS3231-based Real Time Clock & Calendar module with mounting hardware (Component, AUD $6.00)
  • MCP120-270GI/TO Supply Supervisor IC (TO-92) (Component, AUD $2.00)
  • Short Form Kit for the Micromite Plus Explore 100 (Component, AUD $75.00)
  • Firmware (HEX) file and documents for the Micromite Mk.2 and Micromite Plus (Software, Free)
  • Micromite Plus Explore 100 PCB pattern (PDF download) [07109161 RevC] (Free)
Articles in this series:
  • Micromite Plus Explore 100 With Touchscreen, Pt.1 (September 2016)
  • Micromite Plus Explore 100 With Touchscreen, Pt.1 (September 2016)
  • Micromite Plus Explore 100 Module, Pt.2 (October 2016)
  • Micromite Plus Explore 100 Module, Pt.2 (October 2016)

Purchase a printed copy of this issue for $10.00.

Micromite Plus Explore 100 Pt.2: By Geoff Graham Last month, we introduced the Explore 100 module, described its features and gave the circuit details. Pt.2 this month gives the full assembly details, describes the display mounting and describes the setting-up, testing and fault-finding procedures. We also show you how to configure the touchscreen and configure the unit for use as a self-contained computer. T HE ASSEMBLY of the Explore 100 is straightforward, with all parts mounted on a 4-layer PCB coded 07109161 and measuring 135 x 85mm. This board mounts on the back of a 5-inch touchscreen LCD panel and plugs directly into a matching pin header on this panel. Other LCD panels of various sizes can also be used but some of these have to be connected to the Explore 100 via a flat ribbon cable as described later. Fig.2 shows the parts layout on the PCB. There are only four surfacemount parts: the Micromite Plus PIC32 microcontroller, its core filter capacitor, reverse polarity protection Mosfet Q1 and the USB socket(s). The 80  Silicon Chip remaining parts are all through-hole mounting types. A complete kit (minus the LCD) is available from the SILICON CHIP Online Shop, as are various individual parts. You can purchase the PCB separately from the SILICON CHIP Shop or from Graeme Rixon (see parts list in Pt.1). Graeme is also offering a kit with the four surface-mount parts already soldered in place and the microcontroller programmed with the latest version of MMBasic – see his website at: http:// www.rictech.nz/micromite-products for details and prices. Note that his version of board does not include the microSD card socket or the optional micro-USB power socket. The PIC32 chip has a pin spacing of 0.5mm and can be soldered with a standard soldering iron. The recommended soldering technique was described for the Explore 64 in the August issue, so we won’t repeat it here. Just remember to use plenty of flux and keep only a very small amount of solder on the iron’s tip. Following the microcontroller, you should then solder the IRF9333 MOSFET (Q1), the mini USB connector (and micro USB connector, if you’re using that) and the 10µF SMD capacitor. The recommended technique for all of these was also described in August. If you aren’t fitting Q1 then bridge the solder pads which would normally siliconchip.com.au CON8 GPI/O 22pF 100nF 20MHz 76 10 µF 100nF CD 8765432 1 CON14 + + CON1 5V DC 1 100nF Q1 1 0 0 µF 1 0 0 µF IC1 PIC32MX 470F 512L 1 100nF REG1 LM3940 IT-3.3 10k 100nF 32K SQW SCL SDA Vcc GND 1k 100nF 100nF 26 100nF 10Ω PB1 (under) RTC & EEPROM SCL SDA Vcc GND 10k RST GND 3.3V 470Ω IC2 MCP120G 100nF Pin 51 3.3V OUT CON6 DTR TxD GND RXI< RxD TXO> GND GND Serial 5V_USB 100nF CON13 JP1* Q1 BC338 S1 Reset LED3 AN PWM RST INT CS RX SCK TX MISO SCL MOSI SDA +3.3V +5V GND GND CON5 Click2 100nF 51 X1 LED2 mikro BUS ICSP 22pF ClickTX/RX CON3 CON10 AN PWM RST INT CS RX SCK TX MISO SCL MOSI SDA +3.3V +5V GND GND CON4 Click1 JP2-5 09109161 RevC Micromite+ Explore100 TFT www.geoffg.net (4 layers) mikro BUS 470Ω 470Ω 470Ω 3.3k I2C pull-ups 5.0V 3.3V CON9 LCD (under) 1 (10k) (10k) (10k) (10k) LED1 CON2 CLK DTA N/C N/C GND 5V Fig.2: follow this parts layout diagram to build the PCB. The Explore 100 uses mostly throughhole components, with just five surface-mount parts (including the PIC32 micro). CON1 can be either a 2.1mm DC power connector or a micro-USB socket (the SILICON CHIP version of the PCB accepts both). Note that the SILICON CHIP PCB also includes a micro-SD card socket (CON14), whereas the original PCB simply includes a header for connecting the card socket (CON10). CON7 (PS/2) * INSTALL JP1 ONLY IF POWER IS DERIVED FROM CON2 INSTEAD OF CON1 This photo shows an early prototype version of the Explore 100. The PCB uses four copper layers and was designed by Graeme Rixon of Dunedin, NZ. Be sure to install the PIC32 microntroller first (see text). be underneath it. This will directly connect the 5V input to the rest of the Explore 100. When fitting the remaining components, use the normal approach of inserting and soldering the low-profile components first (ie, starting with the resistors) and then working up to the taller items such as the header sockets. When you come to crystal X1, unless you are using a PCB supplied by SILICON CHIP, you should mount it one or two millimetres off the PCB so that there is no danger that the metal case siliconchip.com.au could short out the PCB’s solder pads. Alternatively use a plastic mounting pad for the crystal as we did. The SILICON CHIP PCB has solder mask over the crystal’s pads so this shouldn’t be an issue and you can solder it flush. Regulator REG1 must be attached to the PCB using an M3 x 6mm machine screw and nut before soldering its leads. It should be in good contact with the PCB, so that the top copper layer acts as a heatsink. There are a group of closely-spaced pads on the PCB marked “Click TX/ RX” (JP2-5). These pads allow you to reverse the serial Tx and Rx lines for Click boards. Normally though, you will want the two pairs of pads joined which are marked with brackets, so solder across these pads initially. The piezo buzzer mounts on the underside of the PCB. There is provision for two different types: a large 23mm buzzer for noisy locations and a smaller 14mm device for normal use. October 2016  81 Fig.3: when you have configured the Explore 100 as a stand-alone computer (OPTION LCDPANEL CONSOLE) you should be rewarded with the command prompt on the LCD panel, as shown in the screen grab at top. Pressing the Reset button will then bring up the full MMBasic startup banner (above). The piezo buzzer and the 40-way connector for the LCD panel mount on the rear of the PCB. The connector plugs directly into a matching pin header on the back of the 5-inch LCD panel (see photos and page 71, August 2016). There are seven 0.1-inch pitch female header sockets of various sizes on the board. They can be sourced individually but it is simpler to use the more readily available 50-pin single row header sockets and cut them to size. This can be done using a pair of side-cutters to cut the middle of one pin (thereby sacrificing that pin). The resultant jagged ends can be smoothed with a small hand file. The Microchip MCP120 reset supervisor is only required as a protection against power supply issues so it and its associated 100nF capacitor are optional. The specified MCP120 is in a TO-92 package so be careful to not confuse it with the BC337/338 transistor which is also in a TO-92 package. iExpress and Banggood.com. Search for “DS3231”. If you are purchasing online, make sure that the module matches our photograph so that it will fit the footprint on the PCB. To prepare the module for the Explore 100, you need to solder a 4-pin header to the underside of the module at one end and a 6-pin header at the other end. Some modules come with a pin header soldered to the top of the module and that will need to be removed first. With the pin headers in place, it’s then just a case of plugging the module into the socket and running the configuration commands listed later in this article. Real-time clock module This is the RTC module that the Explore 100 is designed to use. It employs the Maxim/Dallas DS3231 which can keep the time to better than ±2ppm and its battery backup facility will retain the time during power outages. Note that the existing pin header has to be removed and two straight pin headers soldered to the underside of the PCB at both ends of the module. The Explore 100 has provision for a real time clock (RTC) module. This is optional but we strongly recommend it, since without it, the time setting of the Micromite Plus will be lost on power-up or reset. Use a module that’s based on the Maxim DS3231 IC as these are accurate and low in cost. They are available from the SILICON CHIP Online Store or online from places like eBay, Al- Display mounting If you are planning on using a 5-inch display, you should solder a 40-pin dual-row female header socket on the underside of the board at the position marked CON9 (see photo). Then, the Explore 100 can mount on the back of the panel using either four M3 x Table 1: Resistor Colour Codes o o o o o o No.   2   1   1   4   1 82  Silicon Chip Value 10kΩ 3.3kΩ 1kΩ 470Ω 10Ω 4-Band Code (1%) brown black orange brown orange orange red brown brown black red brown yellow violet brown brown brown black black brown 5-Band Code (1%) brown black black red brown orange orange black brown brown brown black black brown brown yellow violet black black brown brown black black gold brown siliconchip.com.au 12mm tapped spacers and eight M3 x 6mm machine screws, or four 12mm untapped spacers and four M3 x 16mm machine screws and nuts. The Explore 100 will also plug directly into a 4.3-inch or 7-inch display but the mounting holes for the display will not line up. If you want to use one of these displays, a better solution would be to mount the display panel separately from the PCB and then use a 40-way ribbon cable fitted with IDC connectors to join them. If you are using a ribbon cable, you will need to use a 40-pin male header plug for CON9. Incidentally, the required cable is the same as the old IDE hard disk cables used in old PCs, so you might already have a suitable cable ready to go. This cable should be as short as possible, ideally under 120mm. This is because the LCD panel can draw a lot of current (up to 750mA) and a large voltage drop in the ground wire can upset the logic levels seen by the LCD and the Micromite. Testing & fault-finding The test procedure described in the August 2016 issue for the Explore 64 also applies to the Explore 100, so we’ll just summarise the steps required. First, if not already programmed, the microcontroller must be programmed with the Micromite Plus firmware using a PIC32 programmer such as the PICkit 3. You then connect a USB-toserial converter to the console (see August issue) and check that you can get the MMBasic command prompt. If you do not see this prompt, the fault could be with the Micromite or your connection to the console. First measure the current drawn by the Ex- Fig.4: a nice feature of the Micromite Plus is the in-built program editor. This can edit a program in one session and its usage will be familiar to anyone who has used a standard editor (eg, Notepad in Windows). As shown, it colour-codes your program, with keywords in cyan, numbers in pink, comments in yellow and so on. plore 100 without the display or any Click boards, etc attached. It should be 90-100mA after IC1 has been correctly programmed with the Micromite Plus firmware. Anything greatly more or less will indicate that you have a problem. For example, a current drain of less than 15mA indicates that the MM­Basic firmware has not been loaded or is not running. In Pt.1, we went through the faultfinding steps in detail but essentially, you need to check that the correct power voltages are where you expect to see them, that the 10µF SMD capacitor (connected to pin 85) is present and correct, the crystal and its associated capacitors are correct and that all of IC1’s pins have been correctly soldered. Also, make sure that you have properly programmed the firmware. If the current drain is about right, then the fault is almost certainly with the USB-to-serial converter that you are using and its connections to the Explore 100. Again, refer to the August issue for the fault-finding procedure. Configuring the touch-screen Micromite Plus features can be enabled or disabled via OPTION commands which are saved in nonvolatile memory inside the chip and automatically re-applied on start-up. These commands must be entered via the console (serial or USB). With the command prompt dis- The Explore 100 is designed to work with LCD panels that use the SSD1963 display controller which range in size from 4.3-inch (diagonal) to 8-inch. The mounting holes and physical dimensions of the PCB are designed to match the 5-inch version of this display. The PCB mounts onto the back of the display with four spacers, one at each corner, which creates a single rigid assembly. siliconchip.com.au October 2016  83 As explained in the text, if you move the 0Ω resistor from position “LED_A” to “1963_PWM” you will be able to control the display’s brightness in 1% steps. This photograph shows the back of a 5-inch display but the other display sizes each have a similar set of jumper positions. played in the terminal emulator window, the first step is to configure the display. Enter the following command at the prompt: OPTION LCDPANEL SSD1963_5, LANDSCAPE, 48 This tells the Micromite that a 5-inch display is connected in landscape orientation and that pin 48 is used for backlight control. You have other options for the LCD panel size and orientation and these were listed in Pt.1. You can now test the LCD panel by entering the command: GUI TEST LCDPANEL This will continuously draw a sequence of overlapping coloured circles. To terminate the test, press the space bar. The next step is to configure the touch interface. Even if you are not going to use the touch facility in your programs, you will still need to set it up. That’s because the touch controller will interfere with access to the SD card if it is physically present but not configured. To set this up, enter the following command: OPTION TOUCH 1, 40, 39 This specifies that pin 1 is used for the touch controller’s chip select line, that pin 40 is used for the IRQ (interrupt request) signal and that pin 39 controls the buzzer. The touch sensing then needs to be calibrated and this is done with the following command: GUI CALIBRATE The screen will display a target in the top left corner. Using a pointy but blunt stylus, press on the exact centre of the target. After a second, the display will blank and then present the next target on the top right. Work around all four corners in this manner to calibrate the display. When you have finished, the Micromite should respond with “Done. No errors” or you might get a message indicating that the calibration was not accurate. You can ignore this if you wish but it would be better to redo the calibration, taking more care the second time. You can test the touch feature with the command: GUI TEST TOUCH This will blank the LCD and when you touch it, the Micromite will draw a dot at the location that it has determined you touched. If your calibration was accurate, the dot should appear directly under the spot that you touched. Press the spacebar on Two Explore 100 PCB Versions As noted last month, the Explore 100 PCB was designed by Graeme Rixon of Dunedin, NZ – see www.rictech. nz/micromite-products The PCB sold by SILICON CHIP is virtually identical to this board, the main difference being that we’ve added an on-board micro-SD card socket (CON14). It’s linked directly to the original SD card header on the PCB (CON10). The SILICON CHIP PCB can also 84  Silicon Chip accept either a DC power socket or a micro-USB socket for CON1, whereas the alternative PCB now has provision for a DC socket only (in place of the original micro-USB socket). Finally, note that the PCB shown in the photos is a prototype and the final version differs in a few respects. In particular, the earlier version did not include Mosfet Q1 in the supply line to provide protection against reversed supply polarity. the console’s keyboard to return to the command prompt. Configuring the SD card The next step is to configure the Explore 100 to use the SD card socket that’s mounted on the LCD panel. The required command is: OPTION SDCARD 47 This specifies that pin 47 is connected to the chip select signal. Alternatively, if you are using the on-board microSD card socket or the alternative SD card pin header (CON10), the chip select will be pin 52 instead. The microSD card socket and CON10 have pin 53 connected to the Card Detect switch, so you can also specify this if desired. CON10 also provides a connection to pin 17 for the Write Protect/ read-only (WP) pin, if used. Refer to the circuit and to the “Micromite Plus Addendum” at www.siliconchip.com. au/Shop/6/2907 for more details, To test the SD card, use the FILES command which will list all the files and directories on the card. During testing, we discovered a strange issue where some SD cards would not respond and further, they disabled the touch controller on the LCD panel, requiring a power cycle to recover. It is not obvious if the issue is with the LCD panel, the SD card or the firmware but the solution is to use another SD card. If we subsequently discover that this can be fixed with changes to the firmware, we will release an updated version so it would be worth checking the author’s website (http://geoffg.net/ micromite.html) from time to time if you run into this problem. If you have installed a a real time clock (RTC), this also must be made known to MMBasic. The command to do this is: OPTION RTC 67, 66 The command defines the I/O pins used by the RTC and instructs MM­ Basic to automatically get the correct time from the RTC on power-up or restart. You then need to set the time in the RTC, as follows: RTC SETTIME year, month, day, hour, min, sec Note that the time must be in 24hour notation. Self-contained computer set-up Before you can use the Micromite siliconchip.com.au Plus as a self contained computer, you will need to run some more configuration commands. The first is to tell the Micromite Plus to echo all console output to the LCD panel. The command to do this is: OPTION LCDPANEL CONSOLE Following this command, you should see the command prompt (>) appear on the LCD panel. If you now try typing something on your terminal emulator, you will see that these keystrokes are echoed on the LCD screen. Next, you need to tell the Micromite Plus that a PS/2 keyboard is connected using the following command: OPTION KEYBOARD US At this point you should be able to type something on the keyboard and see the result on the LCD screen. For example, try entering PRINT 1/7 and MMBasic should display 0.142857. When you set up the keyboard, you also have the choice of a number of different keyboard layouts. The command above specifies the US layout which is common in Australia and New Zealand but other layouts that can be specified are United Kingdom (UK), French (FR), German (GR), Belgium (BE), Italian (IT) or Spanish (ES). All these configurations are saved in non-volatile (flash) memory and will be automatically recalled on powerup or reset. Now disconnect the serial console and cycle the power. The unit will start up and display the MMBasic banner and copyright notice on the LCD, followed by the command prompt. You might wonder if the USB interface requires setting up but this is not necessary. The Micromite constantly monitors the USB socket and if it detects that it is connected to a host, it will automatically change its configuration to suit. Further options Some of the above configuration commands have additional options. These are not important but we list them here in case you want to experiment with them. The command for directing the console output to the LCD panel has four optional parameters. The full command is: OPTION LCDPANEL CONSOLE font, fc, bc, blight • “font” is the font to be used on siliconchip.com.au Fig.5: Explore 100 I/O Pin Allocations (CON8) Pin No. Ground Pin No. 97 5V 5V Output 96 5V 3.3V Output (200mA max.) 95 5V Count - Wakeup - IR - ANA 78 92 5V ANA 77 91 5V Count - ANA 76 90 5V ANA 44 88 5V - COM1 Rx COM1 Enable - ANA 43 81 5V - Count ANA 41 80 5V ANA 35 79 5V - PWM 1C Count - ANA 34 74 5V - PWM 1A ANA 33 72 5V – SPI OUT (MOSI) ANA 32 71 5V – SPI IN (MISO) COM3 Rx - ANA 26 70 5V – SPI Clock COM3 Tx - ANA 25 68 5V – PWM 1B COM1 Tx - ANA 24 67 5V - I2C DATA COM2 Rx - ANA 22 66 5V - I2C CLOCK ANA 21 61 5V COM2 Tx - ANA 20 60 5V ANA 14 59 5V (1) Pin No. refers to the number used in MMBasic to identify an I/O pin. (2) All pins are capable of digital input/output and can be used as an interrupt pin. (3) ANA means that the pin can be used as an analog input. (4) 5V means that the pin is 5V input tolerant. (5) COUNT means that the pin can be used for counting or frequency/period measurement. power-up. The Micromite Plus has five suitable fonts built in and numbered 1 to 5, with the larger numbers designating a larger-sized font. If the font is not specified then it will use font number #2. • “fc” and “bc” are the default foreground and background colours to be used on power-up. If you like yellow letters on a blue background (ugh), this is how you do it. Refer to the MMBasic user manual for details on the RGB() function that can be used to specify colours. • “blight” is the LCD brightness setting to be used on power-up. By default, the Micromite Plus will set the LCD’s backlight to full brightness but this can consume a lot of power (up to 500mA). Reducing it will only make a small difference to the perceived brightness but will considerably cut the display’s power consumption. The backlight’s power requirement can be important if you are building a portable computer using the Micromite Plus. Setting the brightness to one third (ie, “blight” set to 33) will almost triple the battery life while still being bright enough for normal use. LCD backlight The LCD panels used with the Explore 100 have two methods of regulating the backlight intensity. Both methods use a pulse width modulated (PWM) signal to rapidly switch the backlight on and off. The first requires the Micromite to generate this signal on the pin marked “LED_A” on the LCD’s interface connector. The second requires the Micromite to send a command to the SSD1963 display controller, requesting it to generate the required PWM signal. Either will work but the advantage of using the SSD1963 to do it is that it can vary the brightness with a finer degree of resolution (1% steps), whereas the Micromite-generated signal has a October 2016  85 der pads marked “LED-A” to the pair marked “1963_PWM”. Fig.6: Click Board Pin Assignments Click Board 1 Socket ANA Pin No. 23 Programming the I/O pins Pin No. 82 5V – PWM 2A 29 8 5V 28 26 COM3 Rx SPI Clock – 5V 70 25 COM3 Tx SPI In (MOSI) – 5V 71 66 5V – I2C Clock SPI Out (MOSI) – 5V 72 67 5V – I2C Data 3.3V 5V Ground Ground Click Board 2 Socket ANA 27 9 5V – PWM 2B 73 7 5V 5V 69 26 COM3 Rx SPI Clock – 5V 70 25 COM3 Tx SPI In (MOSI) – 5V 71 66 5V – I2C Clock SPI Out (MOSI) – 5V 72 67 5V – I2C Data 3.3V 5V Ground Ground (1) Pin No. refers to the number used in MMBasic to identify an I/O pin. (2) All pins are capable of digital input/output and can be used as an interrupt pin. (3) ANA means that the pin can be used as an analog input. (4) 5V means that the pin is 5V input tolerant. (5) COUNT means that the pin can be used for counting or frequency/period measurement. If you want to develop additional circuitry for the Explore 100 on a breadboard, you can use an adapter board such as this unit. Originally designed to suit the Raspberry Pi, it can be plugged into a standard solderless breadboard and can be connected via a 40-way cable. Photo courtesy banggood.com coarse control (5% steps). The difference is not normally noticeable but it can be important if you want to smoothly vary the brightness up or down for a special effect. By default, the LCD panel will be configured for the Micromite control 86  Silicon Chip but you can change it with a soldering iron. As shown in one of the accompanying photos, the LCD panel will have an area on its PCB marked “Backlight Control”. To use the SSD1963 for brightness control, the 0Ω resistor should be moved from the pair of sol- Fig.5 shows the pin allocations for CON8, the 40-pin I/O connector. Each pin can be independently set as an input or an output and any pin can generate an interrupt to the running program on a rising or falling signal, or on both. Note that the I2C, SPI and COM3 serial interfaces are shared with the Click boards, if one of these is installed. The connection between a Click board and the Explore 100 is via two eight-pin headers which carry the three communications interfaces (I2C, SPI and serial), some general-purpose signals (analog, PWM, interrupt, etc) and 3.3V and 5V power. The Click boards require either a 3.3V or 5V power supply and the Explore 100 supplies both. In addition, the outputs from the Click boards connect to 5V-tolerant inputs on the PIC32 so you can use 3.3V or 5V click boards without concern. Fig.6 shows the I/O pin allocations for the two Click board sockets. The I2C, SPI and serial buses are common between the two sockets while the other signals (analog, PWM, etc) are separate. As previously mentioned, the PCB includes a set of solder pads which can be used to reverse the serial signals used for the Click boards. These are marked “Click TX/RX” and normally you should jumper the solder pads marked on the silk screened with brackets. However, there is a chance that some Click boards will have their transmit (Tx) and receive (Rx) signals swapped and you can accommodate these by moving the solder blob to the other solder pads. When it comes to programming for the Click boards, it is normally a case of consulting the data sheets for the device on the board. MikroElektronika often offer one or more example programs written in their mikroBasic language and these can be converted to MMBasic for the Explore 100. Another feature of the PCB is the two general-purpose indicator LEDs described earlier. The yellow LED (LED3) is controlled by the Micromite pin 38 and red LED2 by pin 58. Note that the BASIC program needs to set the output low to illuminate these LEDs. On power-up, these pins will be in a high impedance state so the LEDs will SC default to off. siliconchip.com.au