Tom's Main Menu

Physical Computing Home

Intro to Physical Computing Syllabus

Networked Objects

Sustainable Practices

blog

Resources

code, circuits, & construction

my del.icio.us links

 

The BX-24

 
The BX-24 is a microcontroller, a small and very simple computer. Like any computer, it needs input devices and output devices, and power. Inputs, outputs, and power are attached to the pins of the microcontroller.

Below is the schematic diagram for the BX-24:

(The bottom of the BX-24 is the part with the big square chip)

In the schematic above, the BX-24 is connected to a 7805 5V DC power regulator, to get its power. A photo of the typical breadboard wiring for the BX-24 and a regulator is available online.

TX (pin 1 )- transfer; used to send programming data out of the BX-24 to the programming computer
RX (pin 2) - receive; used to send programming data into the BX-24
ATN (pin 3) - Attention, a pin used to confirm communication between BX-24 and programming computer
GND (pin 4, pin 23) - Ground
PWR (pin 24) - Input power, 5-15V DC
RES (pin 22) - Reset. Restarts whatever program the BX-24 is running. The line above RES means this is an "active-low" pin. In other words, to activate it, attach it to ground.
+5V (pin 21) - 5V DC output power, for devices attached to the BX-24. Can also be used for regulated 5V input power supply.
Pin 5 - pin 20 - input/output pins, how the BX-24 communicates with peripherals. Digital and analog inputs and outputs attach to these pins.

Electronic chips, or integrated circuits (IC's) like the BX-24 generally have their pins numbered in a U-shape, starting at the top left, moving down, and ending at the top right. So in the above diagram, the TX pin is pin 1, and the PWR pin is pin 24.

Each of the input/output pins (P5 through P20) can be used as either an input or an output. As an input, a pin waits for voltage from an outside source. As an output, a pin generates voltage. As with any computer, input and output is binary, a series of 1's and 0's. Think of each as a switch: if an output is ON, it's sending a 1. if it's OFF, it's sending a 0. Likewise, if an input is getting voltage, it's ON, or receiving a 1, and when it's not getting voltage, it's OFF, or receiving a 0.

The BX-24 operates on 5 volts direct current power (5V DC). So 5V of input is a 1, and less than that is 0. On the output side, a 1 is 5 volts, and a 0 is 0 volts.

Using the BX-24 is very simple. First, you wire a power supply to it. Then you attach input devices and output devices. Then you program it.

Powering the BX-24

The BX-24 requires between 5 and 15 volts DC, wired to the power (PWR) and ground (GND) pins ( pins 24 and 23; see diagram above). When properly powered, the BX-24 contains a power regulator that will produce 5V from the +5V pin (pin 21). You can use this 5V as a source for various devices that you wire to the BX-24. It doesn't produce a lot of current, however, so some devices may need to be powered separately. You can also attach an external power regulator, as shown above. In this case, you'll attach the 8-15 V input from your power source to the input of the 5V power regulator, and the 5V output from the external regulator to the +5V pin (pin 21). Then you would attach all the grounds together. The diagram above uses this wiring scheme, which is better.

Generally, switches, LED's, transistors, and relays can be powered from this 5V source without any problem; other devices, like motors, need a separate power source.

Here's what your circuit board will look like when you've connected the BX-24 and 7805 power regulator correctly:

BX-24, 7805 power regulator, and power connector

detail showing the back of the 7805 regulator

detail showing the front of the 7805 regulator

When you've powered the BX-24 correctly for the first time, the red and green LED's on the chip will blink on and off. If you've wired it wrong, they won't blink. Once you program it for the first time, or reset it using the programming environment's reset button, the LED's will no longer blink unless you program them to.

Connecting the BX-24 to the computer

To connect the BX-24 to a PC in order to program it, you use a serial cable for your PC's RS-232 serial port. The female end of the cable connects to your computer's serial port, and the male end connects to the BX-24. You'll need to make an adaptor to connect to the BX-24. One easy way is to take a female DB-9 connector (the kind of connector on the end of the serial cable), and solder some headers onto it, like so:

Before you connect the cable to your BX-24, make sure the chip is plugged in and grounded. Otherwise, it's easy to damage the serial connection on the BX-24, making it impossible to program the chip.You want to connect pins 2,3,4, and 5 of the serial cable to pins 1,2,3, and 4 of the BX-24, like so:

Once you're connected like this, you're ready to program the chip using the BasicX development environment.