Silicon ChipNew 8-bit PICs from Microchip - April 2022 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Writing clealy and concisely
  4. Feature: Geiger Counters and Radiation by Dr David Maddison
  5. Project: 500W Power Amplifier, Part 1 by John Clarke
  6. Subscriptions
  7. Feature: The History of Transistors, Pt2 by Ian Batty
  8. Project: Railway Semaphore Signal by Les Kerr
  9. Feature: ElectroneX by AEE
  10. Project: Update: SMD Test Tweezers by Tim Blythman
  11. Feature: New 8-bit PICs from Microchip by Tim Blythman
  12. Feature: Dick Smith Contest Results by Nicholas Vinen
  13. Serviceman's Log: Gaining a superpower, at least temporarily by Dave Thompson
  14. PartShop
  15. Project: Capacitor Discharge Welder, Pt2 by Phil Prosser
  16. Vintage Radio: Monopole D225 radio by Associate Professor Graham Parslow
  17. Market Centre
  18. Advertising Index
  19. Notes & Errata: Dual Hybrid Power Supply, February 2022; Solid-State Tesla Coil, February 2022; Mysterious Mickey Oz, January 2022; Remote Control Range Extender, January 2022
  20. Outer Back Cover

This is only a preview of the April 2022 issue of Silicon Chip.

You can view 47 of the 120 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 "500W Power Amplifier, Part 1":
  • 500W Amplifier Module PCB [01107021 RevD] (AUD $25.00)
  • Hard-to-get parts for the 500W Amplifier (Component, AUD $180.00-200.00)
  • Parts collection for the 500W Amplifier (Component, AUD $235.00-250.00)
  • 500W Amplifier Module PCB pattern (PDF download) [01107021] (Free)
Articles in this series:
  • Fan Controller & Loudspeaker Protector (February 2022)
  • Amplifier Clipping Indicator (March 2022)
  • 500W Power Amplifier, Part 1 (April 2022)
  • 500W Power Amplifier, Part 2 (May 2022)
  • 500W Power Amplifier, Part 3 (June 2022)
Articles in this series:
  • The History of Transistors, part one (March 2022)
  • The History of Transistors, Pt2 (April 2022)
  • The History of Transistors, Pt3 (May 2022)
Items relevant to "Railway Semaphore Signal":
  • Model Railway Semaphore Signal control PCB [09103221] (AUD $2.50)
  • Model Railway Semaphore Signal blade PCB [09103222] (AUD $2.50)
  • PIC16F88-I/P programmed for the Model Railway Semaphore Signal [0910322A.HEX] (Programmed Microcontroller, AUD $15.00)
  • Firmware for the Model Railway Semaphore Signal [0910322A.HEX] (Software, Free)
  • Model Railway Semaphore Signal PCB patterns (PDF download) [09103221-2] (Free)
Items relevant to "Update: SMD Test Tweezers":
  • SMD Test Tweezers PCB set [04106211+04106212] (AUD $10.00)
  • PIC16F15214-I/SN programmed for the Improved SMD Test Tweezers [0410621B.HEX] (Programmed Microcontroller, AUD $10.00)
  • 64x32 white OLED screen (0.49-inch, 1.25cm diagonal) (Component, AUD $10.00)
  • Improved SMD Test Tweezers kit (Component, AUD $35.00)
  • Firmware for the Improved SMD Test Tweezers [0410621B.HEX] (Software, Free)
  • SMD Test Tweezers PCB patterns (PDF download) [04106211/2] (Free)
Items relevant to "Capacitor Discharge Welder, Pt2":
  • Capacitor Discharge Welder Power Supply PCB [29103221] (AUD $5.00)
  • Capacitor Discharge Welder Control PCB [29103222] (AUD $5.00)
  • Capacitor Discharge Welder Energy Storage Module PCB [29103223] (AUD $3.50)
  • IRFB7434(G)PBF‎ N-channel high-current Mosfet (Source component, AUD $5.00)
  • Hard-to-get parts & PCB for the Capacitor Discharge Welder Power Supply (Component, AUD $25.00)
  • Validation spreadsheets and updated drilling diagram for the CD Spot Welder (Software, Free)
  • Capacitor Discharge Welder PCB patterns (PDF download) [29103221-3] (Free)
