Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use PICAXE-20X2: Examples, Pinouts, and Specs

Image of PICAXE-20X2
Cirkit Designer LogoDesign with PICAXE-20X2 in Cirkit Designer

Introduction

The PICAXE-20X2 is a versatile microcontroller designed for educational and hobbyist projects. It features 20 pins, including both analog and digital I/O, and is programmable using a simple BASIC-like language. This makes it an excellent choice for beginners while still offering advanced functionality for experienced users. The PICAXE-20X2 is widely used in robotics, automation, and sensor-based projects due to its ease of use and flexibility.

Explore Projects Built with PICAXE-20X2

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino Mega 2560-Based Smart Home Control System with LCD Display and Flame Sensor
Image of Copy of schoolproject (1): A project utilizing PICAXE-20X2 in a practical application
This circuit is a multi-functional embedded system featuring an Arduino Mega 2560 microcontroller that interfaces with a 4x4 membrane keypad, a 20x4 I2C LCD, an 8x8 LED matrix, a DS3231 RTC module, a passive buzzer, and a KY-026 flame sensor. The system is powered by a 5V PSU and is designed to provide real-time clock functionality, user input via the keypad, visual output on the LCD and LED matrix, and flame detection with an audible alert.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered Health Monitoring System with Nucleo WB55RG and OLED Display
Image of Pulsefex: A project utilizing PICAXE-20X2 in a practical application
This circuit is a multi-sensor data acquisition system that uses a Nucleo WB55RG microcontroller to interface with a digital temperature sensor (TMP102), a pulse oximeter and heart-rate sensor (MAX30102), and a 0.96" OLED display via I2C. Additionally, it includes a Sim800l module for GSM communication, powered by a 3.7V LiPo battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Nano Controlled LCD Interface with Pushbutton Inputs
Image of MacroDisplay: A project utilizing PICAXE-20X2 in a practical application
This circuit features a Nano 3.0 ATmega328P microcontroller connected to a 16x2 I2C LCD display for output. Two pushbuttons, each with a 10k Ohm pull-down resistor, are connected to digital pins D2 and D3 of the microcontroller for input. The LCD and pushbuttons are powered by the 5V output from the microcontroller, and all components share a common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
ATMEGA328 Battery-Powered LED Blinker with FTDI Programming
Image of Homemade Arduino using ATmega328: A project utilizing PICAXE-20X2 in a practical application
This circuit is a basic microcontroller setup using an ATMEGA328, powered by a 5V battery, and includes an FTDI programmer for serial communication. It features a pushbutton for reset functionality and two LEDs controlled by the microcontroller, with one LED blinking at a 1-second interval as programmed.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with PICAXE-20X2

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Copy of schoolproject (1): A project utilizing PICAXE-20X2 in a practical application
Arduino Mega 2560-Based Smart Home Control System with LCD Display and Flame Sensor
This circuit is a multi-functional embedded system featuring an Arduino Mega 2560 microcontroller that interfaces with a 4x4 membrane keypad, a 20x4 I2C LCD, an 8x8 LED matrix, a DS3231 RTC module, a passive buzzer, and a KY-026 flame sensor. The system is powered by a 5V PSU and is designed to provide real-time clock functionality, user input via the keypad, visual output on the LCD and LED matrix, and flame detection with an audible alert.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Pulsefex: A project utilizing PICAXE-20X2 in a practical application
Battery-Powered Health Monitoring System with Nucleo WB55RG and OLED Display
This circuit is a multi-sensor data acquisition system that uses a Nucleo WB55RG microcontroller to interface with a digital temperature sensor (TMP102), a pulse oximeter and heart-rate sensor (MAX30102), and a 0.96" OLED display via I2C. Additionally, it includes a Sim800l module for GSM communication, powered by a 3.7V LiPo battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of MacroDisplay: A project utilizing PICAXE-20X2 in a practical application
Arduino Nano Controlled LCD Interface with Pushbutton Inputs
This circuit features a Nano 3.0 ATmega328P microcontroller connected to a 16x2 I2C LCD display for output. Two pushbuttons, each with a 10k Ohm pull-down resistor, are connected to digital pins D2 and D3 of the microcontroller for input. The LCD and pushbuttons are powered by the 5V output from the microcontroller, and all components share a common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Homemade Arduino using ATmega328: A project utilizing PICAXE-20X2 in a practical application
ATMEGA328 Battery-Powered LED Blinker with FTDI Programming
This circuit is a basic microcontroller setup using an ATMEGA328, powered by a 5V battery, and includes an FTDI programmer for serial communication. It features a pushbutton for reset functionality and two LEDs controlled by the microcontroller, with one LED blinking at a 1-second interval as programmed.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Robotics and motor control
  • Sensor interfacing and data logging
  • Home automation systems
  • Educational tools for learning microcontroller programming
  • Prototyping and hobbyist projects

