|
程序说明
1、定义个缓冲区、Y轴增益
Uint16 YGain = 4;
Uint16 buff[128];
缓冲区是在ADC时采用的,可根据情况适当加大。
2、显示
LcdOsc(buff);
其中LcdOsc(Uint16 buff)为:
void LcdOsc(Uint16 *buf)
{
Uint16 i,q,r;
for ( i = 0 ; i < 128 ; i++)
{
q = buf >> (YGain + 1); // max 6 bits to shift
r = q >> 3; // 3 bits is remained
LCD_sit(i,r);
//
q &= 7;
q = 1 << q;
send2LCM( 1, q );
}
} |
|