Articles in this series:
  • Capacitor Discharge Welder, part one (March 2022)
  • Capacitor Discharge Welder, Pt2 (April 2022)

Purchase a printed copy of this issue for $11.50.

Working with the latest 8-bit PICs from Microchip seem to be releasing a new series of PICs virtually every year. We’re trying to keep up with them by using the latest devices in our designs, mainly because each new series offers better value than the last. Here is what we’ve found in switching to the latest series. W hile the current parts shortage makes things difficult, we always relish the opportunity to work with new parts and learn about their new features. In updating the SMD Test Tweezers (article starts on page 72), we’ve been using the PIC16F15214 and we’re also anticipating some fresh new parts being released later this year. The crisis strikes back With the electronics parts shortage showing no signs of easing, we found that the PIC12F1572 that we have used in a number of our designs were no longer available in the -I/SN variant, which is the SOIC package version [SN] specified for the industrial temperature range [I]. The -E/SN part (E = extended temperature range) variants are a drop-in substitute, although they are slightly more expensive. We got some of those while they were available. But soon, we couldn’t get either. We then noticed that there are also PIC12LF1572 variants, where the “LF” infix signifies a part designed for operation at lower voltages (not all PICs have LF variants). As we were powering many of these devices from 3V lithium coin cells, these parts were also suitable, so we grabbed some before they (quickly) became unavailable. The LF variants are suitable for use with our SMD Tweezers and Tiny LED Christmas Ornaments designs (November 2020; siliconchip.com.au/ Article/14636), both running from the previously mentioned coin cells. In fact, the LF parts have slightly lower current demands than the F parts, so they are a better choice in designs that don’t go over 3.6V, and are well suited to battery operation. Even so, we found ourselves 80 Silicon Chip struggling to get parts that we needed to supply kits for projects using the PIC12F1572 microcontrollers and their variants. As well as the Ornaments and SMD Tweezers, the Nano TV Pong (August 2021; siliconchip.com.au/ Article/14988) and Digital FX Unit (April & May 2021; siliconchip.com. au/Series/361) also use this or similar chips. As our stocks dwindled, we discovered that the newer PIC16F15213 was available, so we adapted the Xmas Ornament firmware to work on these chips and started supplying them with kits. The PIC16F15213 is much the same as the PIC16F15214 we’re using in the Improved SMD Test Tweezers, but with half the RAM and half the flash program memory. Even then, the simple program for the Ornaments only uses a small fraction of the PIC16F15213’s resources. The control firmware for the Nano TV Pong was written mostly in assembly language to allow it to be fast enough to generate a composite video signal in real time. Assembly language is more part-­ specific than the C language we normally use, so it is not so easily transferred to a different microcontroller. But by using the 16F15213s for the Xmas Ornaments, we were able to keep enough 12F1572s on hand. Having been exposed to a new 8-pin PIC series, whether we wanted to or not, we decided to see what we could do with it, and the Improved SMD Test Tweezers was the logical outcome. Return of the IDE The PIC16F152xx family is quite By Tim Blythman Australia's electronics magazine new, with the data sheet dated 2020. So you will need a fairly new version of the MPLAB X IDE to work with these parts and you will also need to install the correct DFP (device family pack), as well as a compiler. We’ve successfully used MPLAB X versions 5.40 and 5.50 with these parts. Note that these versions only support 64-bit processors on your computer, so you might have trouble working with these parts if you have an older computer. We’re using XC8 compiler v2.20 for the updated version of the Tweezers. The older v2.00 appears greyed out when the PIC16F15214 part is selected, while the newer v2.32 appears to be compatible. The device support list also indicates that the PICkit 3 can’t handle these parts either. We have been using an MPLAB Snap programmer and it appears that the PICkit 4 will also work. On that note, we should point out that programming these parts is blindingly fast; fast enough that you aren’t really sure the programmer has done anything! The PIC16F152xx family is described as an enhanced mid-range 8-bit microcontroller. The ‘enhanced’ designation mostly describes the processor core and instruction set, which have been designed to work with features of the C programming language. The enhanced core has been around a while, with parts like the PIC16F1455 (used in the Microbridge project from the May 2017 issue – siliconchip.com. au/Article/10648) having this feature. Still, the PIC16F152xx family appears to have a slightly newer generation of the enhanced core which lacks the OPTION register and thus also the OPTION opcode. Remarkably, the TRIS opcode (which was long ago siliconchip.com.au Silicon Chip Binders REAL VALUE A T $19.50* PLUS P&P Like most microcontrollers from Microchip, the PIC16F15214 comes in multiple different packages with only some of them shown above. marked as deprecated) is still around. The peripheral pin select (PPS) function allows certain digital peripherals to be mapped to different digital pins. It appears that for all PIC16F152xx parts with twenty or fewer pins, just about any digital peripheral (including PWM, timers, counters and serial communication) can be mapped to any digital pin. There are a few other novel features that we found while perusing the data sheet. The flash memory can now be partitioned with the MAP (memory access partition) settings. This allows certain parts of the flash memory to be allocated to various purposes. For example, regions can be marked as boot block, application block and storage area. If a storage area is marked, code cannot be run from that area, which is sensible if the area is used to store data which should not be executed as code. These devices lack an internal EEPROM, so the storage area is typically used to provide an equivalent place for non-volatile, infrequently changed data to be stored. Unlike EEPROM, it can only be erased a page at a time. The boot block and application block can both be separately write protected. A typical implementation for upgradeable firmware would provide for a write protected boot block and a writeable application block. Code in the boot block could be written to receive and modify firmware in the application block to upgrade the firmware. These restrictions only apply to code running on the actual chip and naturally, an external programmer is always able to make changes or erase the device. An internal high-frequency oscillator can provide a main system clock from 1MHz up to 32MHz (in powers of siliconchip.com.au two) and this can be changed dynamically during program operation by setting the OSCFRQ register. There is also a low-frequency oscillator which runs at a nominal 31.25kHz; this is used for the watchdog timer and can even be used as the main system clock, allowing the high-frequency oscillator to be completely shut down to save power. The PIC16F152xx family is an interesting group of parts. Despite only having the most basic of peripherals, they do have some useful processor features, and they are generally excellent value for money. Still, as we noted, you may need to upgrade your software and programmer to work with them. A new hope While reading the data sheet for the PIC16F15214, we came across a page describing a future PIC microcontroller family, the PIC16F171xx. Among other features, these will boast a 12-bit ADC (analog-to-digital converter) peripheral. That alone would add a noticeable boost in accuracy for our SMD Test Tweezers design. This family of devices should appear in mid-to-late 2022 (with the usual caveats about availability under the current circumstances). We will definitely try to get our hands on some, and will likely start using them in projSC ects in late 2022 or early 2023. The PIC16F17146-E/P is one of the upcoming 8-bit PICs from Microchip. It boasts a 12-bit differential ADC. Australia's electronics magazine Are your copies of SILICON CHIP getting damaged or dog-eared just lying around in a cupboard or on a shelf? Can you quickly find a particular issue that you need to refer to? Keep your copies safe, secure and always available with these handy binders These binders will protect your copies of S ILICON C HIP. They feature heavy-board covers, hold 12 issues & will look great on your bookshelf. H 80mm internal width H SILICON CHIP logo printed in gold-coloured lettering on spine & cover Silicon Chip Publications PO Box 139 Collaroy Beach 2097 Order online from www. siliconchip.com.au/Shop/4 or call (02) 9939 3295 and quote your credit card number. *See website for delivery prices. April 2022  81