|
Part 3: Armed and Ready
by Fred Eady
Start ý Retro
Rabbit ý Preflight Checklist ý Firmware
Developmentý Left Turn, Clyde
Successý Sources
and PDF
PREFLIGHT CHECKLIST
Letýs check off what the upgrade requirements
were versus the RCM2300ýs capabilities. The first concern, size, was
satisfied by the RCM2300ýs compact form factor. The relay controller
module needed the ability to keep track of relay closures and durations.
In addition, the relay controller module had to have a means of identifying
itself to the master controller. If the relay controller has to be
moved to another master controller network on the plant floor, the
relay controller ID will need to be changed and remembered.
Because the specifications called for
unlimited reads and writes to nonvolatile storage, I considered using
RAMTRONýs ferro-based nonvolatile serial memories for this, but as
good as that sounds, it adds complexity and parts to the solution.
The RCM2300 has all of the necessary circuitry onboard to support
battery-backed SRAM operation. I had to add a battery to the solution
to support the real-time clock anyway. So, with the battery being
a necessary item, the RAMTRON part was one less part I needed to add.
By simply attaching a 950-mAh lithium
cell between the RCM2300 VBAT pin and ground, unlimited read/write
nonvolatile storage is effected and the real-time clock is implemented.
The final requirement of serial communications was satisfied by the
RCM2300ýs abundance of serial ports. In addition to the programming
port, the RCM2300 comes standard with a serial port configuration
capable of two 2-wire interfaces or one 5-wire interface. The upgrade
uses the services of one of these serial ports in 2-wire mode for
asynchronous communications between the RCM2300 complex and an external
terminal or personal computer. If the need arises later, the remaining
2-wire port can be equipped with a standard RS-485 converter, and
with the help of a single I/O for transmit/receive switching, the
RCM2300 embedded complex can become a fully functional RS-485 network
node.
Basically, the hardware consists of a simple
printed circuit board, a lithium backup battery, the RCM2300, and
an RS-232 converter IC. If youýre wondering why I included the printed
circuit board as part of the hardware, youýll get your answer by studying
Photo 3.
What you see is a 28-pin dual inline arrangement that is designed
to be plugged into the socket of the microcontroller the RCM2300 complex
replaced. This arrangement allows the RCM2300 embedded computer to
access the resources of the original relay controller via the pinout
of the microcontroller it replaced.
 |
| Photo 3ýThis is the bottom
side of the RCM2300-based upgrade module. Note the dual inline
header pins. These pins allow the enhanced RCM2300-based embedded
complex to assume the pinout of the microcontroller it is replacing. |
For instance, if pin 1 was an output
pin on the original microcontroller, All I had to do was assign and
hardwire one of the RCM2300 I/O pins to the IC socketýs pin 1 and
code it for output in the code. The original equipment microcontroller
had a single UART that was pinned for use with an external RS-232
converter. To mimic this functionality, I simply designed the RCM2300
motherboard to allow one of the RCM2300 serial ports to interface
with the original UART pins. To go one better, I added the RS-232
converter IC to the RCM2300 motherboard in the form of the Sipex SP233.
I chose the SP233 because it does not require the charge pump capacitors
to operate in true RS-232 mode.
Moving to the topside of the RCM2300 motherboard
(see Photo 4),
youýll find the female headers that support the RCM2300 core module
and the 950-mAh lithium backup battery. This view gives you an idea
of what can take place under the RCM2300 module. As you can see, just
in case I need them, I added some SMT resistor pads to accommodate
pullup resistors on the old microcontroller input pins, which are
mapped to I/O pins on the RCM2300 module. Photo 5 is a view of the
complete RCM2300-based embedded upgrade module with the RCM2300 mounted
on the motherboard.
 |
| Photo 4ýThis is a look
under the RCM2300 module. As a precaution, I added pads for
SMD pullup resistors on the input pins of the original microcontroller.
I also made provisions for the installation of a couple through-hole
MOSFETS to drive high current outputs. Itýs best to have more
pads than you need than to need them and not have them. |
 |
| Photo 5ýI
can assemble this upgrade module in about 15 min. |
Thereýs one more piece of hardware I
want to mention before I get into the development of the final firmware.
Although this hardware doesnýt have any direct bearing on the operation
of the RCM2300-based upgrade module, it does have a big impact on
the design of the upgrade moduleýs printed circuit board. The piece
of hardware Iým talking about is the RCM2300 Development Kit. I used
the RCM2300 Development Kit to baseline the upgrade moduleýs design.
As you can see from Photo 6, I added
the optional RS-232 converter IC to my RCM2300 Development Kit to
allow testing of my firmware with a known good serial configuration.
To help in firmware development, I wired the upgrade moduleýs serial
interface just like it is wired on the RCM2300 Development Kit. My
RCM2300 Development Kit came with Dynamic C SE, a RCM2300 core module,
prototype board, programming cable, power supply, a "Getting
Started" manual, and a Rabbit 2000 Easy Reference poster.
 |
| Photo 6ýI
added this Sipex 232 RS-232 converter IC to initially test the
upgrade moduleýs serial port design. The RCM2300 Development
Kit has provisions for this addition. All you have to do is
add the parts. |
PREVIOUS
NEXT
Circuit Cellar provides up-to-date information for engineers. Visit
www.circuitcellar.com for
more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com
or subscribe online.
ýCircuit Cellar, the Magazine for Computer Applications. Posted with
permission. |