LED RAM从530~537都可以点亮,但是从538~53B都不亮
void ledinit(void)
{
unsigned char i;
unsigned char xdata *p;
DISPCON = 0x40;//允许LED驱动器 占空比1/4
SEG01 = 0xFF;
SEG02 = 0xFF;
LEDCOM = 0x7F;
DISPCLK = 50;//LED时钟控制寄存器 LED时钟频率= 系统时钟频率/8/DISPCLK
DISCOM = 70;//LED 单COM 扫描宽度选择位 单COM 扫描宽度= LED时钟频率/DISCOM
LIGHTCOM=0X00;
display_channel1 = 0;
display_channel2 = 0;
p = 0x530;
for(i=0;i<0x0f;i++)
{
*(p+i) = 0x00;
}
}
void led_display_2()
{
unsigned char xdata *p;
p=0x538;
*(p+0)=0xff;
*(p+1)=0xff;
} |