Embedded Systems Projects
- 80C32 SBC
This project connects an 80C32 compatible microcontroller with a 32Kx8 EPROM chips, used for external program memory, a 32Kx8 SRAM chip for volatile data memory, and two external 8-bit wide ports, one for input, the other for output.
The 80C32 has a multiplexed address and data bus, the lower 8-bits of an address are latched, freeing the bus for data to be written or read by the microcontroller - an 8-bittransparent latch is used for this task. The two 32KB memory spaces (external program and external data memory) require 15 address lines 0..14 = 215 = 32768 = 32K locations.
The 80C32 doesn't really have a control bus. However, this leaves address lines A15, /PSEN, /WR, and /RD to be used as control signals. Obviously, the /PSEN signal is used to select the program memory. Like shown in the detailed Timing Analysis, the /PSEN needs to be used to enable the EPROM's outputs instead of enabling the chip. The SRAM gets selected whenever the A15 signal is low, which is the case for addresses 0x0000 to 0x7FFFF in the data memory space. If A15 is high then any address is used with the external IO port and only the mutually exclusive /WR and /RD signals are used to determine a read or write operation.
A PDL chip is used to implement the address logic that needs to select either the SRAM or the IO-Device and apply the /RD and /WR signals accordingly.
Analysis...
While timing was an issue with how to hook-up the EPROM chip, it was the AC-Load Analysis, which required the use of a slightly slower variant of the SRAM chip than that I had originally picked. Only after the timing analysis for the IO device (Intel 82C55A) was done, the clock speed for the microcontroller could be determined. As it turned out, some of the 82C55A's hold time requirements could only be met by slowing the 80C32 down to at least 12.5 MHz. To allow for some margin, a 12 MHz crystal was eventually chosen.
Project Report (PDF)
- Keypad Encoder
In this project a 16-key keypad is getting connected to the HTE-8031SDK. While there are many ways to accomplish this task, the here presented combined hardware/software approach makes use of an EDE1144 Keypad Encoder IC. Every time a key is getting pressed on the keypad, ASCII-encoded information is sent to a terminal or LCD connected to the SDK's internal serial port. To avoid constant port polling, an external interrupt notifies about key-press events.
While the whole program easily fits on two pages, still most of the 8051 relevant software techniques learned in the ECP-1 class have been applied. The software written for this project uses an Interrupt Service Routine to handle keypad events, a timer is used to and poll the state of a port pin, and another timer is used in combination with the internal serial port to send data to a connected terminal. A lookup table residing in external memory is used to convert the data received from the keypad-encoder into ASCI and terminal control character data.
Using a keypad encoder requires only one port to get the serialized keypad data into the microcontroller, compared to 8, if a decoder were not present. Moreover, the decoder IC makes it very easy to make use of the MC's external interrupts. On the other hand, the keypad encoder costs about $7 when bought in single units, which makes it more expansive than the microcontroller used for this project.
Project Report (PDF)
Project Presentation (PDF)
- CMOS Camera
This project demonstrates how to interface a low-resolution color camera, which is equipped with a serial port, with the 8032SDK.
A CMOS-based low-resolution (160 x 120 pixel) color camera's RS-232 serial interface is connected to the SDK's internal serial port. This connection is used to allow the SDK to control the camera and to download raw image data from the camera into the SDK's SRAM. The SDK's external serial port is connected to a PC/Terminal, providing a basic user interface, which allows for user controlled processing.
The low-cost digital camera does not provide any image processing and therefore, after a photo has been taken, about 20 Kbytes uncompressed, raw image sensor data, is downloaded into the SDK's SRAM memory. Since the camera's serial interface only support a single transfer speed of 57,600 baud, optimized assembler routines had to be implemented to allow the SDK to receive data and immediately transfer it into external memory at that speed. About 20 Kbytes are needed to store the raw image data for one image.
The readout happens in a horizontally shuffled Bayer colorization pattern and requires quite a bit of processing before a 24-bit per pixel MS-Windows compatible bitmap can be created. The full QSIF standardized bitmap (160 x 120 pixels with 24-bit color information), about 56 Kbytes, doesn't fit into the available external memory.
Therefore, the image data is sent out through the external serial port while it is processed. Before the first pixel can be send however, a MS-Windows compatible BMP header is sent.
For the lack of availability of a better protocol, the receiving terminal has to log the receiving data, to eventually being able to display the bitmap. That however requires the SDK to send the data UUEncoded (standard for data interchange between systems with possibly different code sets, and to represent binary data as a text file).
Project Report (PDF)
Project Presentation (PDF)
- Motion Detection
This project demonstrates how to interface a low-resolution color camera with the 8031SDK to build a simple motion detection system. The basic task of this system is to let the camera take a picture, download the image data and compare it with a previously taken shot. If the two images differ considerably, execute an alert function, in any case repeat.
An inexpensive low-resolution CMOS camera, a 16 key keypad, and three LEDs are connected to the 8031SDK board. The LEDs inform about the current system status, the keypad is used to allow simple user interaction like start, stop, etc., and the CMOS camera is needed to capture raw image data.
An EDE1144 Keypad Encoder IC connects a 16-key keypad to the 8031SDK. Every time a key is pressed on the keypad, an external interrupt notifies about key-press events and ASCII-encoded information is read by an interrupt service routine.
The 8031's internal serial port is connected to the camera's RS-232 serial interface. The SDK controls the camera through this connection and also downloads raw image data into the SDK's SRAM.
The camera does not have any image processing capabilities and after a photo has been taken, about 1.2 Kbytes (for a thumbnail sized image) or about 20 Kbytes (for a full sized image) uncompressed, raw image sensor data, is downloaded into the SDK's SRAM memory. Since the camera's serial interface only supports a single transfer rate of 57,600 baud, optimized assembler routines are used to allow the SDK (running at about 12 MHz) to receive data and immediately transfer it into external memory. The system's motion detection capabilities are based on quickly grabbing and comparing images. If consecutively captured images differ considerably, and alert function displays a message and blinks an LED. A software watchdog protects the system from the potential risk of an image grabbing process failure that could be triggered by insufficient illumination or by letting run out the 9V battery that powers the camera.
If image grabbing or transfer fail, the compare function doesn't get to run and an alarm could not be triggered. To cover this case, a timer interrupt based watchdog is used to call the alarm function if not being reset continually.
Project Report (PDF)
Project Presentation (PDF)
-
Embedded Systems
Most of the work I'm currently doing in the embedded space evolves around designing embedded Internet devices, using Dallas Semiconductor's DS80C390 and DS80C400 Microcontrollers. Dallas Semiconductor provides several Ethernet-ready prototype boards, which include a small but powerful chipset and a Java programmable runtime environment. The chipset provides processing, control, device-level communication and networking capabilities. Most of the features of the underlying hardware are exposed through a set of Java APIs.

[Photo: (c) Dallas Semiconductor / Maxim-IC, 2001] Click to turn over
Here is one of my prototypes, based on the DS80C390 microcontroller.
(I added the pen to show the size of the device - and no; I'm not getting any kickbacks from Compuware.)
[Photo: (c) Carlsbad Cubes, 2003]
- DS80C390
- 512kB of flash memory
- 1MB of NV SRAM
- 10Base-T Ethernet Controller
- RTC
- Dual CAN controllers
- Dual serial ports (one RS-232 level and one +5V level)

[Photos: (c) Carlsbad Cubes, 2004]This prototype is based on the all-new high speed DS80C400 microcontroller.
- 10/100 Base-T
- 3 Hardware Serial Ports
- Integrated 1-Wire® Network Master
- CAN2.0B Port
- Real-Time Clock for Time Stamping
- 1MB Flash ROM for Application Storage
- 1MB NV SRAM for Data Storage
Photo Store
Subscribe