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

 

CoBox Micro: Physical Connection to a Microcontroller

 
The CoBox Micro module can be used with Lantronix' embedded integration kit (EIK), which costs extra, or it can be used on its own. The Cobox Micro has one or two serial ports (older models had two ports, but current models have only one). To use it with a PIC or BX24 or similar microprocessors that have TTL serial capability, you'll need a chip to convert the 0-5V levels of TTL serial to RS-232 levels. You could use a MAX232 chip to be safe, but I've found that a simple 7404 hex inverter does the job well.

The pin assignments can be found in the datasheet from Lantronix. I found it easiest to buy a ribbon cable and a couple of connectors to connect my Micro to a breadboard, like so:

Cobox connected to a PIC 16F819. The DTR pin is connected to the PIC pin RA4.
Detail showing wiring under the ribbon cable. Note the 10K resistors for the reset and DTR pins.
Cobox connected to a BX-24
Detail showing wiring under the ribbon cable. Note the 10K resistors for the reset and DTR pins.

I got the cable and connectors from Jameco; here are the part numbers:

Part number Description Notes
42657 IDC connector, DIP plug, 14 pin used to connect the ribbon cable to the breadboard
153947 IDC connector, 14-pin socket used to connect CoBox Micro to ribbon cable
105671 28AWG 16-conductor ribbon cable, flat, rainbow colored Ribbon cable, used to connect everything together.
73251 IDC crimp tool Tool used to crimp the connectors onto the cable. If you're in my class, I have one of these you can borrow, to save some money
49040 7404 Hex Inverter used to supply adequate signal levels.

If you can't find a 14-pin Socket or IDC connector, you can use a larger one. In these photos, I'm actually using a 16-pin IDC connector and socket.

The connector pinouts for the main connector (CON1) on the CoBox Micro are as follows. Note that the pin configuration is not the usual U-layout for a DIP. Layout below is spatial, looking down on the connector:

Pin 2:Ground
Pin 1:+5VDC
Pin 4:Tx channel 1
Pin 3: Rx channel 1
Pin 6: DCD channel 1
Pin 5: CTS channel 1
Pin 8: DTR channel 1
Pin 7: RTS port 1
Pin 10: Reset (active low)
Pin 9: reserved
Pin 12:Tx channel 2
Pin 11: Rx channel 2

Here's the layout as seen looking down on the module:

Here's the schematic for my wiring to a microcontroller:

You can use this same hardware setup to connect the Cobox to a computer's RS-232 serial port as well. Just connect the lines marked "to microcontroller TX" and "to microcontroller RX" in the schematic above to the TX and RX pins of your serial connector ("to microcontroller TX" goes to pin 3 of a DB-9 connector, "to microcontroller RX" goes to pin 2). Then connect the ground of your serial connector (pin 5 of a DB-9) to ground, and you're all set. In fact, you'll need to leave it this way to configure the Cobox serially.

Once you've got the hardware connected, you're ready to move on to configuration.