SG12232C

这是对一个小型LCD显示器的实验试用。去年夏天, 我在Akziuki Denshi购买SG12232C图形显示器时它的售价是1500日元。但是我找不到能够好好利用它的办法,就把它扔到垃圾桶里。所以我打算暂时先用一下这个显示器。

只是显示一些静止的图形是没劲的,首先我尝试让它像示波器一样显示实时的声音波形,然后是FFT波形变换。这个波形显示看起来有一个很好的表现,而且实现这个功能的只是采用了一个廉价的单片机。

这个还可以被应用在射频波谱上。

硬件


SG12232C的尺寸为122x32,并且xx支持图形显示。它集成了两块Epson S1D15200LCD控制器。它们分别驱动LCD的上下部分(分别为61x32)。SG12232C需要一个2k hz的方波作为时钟源,但是它在电源加上的情况下提供否则因电压差烧坏LCD板。总线可以采用8080或6800。这里没有像HD447800一样的4位模式,只有8位(并行模式下)是可用的,种情况至少需要14根IO线。

右图显示了电路板和原理图。MCU采用的是Amtel ATmega8,它数字化处理进来的声音信号并在LCD中显示波形。这没有什么难的。我采用一个8位的椭圆函数滤波器MAX293作为去伪滤波器。SCF(自洽场)很有用并且廉价,这个低通滤波器。。。gets baby

软件

右图显示的是内部处理的信号流。数字化的信号经过FFT变换然后以波形块的形式显示在LCD左边64个点上。

Right image shows the signal flow of internal process. The digitized data blocks are transformed in FFT and it is displayed as spectrum bars into left half (64 dots) of LCD. The wave forms are displayed into right half (58 dots) with edge aligning to still cyclic sygnals.

The FFT operations are done in 16-bit fixed-point. These 128 point FFT processes, applying window, butterfly operations and scalar output, could be executed in real-time (within 7.3 msec). This is pretty fast considering it is processed with only a cheap microcontroller. The spectrum bars are displayed in order of fundamental frequency x 0 (DC component), fundamental frequency x 1, x2, x3, ... from left to right. The sampling frequency is 9.6 kHz and the fundamental frequency (frequency resolution) becomes: 9.6k / 128 = 75Hz.

Notes

  •  May 29, '05
  • The fixed-point FFT library for avr-gcc  is also available. This is written in assembler and is optimized for MegaAVRs. Mar 13, '05
  • These are some wave forms, square wave, saw wave and sin(x)/x. You will able to be find thet they are displayed just like text book.
    Square Saw Sinc

Sign