tb8246
发表于 2009-8-21 22:34:32
顶
avrallenhu
发表于 2009-8-27 14:37:37
ding!
zchenj
发表于 2009-8-30 17:27:22
记号下
avride1984
发表于 2009-9-11 23:36:20
不错!学习了!
chengpiaopiao
发表于 2009-9-12 00:22:58
mark!!!!!!!!!!!!!!!!!
xhero
发表于 2009-9-16 13:58:38
顶
382383706
发表于 2009-11-2 13:31:56
mark
huangshujie
发表于 2009-11-5 11:45:24
#include "config.h"
/*------宏定义------*/
#define uchar uint8
#define uint uint32
void delay(uint n)
{
while(n--);
}
void delay_nus(uint n)
{
uchar i=0;
while(n--)
for(i=0;i<8;i++);
}
void delay_nms(uint n)
{
uint16 i;
while(n--)
for(i=0;i<7990;i++);
}
#define CS 0x00000002
#define SID 0x00000008
#define CLK 0x00000020
#define RET 21
#define set_CS() IO0SET=CS
#define clr_CS() IO0CLR=CS //串行的片选端
#define set_SID() IO0SET=SID
#define clr_SID() IO0CLR=SID //串行数据口
#define set_CLK() IO0SET=CLK
#define clr_CLK() IO0CLR=CLK //串行同步时钟
//#define set_RET() IO0SET=1<<RET
//#define clr_RET() IO0CLR=1<<RET //复位引脚,低电平有效P0.0
uint8 const ASCII={
{0x3E,0x41,0x41,0x41,0x3E},//0
{0x00,0x42,0x7F,0x40,0x00},//1
{0x72,0x49,0x49,0x49,0x46},//2
{0x21,0x41,0x49,0x4D,0x32},//3
{0x18,0x14,0x12,0x7F,0x10},//4
{0x27,0x45,0x45,0x45,0x38},//5
{0x3C,0x4A,0x49,0x49,0x30},//6
{0x01,0x01,0x7D,0x03,0x00},//7
{0x36,0x49,0x49,0x49,0x36},//8
{0x06,0x49,0x49,0x29,0x16},//9
{0x7C,0x12,0x11,0x12,0x7C},//A10
{0x00,0x41,0x7F,0x41,0x00},//I11
{0x3F,0x40,0x40,0x40,0x3F},//U 12
{0x1C,0x20,0x40,0x20,0x1C},//v 13
{0x00,0x00,0x60,0x60,0x00},//. 14
{0x38,0x44,0x44,0x44,0x28},//c 15
{0x38,0x54,0x54,0x54,0x18},//e 16
{0x7C,0x04,0x78,0x04,0x78},//m 17
{0x3C,0x40,0x40,0x20,0x7C} //u 18
};
uint8 dis_data={//16*64=1024(128*64=(16*8)*64)
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X01,0XFF,0XC0,0X63,0X80,0X71,0XC0,0X06,0XC0,0X00,0XE0,0X0E,0X38,0X0E,0X0E,0X00,
0X01,0XFF,0XC0,0XE3,0X80,0X7F,0XF8,0X06,0XC0,0X38,0XF8,0X0E,0X38,0X0E,0X6E,0X00,
0X01,0XC1,0XC0,0XC3,0X80,0XF1,0XCC,0X06,0XC0,0X38,0XEC,0X3E,0XFF,0X0E,0X7E,0X00,
0X01,0XFF,0XC1,0XFF,0XF9,0XFB,0XE0,0X7F,0XFC,0X70,0XE6,0X3E,0XFF,0X0E,0X7F,0XC0,
0X01,0XC1,0XC3,0XFF,0XF9,0X86,0X00,0X7F,0XFC,0X6F,0XFE,0X2F,0X38,0X3F,0XFF,0XC0,
0X01,0XFF,0XC3,0XC7,0X83,0XFF,0XFC,0X76,0XDC,0XFF,0XE0,0X7F,0XFF,0XBF,0XEE,0X00,
0X00,0X00,0X07,0XCF,0XC3,0X80,0X1C,0X76,0XDC,0XF8,0XFE,0X7F,0XFF,0XBE,0XCE,0X00,
0X07,0XF7,0XED,0XCF,0XE3,0XFF,0XFC,0X7F,0XFC,0X33,0XFE,0X0E,0X0E,0X3E,0X0E,0X00,
0X07,0XF7,0XE1,0XDF,0XF0,0X70,0XE0,0X7F,0XFC,0X73,0XE0,0X1F,0XFF,0X8E,0X7F,0X80,
0X07,0X76,0XE1,0XDB,0XB8,0X7F,0XE0,0X76,0XDC,0XFC,0XFC,0X7E,0XFF,0X8E,0X7F,0X80,
0X07,0XF7,0XE1,0XFF,0XFC,0X70,0X00,0X76,0XDC,0XFC,0XFC,0X7E,0X0E,0X0E,0X0E,0X00,
0X07,0X76,0XE1,0XFF,0XFC,0X7F,0XF0,0X76,0XDC,0X00,0X70,0X0E,0XEE,0X0E,0X0E,0X00,
0X07,0XF7,0XE1,0XC3,0X80,0X70,0X70,0X7F,0XFC,0XFE,0XF9,0X0E,0X7E,0X0E,0X0E,0X00,
0X07,0XF7,0XE1,0XC3,0X80,0X7F,0XF0,0X7F,0XFC,0XF3,0XDF,0X0E,0X1E,0X0E,0XFF,0XC0,
0X07,0X76,0XE1,0XC3,0X80,0X70,0X70,0X70,0X1C,0X03,0X8E,0X0E,0X1C,0X0E,0XFF,0XC0,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X06,0X00,0X32,0X07,0X30,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X6F,0XC6,0X38,0X33,0X07,0X38,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X7F,0XD6,0X1C,0X3B,0X0E,0X1B,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X3C,0XD6,0X1F,0XFF,0X8F,0XDB,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X0D,0XD6,0X03,0XFF,0X9F,0XC7,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X6D,0XD6,0X78,0X38,0X3E,0XE7,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X7D,0XD6,0X7B,0XF8,0X3E,0XEE,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X3D,0XD6,0X1B,0XF8,0X0E,0X7E,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X0D,0XD6,0X19,0XDC,0X0E,0X7C,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X3D,0XD6,0X19,0XDC,0X0E,0X3C,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X33,0X16,0X19,0XDC,0X0E,0X3C,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X37,0XC6,0X1D,0XFF,0X8E,0X7E,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X76,0XEE,0X1F,0XFF,0X0E,0XE7,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X6E,0X7E,0X1B,0X87,0X0F,0XC3,0X80,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X6C,0X1C,0X00,0X03,0X0F,0X81,0XC0,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0X00,0X00,0X00,0X04,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X03,0X00,0X00,0X00,0X01,0X00,0X00,0X00,0X04,0X00,
0X00,0X00,0X01,0X80,0X00,0X00,0X06,0X00,0X00,0X00,0X01,0X00,0X00,0X00,0X04,0X00,
0X00,0X00,0X03,0X00,0X00,0X01,0X0C,0X00,0X00,0X00,0X01,0X00,0X00,0X00,0X04,0X00,
0X00,0X00,0X86,0X00,0X00,0X01,0X18,0X00,0X00,0X00,0X01,0X00,0X00,0X00,0X04,0X00,
0X00,0X00,0X8C,0X00,0X00,0X01,0XB0,0X00,0X00,0X00,0XBF,0X00,0X00,0X02,0XFC,0X00,
0X00,0X00,0X98,0X00,0X00,0X01,0XE0,0X00,0X00,0X00,0XA0,0X00,0X00,0X02,0X80,0X00,
0X00,0X00,0XB0,0X00,0X00,0X01,0XE0,0X00,0X00,0X00,0XA4,0X00,0X00,0X02,0X90,0X00,
0X00,0X00,0XE0,0X00,0X00,0X01,0XF0,0X00,0X00,0X00,0XA6,0X00,0X00,0X02,0XB0,0X00,
0X00,0X00,0XC0,0X00,0X00,0X01,0X00,0X00,0X00,0X00,0XBF,0X00,0X00,0X02,0XFC,0X00,
0X00,0X00,0X80,0X00,0X03,0XFF,0X00,0X00,0X00,0X00,0XA7,0X00,0X00,0X02,0XB4,0X00,
0X01,0XFF,0X80,0X00,0X00,0X01,0X00,0X00,0X00,0X00,0XA5,0X00,0X00,0X02,0X94,0X00,
0X00,0X00,0X80,0X00,0X00,0X01,0X80,0X00,0X00,0X00,0XA1,0X00,0X00,0X02,0X84,0X00,
0X00,0X00,0XC0,0X00,0X00,0X01,0XC0,0X00,0X00,0X3F,0XBF,0X00,0X00,0XFE,0XFC,0X00,
0X00,0X00,0XE0,0X00,0X00,0X01,0X60,0X00,0X00,0X00,0X01,0X00,0X00,0X00,0X04,0X00,
0X00,0X00,0XB0,0X00,0X00,0X01,0X30,0X00,0X00,0X00,0X01,0X00,0X00,0X00,0X04,0X00,
0X00,0X00,0X99,0X00,0X00,0X01,0X18,0X00,0X00,0X00,0X01,0X00,0X00,0X00,0X04,0X00,
0X00,0X00,0X8F,0X00,0X00,0X00,0X0C,0X00,0X00,0X00,0X01,0X00,0X00,0X00,0X04,0X00,
0X00,0X00,0X07,0X00,0X00,0X00,0X06,0X00,0X00,0X00,0X01,0X00,0X00,0X00,0X04,0X00,
0X00,0X00,0X0F,0X00,0X00,0X00,0X03,0X00,0X00,0X00,0X01,0X00,0X00,0X00,0X04,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
};
//写数据到12864
void WriteData(uint8 ch,uint8 d_c)//d_c=1是命令,0为数据
{//RE=0
uint8 i;
int32 dc;
//long dc;
dc=(d_c?0xf80000:0xfa0000);
set_CS();
dc|=(((ch&0xf0)<<8)|((ch&0x0f)<<4));
for(i=0;i<24;i++)
{
clr_CLK();
delay(2); //将PB^5位置1
if((dc<<i)&0x800000)
set_SID();
else
clr_SID();
delay(2);
set_CLK();
delay(2);
}
clr_CS();
}
void LCD_CLEAR(void)//写命令到12864清屏
{
WriteData(0x01,1);// 清屏
delay_nms(15);
}
//全屏显示图片,把一维的数组写进去
//clr为1时,清屏,为0时直接加到原图上
void LCD_Picture_Display(uint8 *tab,uint8 clr)
{
unsignedi, j, k, lcd_x, lcd_y,jj=0;
if(clr) LCD_CLEAR();//清屏
lcd_x = 0x80;//第一页页地址
for(i=0 ; i<2; i++)//分两页来写
{
for(j=0, lcd_y=0x80; j<32; j++, lcd_y++)
{
WriteData(0x36,1);//8位扩充指令集,绘图开
WriteData(lcd_y,1);//地址设置
WriteData(lcd_x,1);
WriteData(0x30,1);
for(k=16; k>0; k--)
{
WriteData(tab,0);
}
}
lcd_x = 0x88;//第二页页地址
}
}
//设置数组中的一个点,f为0则清点,为1则描点,
void set_pic_point(uint8 y,uint8 x,uint8 f)
{
uint16 p;
p=16*y+(x>>3);
x&=0x07;//x%=8;
x=1<<(7-x);
if(f)dis_data|=x;
elsedis_data&=(~x);
}
//画一条水平或垂直直线
void dis_line(uint8 ystar,uint8 yend,uint8 xstar,uint8 xend)
{
uint8 Xle=xend-xstar,Yle=yend-ystar,i;
if(Xle)//画X轴平行直线
{
for(i=0;i<Xle;i++)
set_pic_point(ystar,xstar+i,1);
}
else
{
for(i=0;i<Yle;i++)
set_pic_point(ystar+i,xstar,1);
}
}
//显示一个字符
void dis_char(uint8 y,uint8 x,uint8 ch)
{
uint i,j;
for(i=0;i<5;i++)
for(j=0;j<7;j++)
set_pic_point(y+j,x+i,(ASCII>>j)&1);
}
//显示数字两位
void dis_NUM(uint8 y,uint8 x,uint8 ch)
{uint8 i,j,tm;
if(ch>9)
{
ch%=100;
tm=ch/10;
ch%=10;
x-=5;
for(i=0;i<5;i++)
for(j=0;j<7;j++)
set_pic_point(y+j,x+i,(ASCII>>j)&1);
x+=5;
}
for(i=0;i<5;i++)
for(j=0;j<7;j++)
set_pic_point(y+j,x+i,(ASCII>>j)&1);
}
void set_lxy(uint8 nx,uint8 ny)//画X和Y轴
{
uint8 y=12,x=62;
uint8 i;
// ny/=5;
dis_char(52,123,13);//V
dis_char(0,16,17);//m
dis_char(0,22,10);//A
dis_line(0,62,y,y);
dis_line(x,x,y,128);
dis_NUM(57,4,0);
set_pic_point(1,y-1,1);
set_pic_point(1,y+1,1);
set_pic_point(2,y-2,1);
set_pic_point(2,y+2,1);
set_pic_point(x-2,125,1);
set_pic_point(x-1,126,1);
set_pic_point(x+1,126,1);
set_pic_point(x+2,125,1);
i=1;
while(x>20)
{
x-=10;
set_pic_point(x,y-1,1);
set_pic_point(x,y-2,1);
i++;
}
dis_NUM(x-3,y-7,nx);
i=1;x=61;
while(y<102)
{
y+=20;
set_pic_point(x,y,1);
i++;
set_pic_point(x-1,y,1);
}
i--;
dis_NUM(x-8,y-2,i*ny/5);
}
//写0到图片数组,清屏
void clear_pic(void)
{
uint i=1023;
while(i)dis_data=0;
}
/*****************************************
液晶初始化程序
输入数据:无
*****************************************/
voidlcd12864_init(void)
{
//PINSEL0&=~((0x03<<CS)|(0x03<<SID)|(0x03<<CLK)|(0x03<<RET));
IO0DIR=IO0DIR|(CS)|(SID)|(CLK);
clr_CS() ;
clr_SID();
clr_CLK();
//clr_RET();
delay_nms(10);
//set_RET();
delay_nms(5);
WriteData(0x32,1);
delay_nus(150);
WriteData(0x32,1);
delay_nus(150);
WriteData(0x0c,1);
delay_nus(150);
WriteData(0x60,1);
delay_nus(150);
WriteData(0x04,1);
LCD_CLEAR();//清屏
}
int main (void)
{// add user source code
lcd12864_init();
while(1)
{
set_pic_point(1,2,0);
dis_line(1,1,2,2);
set_pic_point(1,3,1);
dis_NUM(3,1,88);
}
return 0;
}
/*********************************************************************************************************
** End Of File
********************************************************************************************************/
huangshujie
发表于 2009-11-5 11:48:59
请教版主一下,这程序里面是什么问题??
Gorgon_Meducer
发表于 2009-11-6 22:40:56
我又不是处理器……我怎么知道有什么问题……
yue565
发表于 2009-11-20 00:41:34
mark谢谢傻孩子
Dream_catcher
发表于 2009-11-30 02:11:45
虽然是古董,但绝对是经典!
对初学者来说是上等的的学习资料!
liujunjie
发表于 2009-11-30 08:42:32
哈哈,经典.............
mawenwei
发表于 2009-11-30 09:32:00
很好的LCD显示解析 马克到此一游
809314596
发表于 2009-12-31 18:27:18
mark!!!!!!!
myworkmail
发表于 2009-12-31 23:35:01
哈哈,对.挖
gxy508
发表于 2010-1-1 12:14:47
mark
huohuansong
发表于 2010-1-1 14:09:10
好东西
hisun
发表于 2010-1-1 16:13:58
咱连初学者都还算不上,也要记号一下。
lizhoubob
发表于 2010-1-1 16:56:25
mark
qilin3
发表于 2010-1-6 01:00:12
太好了~~
terrorist
发表于 2010-1-6 13:20:49
Mark
wherethriving
发表于 2010-1-28 00:57:53
markmark
qiao900209
发表于 2010-1-28 02:02:53
学习学习
C307
发表于 2010-1-28 11:45:37
MARK
czxf
发表于 2010-1-28 13:59:37
mark
zhames
发表于 2010-1-28 15:22:53
mark
joni
发表于 2010-1-28 22:19:37
好东西啊!
moon0213
发表于 2010-1-28 23:00:56
mark
alan8918
发表于 2010-1-28 23:06:02
mark
sddp001
发表于 2010-1-28 23:54:43
mark 明早看看
C307
发表于 2010-1-30 11:49:32
mark,学习老
mslei
发表于 2010-1-30 12:55:46
好东西啊,不错
xiaoyue_xiao
发表于 2010-2-3 23:43:13
学习中,谢谢了
gdourf
发表于 2010-2-8 14:26:35
我的点阵屏也能点亮了,MARk。
cgbabc
发表于 2010-2-8 16:25:20
呵呵,顶一个
jiangping_hbhm
发表于 2010-2-12 13:24:38
mark
wjc1956
发表于 2010-2-12 13:54:50
mark
cnzhy88
发表于 2010-2-12 22:58:50
好贴啊,学习了.
skyward
发表于 2010-2-27 20:51:00
一定要留个标记
chrise
发表于 2010-3-23 17:03:25
既然是古墓,,当然要挖,呵...
thinki
发表于 2010-4-7 23:21:43
顶一下
dongzhiqing
发表于 2010-4-18 21:30:32
dd.问一下傻孩子现在单身么?要介绍个不?
CHENG2010
发表于 2010-4-18 22:17:04
mark
ZZL520
发表于 2010-5-8 09:07:32
写的很好呀!!!!!!!!!!!!!!!!!!!!!!!
ZZL520
发表于 2010-5-11 13:01:03
mark
jackmo
发表于 2010-5-11 14:17:27
mark
major888
发表于 2010-5-11 15:56:10
mark
cshx1986
发表于 2010-5-13 16:09:07
真不错,学习学习。。。。。。。。。
sharp0
发表于 2010-5-18 15:53:24
太好了,mark,12864正用的
jasonli
发表于 2010-5-24 15:45:34
mark
weilan2200
发表于 2010-5-24 20:08:05
cool!
ysdaniel
发表于 2010-6-1 14:48:35
标记好贴回复【97楼】Gorgon Meducer傻孩子
-----------------------------------------------------------------------
ahfong2006
发表于 2010-6-1 15:57:12
mark 12864
DanielDeng
发表于 2010-6-1 16:55:18
mark 计算机图形学
gmolzc
发表于 2010-6-1 16:57:45
頂!!!!
nicksean
发表于 2010-6-1 18:27:32
mark!
sl961102
发表于 2010-6-1 18:38:37
强,也想想试试。
gmolzc
发表于 2010-6-1 20:46:47
顶,学习中!
caozhu
发表于 2010-6-1 22:23:47
跃跃欲试
markloveyou
发表于 2010-6-1 23:20:54
好
xslff
发表于 2010-6-1 23:45:50
此贴必盛!
frogrider
发表于 2010-6-2 01:32:24
好!谢谢
Notcare
发表于 2010-6-2 04:08:34
mark!
maidilong
发表于 2010-6-25 16:33:36
这个绝对是牛贴呀!!
zuceyige
发表于 2010-6-27 09:54:52
傻孩子的贴子!
先顶再看!
ysdaniel
发表于 2010-7-4 16:19:26
回复【163楼】jinpoiu
-----------------------------------------------------------------------
立立立立立立立
yxeglxl
发表于 2010-7-6 18:39:40
mark
jasonli
发表于 2010-8-4 08:59:22
1、关于坐标系。很多人,包括笔者,一开始都看不懂LCD12864的内存影射方式,感觉X、Y似乎不是那么回事。后来才发现,只要把屏幕竖着放一切就好懂了。X还是横轴,Y还是竖轴……但是这显然不符合我们的习惯,我们习惯于长的那个边作为横轴,所以需要一点点坐标之间的转换。
假设输入的是正常习惯的坐标 X,Y DX DY就是LCD上的坐标,那么转换关系是
char DX = (Y >> 3); //计算出属于哪个字节
char BX = Y - (DX << 3); //属于该字节的哪个位
char DY = X;
----------------------------------------------------------------------------------
问一下这个x,y是每个点的坐标还是?
Gorgon_Meducer
发表于 2010-8-4 11:09:00
就是每个点的坐标。
wshini7316
发表于 2010-8-4 11:49:36
mark
fq1888
发表于 2010-8-5 01:03:21
06年3月1日的帖啊,经典经典,不得不顶~!
redworlf
发表于 2010-8-29 16:03:08
回复【240楼】Gorgon
-----------------------------------------------------------------------
for (i = 0; i < inc; i++)
{
BOOL PlotFlag = FALSE;
x += ix;
y += iy;
if (x >= inc)
{
PlotFlag = TRUE;
x -= inc;
if (dx < 0)
{
plotx--;
}
else if (dx > 0)
{
plotx++;
}
}
if (y >= inc)
{
PlotFlag = TRUE;
y -= inc;
if (dy < 0)
{
ploty--;
}
else if (dy > 0)
{
ploty++;
}
}
if (PlotFlag)
{
SetPixel(plotx,ploty,chModel);
}
} }
这句x -= inc; 什么意思?为什么要这么做
GNMXD
发表于 2010-8-30 11:09:58
Thanks
li460135301
发表于 2010-8-31 00:54:37
顶一个!!!
redworlf
发表于 2010-8-31 19:47:07
回复【240楼】Gorgon
-----------------------------------------------------------------------
那个算法你是怎么简化成这个样子的?
aliang2007
发表于 2010-9-14 22:53:58
经典啊
xiaomage_2000
发表于 2010-9-15 16:28:50
强!这个一定要支持!
QQ373466062
发表于 2010-9-15 18:04:57
过几天玩玩
haizaolan
发表于 2010-9-15 22:56:24
周么学习!
zqd311107
发表于 2010-9-16 22:13:38
周么学习!
czhongli
发表于 2010-9-17 12:48:56
好
bsz84
发表于 2010-9-17 19:04:49
不能不说好!
minghui2009
发表于 2010-9-19 01:31:47
不错,赞一个
cenkey
发表于 2010-9-19 13:23:17
厉害
chenhuanbang
发表于 2010-9-21 21:38:02
看完了,不过还得慢慢消化,感动的泪流满面!
guxingganyue
发表于 2010-10-3 20:38:07
受教了
jimmyqiu
发表于 2010-10-5 00:35:57
mark
electron_love
发表于 2010-10-17 14:59:12
首先说明我对单片机了解的不多,明白傻孩子比我懂得多得多,再者就是发表我的观点
对于拥有sdram的东西我不敢恭维,1k对于sdram来说不算什么,这是个事实,但对于51的sram来说就很难说了,
52拥有512b的ram 我不知道如何去开辟1k,并且在内存中操作加上你同步ram与lcd的时间与你读出来再写进去
的差别有多大我就无法计算了。忘楼主慎重考虑一下
Gorgon_Meducer
发表于 2010-10-18 00:17:05
to 【379楼】 electron_love
具体问题具体对待。对错并不重要,一篇很老的文章引起这么多人的思考,这已经起到作用了。
当然,我们讨论问题的范围,总是有限度的。如果你能明白具体的情况有具体的应对方式,那么也就
不必和我争论是否妥当的问题了。认真说来,以前的自己的确有很多局限,我也不能轻易地去改写过
去的东西,这就像是一种历史。所以不足,就只能以大家的讨论来补充了。谢谢您的关注。希望更多
的人参与进来。
jkhu
发表于 2010-10-18 00:28:38
mark
tccmltuzi
发表于 2010-11-26 11:53:14
16M晶振跑Gorgon Meducer 先生的窗口(windows)生成算法都显太慢。填充->擦除->画框在液晶上过程的足迹太明显。这个非常赞成,在画不规则图形的时候非常难实现优化,基本每个字节需要平均跑4次,最算用ARM9来跑也逃不过LCD本身的延时。
youpeng
发表于 2010-11-28 22:30:04
GOOD!必须MARK!
wenfeiexe
发表于 2010-11-28 22:47:04
mark
AG17
发表于 2010-11-28 23:41:49
mark
gyzzg2030
发表于 2010-11-29 08:18:22
暂用不上,学习一下
Gloriousle
发表于 2010-11-30 16:15:37
mark
sugarzhou
发表于 2010-12-4 22:24:41
MARK
zhihaoa
发表于 2010-12-5 11:07:35
mark
jack_yu
发表于 2010-12-6 13:30:00
mark!