Technical Specifications

The PICAXE-20X2 offers a range of features and capabilities that make it suitable for a variety of applications. Below are the key technical details:

General Specifications

  • Operating Voltage: 2.1V to 5.5V
  • Clock Speed: 8 MHz (default), up to 64 MHz with internal resonator
  • I/O Pins: 18 (configurable as digital or analog)
  • Programming Language: BASIC-like syntax
  • EEPROM: 256 bytes
  • RAM: 128 bytes
  • Program Memory: 4096 lines of code
  • Communication Protocols: Serial, I2C, SPI
  • ADC Resolution: 10-bit (on analog-capable pins)

Pin Configuration and Descriptions

The PICAXE-20X2 has 20 pins, each with specific functions. Below is the pinout and description:

Pin Number Pin Name Function
1 VSS Ground (0V)
2 C.5 Digital I/O
3 C.4 Digital I/O
4 C.3 Digital I/O
5 C.2 Digital I/O
6 C.1 Digital I/O
7 C.0 Digital I/O
8 B.7 Digital I/O
9 B.6 Digital I/O
10 B.5 Digital I/O
11 B.4 Digital I/O
12 B.3 Digital I/O
13 B.2 Digital I/O
14 B.1 Digital I/O
15 B.0 Digital I/O
16 A.0 Analog/Digital I/O
17 A.1 Analog/Digital I/O
18 A.2 Analog/Digital I/O
19 A.3 Analog/Digital I/O
20 VDD Power Supply (2.1V to 5.5V)

Usage Instructions

The PICAXE-20X2 is easy to use and program, making it ideal for beginners. Below are the steps to get started and important considerations for using the microcontroller effectively.

Getting Started

  1. Power the Microcontroller:

    • Connect the VDD pin to a power source (2.1V to 5.5V).
    • Connect the VSS pin to ground (0V).
  2. Programming the PICAXE-20X2:

    • Use the PICAXE Programming Editor software (available for free).
    • Connect the microcontroller to your computer using a PICAXE USB programming cable.
    • Write your program in the BASIC-like language and upload it to the microcontroller.
  3. Connecting Peripherals:

    • Use the I/O pins to connect sensors, actuators, or other components.
    • Configure pins as input or output in your program.

Example Code

Below is an example of a simple program to blink an LED connected to pin B.0:

' Blink an LED connected to pin B.0
' The LED will turn on for 1 second and off for 1 second in a loop.

main:               ' Define the main program loop
  high B.0          ' Turn on the LED (set pin B.0 high)
  pause 1000        ' Wait for 1 second (1000 milliseconds)
  low B.0           ' Turn off the LED (set pin B.0 low)
  pause 1000        ' Wait for 1 second
  goto main         ' Repeat the loop

Important Considerations

  • Power Supply: Ensure the voltage supplied to the VDD pin is within the specified range (2.1V to 5.5V).
  • Pin Configuration: Configure pins correctly as input or output in your program to avoid damage to the microcontroller or connected components.
  • Decoupling Capacitor: Place a 0.1 µF capacitor between VDD and VSS to stabilize the power supply.

Troubleshooting and FAQs

Common Issues and Solutions

  1. The microcontroller is not responding to the program upload:

    • Ensure the programming cable is securely connected.
    • Verify that the correct COM port is selected in the programming software.
    • Check the power supply to the microcontroller.
  2. The connected components are not functioning as expected:

    • Double-check the wiring and connections.
    • Ensure the pins are configured correctly in the program (input/output).
    • Verify that the components are compatible with the operating voltage of the PICAXE-20X2.
  3. The microcontroller resets unexpectedly:

    • Check for power supply fluctuations or noise.
    • Add a decoupling capacitor between VDD and VSS.

FAQs

Q: Can the PICAXE-20X2 interface with I2C devices?
A: Yes, the PICAXE-20X2 supports I2C communication and can act as a master or slave device.

Q: How many analog inputs does the PICAXE-20X2 have?
A: The PICAXE-20X2 has 4 analog-capable pins (A.0 to A.3) with 10-bit resolution.

Q: What is the maximum clock speed of the PICAXE-20X2?
A: The PICAXE-20X2 can operate at up to 64 MHz using its internal resonator.

Q: Is the PICAXE-20X2 suitable for battery-powered projects?
A: Yes, its low operating voltage and power consumption make it ideal for battery-powered applications.