Matlab GUI and the SHARC EZ-Kit Lite


Project Description

This project is motivated by the desire to have the PC communicate with the SHARC EZ-Kit Lite DSP board. Such communication is already possible, but is limited by Analog Devices proprietary software. Such software (i.e. the SHARC EZ-Kit Host) allows the user to download programs, run demos, and peek at the memory contents of the boards, but little else. Therefore, the author has developed a library of Matlab functions encapsulating many of the serial port communication protocols of DSP board. These functions are then utilized in a simple application, namely writing and reading FIR filter coefficients to and from the SHARC Ez-Kit Lite. This PC based Matlab GUI, in conjunction with an assembly program on the board, allows the user to quickly and easily implement virtually any FIR filter in real-time.

How to talk to your SHARC

There were two major challenges to overcome before Matlab could talk to the EZ-Kit. First I needed to figure out how to get Matlab to send and receive data over the serial port. A few searches on google revealed that Matlab 6.0 has a built-in serial port class, greatly reducing the burden of the programmer.

  • Matlab’s serial port class

Using this class, I was able to control the serial port, but what sort of messages was the EZ-Kit expecting? For the answer to this question, I looked first to the SHARC EZ-Kit Lite Reference Manual. Section 6.3, titled Serial Host Interface, contains a good deal of information on message packet formats and various commands for interrogating the board. Unfortunately, the manual lacks sufficient detail to allow the reader to go ahead with his or her own programming. Fortunately, there are a couple of documents on the web that are particularly helpful. I’ve copied them for your convenience.

The Matlab GUI

The Matlab code for the GUI, EZKit.m, contains the library host serial port functions.



Back to the Projects page