Practical_Electronics-May_2019

([email protected]) #1

Small, cheap and powerful – Part 1


T


his month, we go back to
basics, looking at Microchip’s
smallest and most feature-lim-
ited processor, the PIC10F200 family.
This is a tiny processor available in a
hobbyist-friendly eight-pin DIL package
or even a six-pin SMD (surface mount
device) part not much bigger than a
speck of dust, as can been seen in Fig.1.
In this series of articles, we will use
both types of packages. Example pro-
jects will be created on a range of board
types, from breadboard and Veroboard
to tiny PCBs using the SMD version.


Minimalist PIC features
So, what does this device consist of? It’s
offered in a range of packages, but we
will focus on the two hobbyist friend-
ly parts – the eight-pin PDIP (plastic
dual in line package) and the six-pin
surface mount, shown in Fig.1. Both
packages offer the same functionality



  • on the eight-pin variant, two pins are
    not connected.
    These devices can operate between
    2.0V and 5.5V, which makes them ideal
    for use with two or three alkaline cells
    without the additional cost of a volt-
    age regulator. Current consumption
    is 250μA at 2.0V, up to 1mA at 5.5V.
    The processor runs at a fi xed frequen-
    cy of 4MHz derived from an internal
    RC (resistor-capacitor) oscillator. An
    RC oscillator is normally very inac-
    curate, but each device is calibrated
    during manufacture and a calibration


‘Wait’, I hear you say. ‘Is that all? What
about I^2 C bus, SPI bus, UART?’ All of
these functions can be implemented
using ‘bit bashing’ of pins. If the protocol
that runs above those interface require-
ments is not too demanding, then there
is a chance the PIC10F will be capable of
achieving them. Remember, if your needs
are greater, simply choose a more power-
ful processor. I once asked a Microchip
account manager how many processor
SKUs they had. He went away for a bit
and then came back saying, ‘I gave up at
17,000’. The PIC10F family simply rep-
resents the absolute lowest-cost options
available from them, and we are going
to push those limits – hard!
I^2 C and SPI bus communications are
serial protocols based on ‘handshakes’
between devices to pass data. They
do not rely on accurate clock signals
or accurate timing of each data bit.
UART communication, however, does.
With the calibration data provided by
Microchip during each device’s manu-
facture, the device’s clock can be set to
an accuracy of 1% – enough for UART
communication at reasonable speeds.
Given this addition, proved by Micro-
chip, the devices capabilities can be
considered to be:

correction value is programmed into
a word in Flash memory. It’s amazing
that they can afford the cost of bespoke
timing correction given the low cost of
the chip – such is the power and effi -
ciency of the automation machines used
during chip manufacturing.
The device has an active standby
mode – sleep – where it can remain in-
active with it’s processor clock turned
off, but can monitor for transitions on
GPIO input pins and wake immediately.
In this mode the processor consumes
just 200nA – a fi gure that is as close to
nothing as you can get!
The processor is offered in four var-
iants, or ‘SKU’ varieties, the standard
industry term. The features included
in each variant are shown in Table 1.
Of the four variants we will focus on
the PIC10F202; the most limited fea-
ture set, but with a little more memory
to give us some fl exibility. To summa-
rise, the capabilities of the processor
we are playing with are:
 512 words of code, 24 bytes of RAM
 Internal oscillator calibrated to 1%
 8-bit timer
 4 I/O pins
 Wake on pin change
 Very low power consumption

Mike Hibbett’s column for PIC project enlightenment and related topics


Fig.1. The PIC six-pin SMD package –
‘smart dust’!


Feature PIC10F200 PIC10F202 PIC10F204 PIC10F206

Maximum frequency of operation 4 4 4 4
Flash program memory 256 512 256 512

Data memory (bytes) 16 24 16 24

Timer module(s) TMR0 TMR0 TMR0 TMR0

Wake-up from sleep on pin change Ye s Ye s Ye s Ye s

Comparators 0 0 1 1

I/O pins 3 3 3 3

Input-only pins 1 1 1 1

Internal pull-ups Ye s Ye s Ye s Ye s

In-circuit serial programing Ye s Ye s Ye s Ye s

Number of instructions 33 33 33 33

Table 1. Feature sets of the PIC10F200 family
Free download pdf