Saturday, January 7, 2012

MiniProg3 + EzI2C + ADC = Crude O'Scope

I'm documenting something here that I did recently,which was setting up a crude oscilloscope( real-time waveform viewer could be a better term ).While such data acquisition systems aren't difficult to put together,especially with the PSoC3,but I wanted something quick,so this is what I threw together.

I utilized the USB<->I2C bridge functionality of the MiniProg3,and used the Bridge Control Panel that comes with PSoC Programmer to view the ADC data sent over I2C in realtime,to the PC via the MiniProg.So yes,its quite simple and took me under 20mins to get going.

 I'd like to talk about EzI2C Component,since I find it to be truly "Ez" to use and also a great idea.In short,This component adds an I2C slave device with one or two I2C addresses. Either address may access a memory buffer defined in RAM, EEPROM, or flash data space. EEPROM and flash
memory buffers are read only, while RAM buffers may be read/write.This memory is therefore "common" to both PSoC and other devices on the I2C bus,so its really good and easy for implementing control and status as well as data transfer,since all the I2C stuff is taken care of below the high level APIs,leaving you to focus on things better.

You can check out the video in the link below,and its example project included with Creator 2.0

Video : EzI2C Slave Component in PSoC 3 and PSoC 5

Below is a screenshot of the Bridge Control Panel showing the waveform:
Just incase youre wondering,the blue line is a "flag" I set at 50% of the max value,in the Bridge Control Panel GUI.

This code was tested on the CY8CKIT-030,and was written in PSoC Creator 2.0 and Bridge Control Panel 1.3.

Heres what the top design view looks like:

You can find the code and Bridge Control Panel Command and Settings files in my 4shared account,linked here.

I havent gone into details on how to use the Bridge Control Panel,since I found the included help files are good enough.However,if you want a clarification at any point,drop a line in the comments.

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

No comments:

Post a Comment