

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.








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) |
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) |
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
The microcontroller does not respond to programming commands.
Analog readings are unstable or incorrect.
The microcontroller resets unexpectedly.
PWM outputs are not working as expected.
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.