Pressure Transducer

Student Technician, Automation Laboratory
Firmware development of a pressure transducer.
Fall 2000
Reference: Dr. Behbood Zoghi

For this project, I was to write the firmware for a microcontroller based Pressure Transducer for Control Systems International. Specifically, I wrote assembly language for the MC68HC705J1A microcontroller to control and monitor pressure in a chamber through a valve. This involves many techniques and skills such as a closed loop control algorithms, reading and generating pulse width modulation, communicating between devices both on the PCB board and off of the PCB board, utilizing hardware and timer interrupts to their full extent, and creating/maintaining a complex button and decimal LED driven user interface. This has been a huge learning experience for me. In higher level microcontrollers and programming languages, much of this is taken care of for you. The microcontroller might already be capable of doing complex math, reading PWM, performing A/D operations, etc... But in the case of the 68HC05, your world becomes much smaller.

This is an 8 bit microcontroller with a few hardware interrupts, a couple of timer interrupts, and that's about it. A big problem during this project was constantly running out of EPROM space. The 68HC705J1A only contains 1231 bytes of usable EPROM. Considering the complexity of the pressure transducer and the many modes of operation and control it was capable of, I had to become very creative and efficient to write the smallest code possible. To add to this problem, because it is only an 8 bit microcontroller, it was necessary to constantly check for overflow during math operations.

To avoid this, many calculations were broken into an upper and lower nibbles so they could be operated on separately. This meant that simple math could take paragraphs of code. Complex math, such as divide, simply did not exist as an op code. Using the available multiply function, I had to create my own divide function, of course with integer resolution, no floating point calculations allowed. The point is, all of these obstacles, despite the headaches, made for a very educational experience, problems faced in the real world you might say. This also made the project fun. A problem arose, I worked on that problem till it was solved, and then continued working till a new problem arose. And usually the kind of problems experienced were things that I never could have anticipated at the beginning of the project. This extended the project timeline farther than I had anticipated, but made for an interesting and beneficial project.

Nate in the Automation Laboratory