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

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

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

Introduction

The PICAXE-28X2 is a versatile microcontroller from the PICAXE family, featuring 28 pins and designed to run programs written in the BASIC programming language. It is widely used in educational environments and hobbyist projects due to its ease of use, built-in features, and affordability. The PICAXE-28X2 supports analog inputs, digital outputs, serial communication, and other advanced functionalities, making it suitable for a variety of applications.

Explore Projects Built with PICAXE-28X2

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ATMEGA328 Battery-Powered LED Blinker with FTDI Programming
Image of Homemade Arduino using ATmega328: A project utilizing PICAXE-28X2 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
Arduino Mega 2560-Based Smart Home Control System with LCD Display and Flame Sensor
Image of Copy of schoolproject (1): A project utilizing PICAXE-28X2 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
Arduino Mega 2560-Controlled Stepper Motors with RFID Access and Traffic Light Indication
Image of Copy of test: A project utilizing PICAXE-28X2 in a practical application
This circuit controls two 28BYJ-48 stepper motors using A4988 stepper motor driver carriers, interfaced with an Arduino Mega 2560 microcontroller. It features an RFID-RC522 module for RFID reading, a 16x4 LCD display with I2C interface for user interaction, and a piezo speaker for audio feedback. Additionally, there is a traffic light module controlled by the Arduino, and a 48V to 5V converter to step down voltage for the logic levels. The power supply provides 12V to the motor drivers and is connected to a standard power outlet.
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-28X2 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

Explore Projects Built with PICAXE-28X2

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 Homemade Arduino using ATmega328: A project utilizing PICAXE-28X2 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
Image of Copy of schoolproject (1): A project utilizing PICAXE-28X2 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 Copy of test: A project utilizing PICAXE-28X2 in a practical application
Arduino Mega 2560-Controlled Stepper Motors with RFID Access and Traffic Light Indication
This circuit controls two 28BYJ-48 stepper motors using A4988 stepper motor driver carriers, interfaced with an Arduino Mega 2560 microcontroller. It features an RFID-RC522 module for RFID reading, a 16x4 LCD display with I2C interface for user interaction, and a piezo speaker for audio feedback. Additionally, there is a traffic light module controlled by the Arduino, and a 48V to 5V converter to step down voltage for the logic levels. The power supply provides 12V to the motor drivers and is connected to a standard power outlet.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Pulsefex: A project utilizing PICAXE-28X2 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

Common Applications and Use Cases

  • Robotics and automation projects
  • Educational tools for learning microcontroller programming
  • Sensor data acquisition and processing
  • Home automation systems
  • Prototyping and hobbyist electronics projects

Technical Specifications

The PICAXE-28X2 offers a range of features and capabilities that make it a powerful yet user-friendly microcontroller. Below are its key technical specifications:

Specification Details
Operating Voltage 3V to 5.5V
Clock Speed Up to 64 MHz (internal resonator)
Programming Language BASIC (PICAXE-specific dialect)
Number of I/O Pins 28 pins (16 digital I/O, 4 analog inputs, 8 configurable pins)
Memory 4096 program lines (flash memory)
Communication Protocols Serial (RS232), I2C, SPI
ADC Resolution 10-bit (on analog input pins)
PWM Outputs 4 channels
EEPROM 256 bytes
Power Consumption Low power mode available (nanoWatt technology)
Package Type DIP-28 (Dual Inline Package)

Pin Configuration and Descriptions

The PICAXE-28X2 has 28 pins, each with specific functions. Below is the pin configuration:

Pin Number Pin Name Function
1 VSS Ground (0V)
2 VDD Positive supply voltage (3V to 5.5V)
3 Serial In Serial programming input
4 Serial Out Serial programming output
5-12 C.0 - C.7 General-purpose I/O pins (digital or analog, depending on configuration)
13-16 B.0 - B.3 General-purpose I/O pins (digital or PWM outputs)
17-20 A.0 - A.3 Analog input pins (10-bit ADC resolution)
21-28 B.4 - B.7 General-purpose I/O pins (digital or communication protocols like I2C/SPI)

Usage Instructions

How to Use the PICAXE-28X2 in a Circuit

  1. Power Supply: Connect the VDD pin to a 3V-5.5V power source and the VSS pin to ground.
  2. Programming: Use the PICAXE programming cable to connect the Serial In and Serial Out pins to your computer. Write and upload your BASIC program using the PICAXE Editor software.
  3. I/O Configuration: Configure the pins as digital inputs, digital outputs, analog inputs, or communication pins based on your project requirements.
  4. Peripheral Connections: Connect sensors, actuators, or other peripherals to the appropriate pins. For example:
    • Analog sensors to A.0 - A.3
    • Digital devices to C.0 - C.7 or B.0 - B.7
    • PWM-controlled devices (e.g., motors) to B.0 - B.3

Important Considerations and Best Practices

  • Decoupling Capacitor: Place a 0.1 µF capacitor between VDD and VSS to stabilize the power supply.
  • Pull-Down Resistors: Use pull-down resistors on unused input pins to prevent floating states.
  • Programming Voltage: Ensure the programming voltage matches the microcontroller's operating voltage.
  • Pin Protection: Avoid exceeding the maximum voltage or current ratings for any pin to prevent damage.

Example Code for Arduino-like Functionality

Below is an example of a simple program to read an analog sensor and control an LED using the PICAXE-28X2:

' Define pin constants
symbol sensorPin = A.0    ' Analog input pin for the sensor
symbol ledPin = B.0       ' Digital output pin for the LED

main:
    do
        ' Read the analog value from the sensor
        readadc10 sensorPin, w0  ' Store the 10-bit ADC value in variable w0
        
        ' Check if the sensor value exceeds a threshold
        if w0 > 512 then
            high ledPin          ' Turn on the LED if the threshold is exceeded
        else
            low ledPin           ' Turn off the LED otherwise
        endif
        
        pause 100                ' Wait for 100 milliseconds
    loop

Troubleshooting and FAQs

Common Issues and Solutions

  1. The microcontroller does not respond to programming commands.

    • Ensure the programming cable is securely connected to the Serial In and Serial Out pins.
    • Verify that the PICAXE Editor software is configured for the correct COM port.
    • Check the power supply voltage and ensure it is within the 3V-5.5V range.
  2. Analog readings are unstable or incorrect.

    • Use a decoupling capacitor near the analog input pins to reduce noise.
    • Ensure the sensor connected to the analog pin is functioning correctly.
  3. The microcontroller resets unexpectedly.

    • Check for loose connections in the power supply or ground.
    • Avoid drawing excessive current from the I/O pins.
  4. PWM outputs are not working as expected.

    • Verify that the pins used for PWM are correctly configured in the program.
    • Ensure the connected device (e.g., motor or LED) is compatible with PWM signals.

FAQs

Q: Can the PICAXE-28X2 communicate with other microcontrollers?
A: Yes, the PICAXE-28X2 supports serial, I2C, and SPI communication protocols, allowing it to interface with other microcontrollers or devices.

Q: Is the PICAXE-28X2 suitable for battery-powered projects?
A: Yes, the PICAXE-28X2 has low power consumption and supports a wide operating voltage range, making it ideal for battery-powered applications.

Q: Can I use the PICAXE-28X2 with external crystals for precise timing?
A: Yes, the PICAXE-28X2 supports external crystals or resonators for applications requiring precise timing.

Q: What software is required to program the PICAXE-28X2?
A: The PICAXE Editor software, available for free on the PICAXE website, is used to write and upload programs to the microcontroller.