PICAXE-20M2 microcontroller
Product Details
A compact but powerful, PICAXE microcontroller. Very popular in education due to its low cost and small size, but also very popular in a wide range of hobbyist projects.
This chip supports up to 18 inputs/outputs with 11 analogue/touch sensor channels.
All M2 series parts support enhanced features such as configurable i/o pins, parallel tasks, ring tone music and touch sensor inputs.
Click here for more M2 series information.
For more details see the What is PICAXE and PICAXE Pinout pages.
The PICAXE-20M2 replaces the older PICAXE-20M chips.
Specification
Pack size | 40x10x15mm |
Pack weight | 2.9g |
The following table gives a brief summary of the various PICAXE chips.
For a more detailed comparison please see the PICAXE manuals and pinout diagrams.
Feature | 08M2 | 14M2 | 18M2 | 20M2 | 20X2 | 28X2 | 40X2 |
Memory Capacity (bytes) | 2048 | 2048 | 2048 | 2048 | 4096 | 4096 | 4096 |
RAM (bytes) | 128 | 512 | 256 | 512 | 256 | 1280 | 1280 |
Byte Variables (bytes) | 28 | 28 | 28 | 28 | 56 | 56 | 56 |
Input/Outputs Pins | 6 | 12 | 16 | 18 | 18 | 22 | 33 |
ADC/Touch Pins | 3 | 7 | 10 | 11 | 11 | 16 | 27 |
Max. Freq. (MHz) | 32 | 32 | 32 | 32 | 64 | 64 | 64 |
Serial In/Out | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
Infrared In/Out | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
I2C | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
Tune (ring tones) | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
Parallel Tasks | 4 | 8 | 4 | 8 | 1 | 1 | 1 |
Program Slots | 1 | 2 | 2 | 2 | 1 | 4 | 4 |
The same software, BASIC language and USB download cable is shared between all the PICAXE chips.
Resources
PICAXE-20M2 Microcontroller Datasheet | PDF Datasheet |
M2 Series Product Summary | PDF Datasheet |
Video
Revision History
Current 20M2 production firmware is version 8.A
Known Issues:
ISSUE - PAUSE DOES NOT WORK CORRECTLY DURING INTERRUPT ON A MULTI-TASK PROGRAM
To workaround this issue use the command 'pause_int' instead of 'pause' within
an interrupt in a multi (parallel) task program. Single task programs work correctly.
ISSUE - VERY FIRST LINE OF INTERRUPT: ROUTINE SHOULD NOT USE VARIABLES (LET, INC, DEC, IF VAR = etc.)
A 'inc' or 'dec' or certain expressions may not work correctly if it is used as the very first line in
the 'interrupt:' subprocedure.
To workaround this issue add another command, such as 'pause 1', before the let/if command is used within 'interrupt:'
ISSUE - PWMOUT BIT1 IS ALWAYS SET TO 0
Bit 1 of the 10 bit duty value value is always written as 0.
To workaround this issue use 'pwmduty' or see https://www.picaxeforum.co.uk/showthread.php?27900
ISSUE - USE OF THE SERRXD OR READINTERNALTEMP COMMAND SETS PIN C.5 TO INPUT (IF CURRENTLY OUTPUT)
A 'serrxd' or 'readinternaltemp' command will incorrectly make the pin C.5 an input.
To workaround this issue use pin C.5 as an input, or issue a 'output C.5' as the next command.
ISSUE - USE OF THE CALIBADC COMMAND SETS PIN C.7 TO ANALOGUE INPUT (IF CURRENTLY OUTPUT)
A 'calibadc' command will incorrectly make the pin C.7 an analogue input.
To workaround this issue use pin C.7 as an analogue input, or issue a 'output C.7' as the next command.
Alternately to convert back to a digital input use 'adcsetup = 0' as the next command.
ISSUE - CALIBADC IS UNSTABLE AT M32 CLOCK FREQUENCY
To workaround this issue use two consecutive 'calibadc' commands to give time for the Vref to settle.
ISSUE - CALIBADC MAY BE UNSTABLE AFTER FVRSETUP WITH VALUE OTHER THAN 1.024
Calibadc requires an internal 1.204 Vref. If other Vref value is currently in use (from previous fvrsetup) the
first calibadc value read may be unstable.
To workaround this issue use two consecutive 'calibadc' commands to give time for the Vref to settle.
ISSUE - NAP 1 CAUSES RESET AT K31 CLOCK FREQUENCY
To workaround this issue do not use 'nap 1' after 'setfreq k31'
All other values (e.g. 'nap 2') work correctly.
Share