作者: dino_lo 時間: 2007-6-21 12:21 標題: 電容專家有 18pin 的 lcd 仔買, 今次成了三合一!
版主出手,精華之後,合併之後!
(唔覺意
一個提問變成大TOPIC!ktktkt 你好强
PS_1: #32~41 ktktkt 大大的重要 MCU 實戰 coding!
#32, MCU 推LCD 基礎 coding 資料
PS_2: 真係可以用PC PRINTER PORT 推動!
#49 LCD INFO
http://www.hkepc.com/bbs/viewthr ... page%3D1&page=5
#124 LCDHYPE (found by 5 dollar)
http://www.hkepc.com/bbs/viewthr ... age%3D1&page=13
PS_3: #115 tnovicet 的 modified .ASM CODE
http://www.hkepc.com/bbs/viewthr ... age%3D1&page=12
[ 本帖最後由 dino_lo 於 2007-7-6 09:35 編輯 ]
作者: kkjason 時間: 2007-6-21 12:32
圖形 lcd
有線路圖比
作者: kkjason 時間: 2007-6-21 12:34
product code : cgg132064a00-mcw-r( lt-13264b)
132X64
FSTN
w bl
作者: 大雄 時間: 2007-6-21 13:45
聽個2公婆同buyer講係寄賣
佢地得張Pin位I/O圖
行乜IC都唔知 . . .
仲話要買左先俾E-mail問個賣家
作者: dino_lo 時間: 2007-6-21 13:57
才35元,玩muc,有data sheet,就一定用到.
作者: 大雄 時間: 2007-6-21 14:07
原帖由 dino_lo 於 2007-6-21 13:57 發表
才35元,玩muc,有data sheet,就一定用到.
不過要玩PC-> LCD
用咩Driver Chip好重要
作者: dino_lo 時間: 2007-6-21 14:38
只是應用廣,有人買,應是常用的種類.
led 背光,有少少心動,想買番個玩.
作者: 大雄 時間: 2007-6-21 14:46
原帖由 dino_lo 於 2007-6-21 14:38 發表
只是應用廣,有人買,應是常用的種類.
led 背光,有少少心動,想買番個玩.
我有隻128 X 128 CLCD行4個CS有無興趣?
我唔識玩,放係度好浪費
作者: dino_lo 時間: 2007-6-21 15:39
你是否可以駁到兩個cs, 的clcd(字形lcd)
dual(cs) clcd 我都有post 過dual clcd 的玩法.兩塊clcd 共同的data,control,只是cs 是分開駁.clcd programme 大部份都support到的.
作者: 5dollar 時間: 2007-6-21 17:13
我買左隻, 等得閒時慢慢試.
如果得, 35好平..
原帖由 大雄 於 2007-6-21 14:46 發表
我有隻128 X 128 CLCD行4個CS有無興趣?
我唔識玩,放係度好浪費![]()
你隻LCD用邊隻ic?
上網搵下隻ic資料, clcd 一般都係個幾隻ic, 唔難玩的.
作者: hktvro 時間: 2007-6-22 06:08
原帖由 大雄 於 2007-6-21 13:45 發表
聽個2公婆同buyer講係寄賣
佢地得張Pin位I/O圖
行乜IC都唔知 . . .
仲話要買左先俾E-mail問個賣家
個E-mail...
我買了一個 , 控制晶片是KS0713
作者: palm3tong 時間: 2007-6-22 21:32
hi hktvro ,
I bought this one as well but can't make it work. I connected it to 89s51 (not 52) and burn the demo program and it didn't work. I only got the hex file of the demo program and can't make it work for 89s51. How about you? Did you try it with uP? or connected it to the parallel port?
Hope you can share some more info. in using it.
Thanks.
作者: 阿死 時間: 2007-6-22 22:42
原帖由 dino_lo 於 2007-6-21 14:38 發表
只是應用廣,有人買,應是常用的種類.
led 背光,有少少心動,想買番個玩.
dino 買完 教我地玩
作者: kkjason 時間: 2007-6-23 00:43
我又等
作者: 綠袖子 時間: 2007-6-23 03:43
我想問有無人整一套現成既系統比人買?
作者: ktktkt 時間: 2007-6-23 15:21
I bought two pieces of that LCD (keep for later use). The guy just e-mailed me the circuit (as posted in previous posts) and the demo .hex (no source), so basically the .hex was useless (but the controller information KS0713 and the pinouts are important!). The controller is KS0713, I found the datasheet and rewrote the driver in C, tested the LCD with uP DS89C450 which is just a high speed 8051. The LCD was OK.
作者: palm3tong 時間: 2007-6-23 16:33
Woo.....
Can you give me information of how to do it? Or, would you mind to write a short "How-to", so that we can follow. Thanks.
作者: 檸檬 時間: 2007-6-23 17:25
我有5個16x2藍背光clcd有冇人有興趣呢?
作者: 大雄 時間: 2007-6-23 18:22
原帖由 檸檬 於 2007-6-23 17:25 發表
我有5個16x2藍背光clcd有冇人有興趣呢?
人地係GLCD wor
作者: kkjason 時間: 2007-6-23 20:28
原帖由 ktktkt 於 2007-6-23 15:21 發表
I bought two pieces of that LCD (keep for later use). The guy just e-mailed me the circuit (as posted in previous posts) and the demo .hex (no source), so basically the .hex was useless (but the co ...
可否分享心得
1.)我唔明個LCD 個Pin 12,13(RD/WR) 因為其他LCD 係共用的
2.) Pin 15(RES) 又點攪呢?
THX
作者: ktktkt 時間: 2007-6-23 20:36
原帖由 kkjason 於 2007-6-23 20:28 發表
可否分享心得
1.)我唔明個LCD 個Pin 12,13(RD/WR) 因為其他LCD 係共用的
2.) Pin 15(RES) 又點攪呢?
THX
Original I would like to post some portion of the C code here, but the system redirect me to a "Comming soon!" page and I can't post the code.
This LCD use 8080 MPU interface, so it use 2 pins (one for RD) and the other for WR, you can check the datasheet for details.
For pin 15, which is a Active LOW reset pin, which is used during the LCD init process.
作者: ktktkt 時間: 2007-6-23 21:00
You can simply use the circuit posted in previous posts as a reference. Datasheet of KS0713 can be found here
http://www.ortodoxism.ro/datashe ... tronic/mXyzvqzy.pdf
For the C source, I could provide the core portion, how to init, send commands etc. As I use
DS89C450, which is a high speed 8051 architecture uC, if you use 89S51 or 89S52 (normal speed),
you may have to adjust the timings. The core portion is:
Pin definitions:
/* Hardware */
#define LCD_DATA P1
sbit LCD_WR = P2^0; // write data (active LOW)
sbit LCD_RD = P2^1; // read data (active LOW)
sbit LCD_CS = P2^2; // chip select (active LOW)
sbit LCD_RS = P2^3; // command/data selection: 0=command, 1=data (A0)
sbit LCD_RST = P2^4; // reset (active LOW)
Key function declarations:
void lcdWriteData(uchar d);
void lcdWriteCommand(uchar c);
void lcdInit();
void lcdClear();
void lcdGotoXY(uchar x, uchar y); // (0-131, 0-7)
void lcdDisplayChr(uchar , FONT_DEF*) ;
void lcdDisplayStr(uchar* , FONT_DEF*) ;
Function definitions:
/*-------------------------------------------------------------------------------
Tempo for the LCD timing
-------------------------------------------------------------------------------*/
void lcdDelay(ulong u32Duration)
{
ulong u32Delay;
for (u32Delay=0; u32Delay<u32Duration; u32Delay++);
}
void lcdWriteData(uchar d) {
LCD_DATA = d; // place data
LCD_RS = 1; // write data
LCD_RD = 1;
LCD_WR = 0;
LCD_CS = 0; // enable chip
_nop_();_nop_();_nop_(); // wait at least 80ns
_nop_();_nop_();_nop_(); // wait at least 80ns
// lcdDelay(100);
LCD_CS = 1;
LCD_WR = 1;
lcdDelay(10);
}
void lcdWriteCommand(uchar c) {
LCD_DATA = c; // place data
LCD_RS = 0; // write command
LCD_RD = 1;
LCD_WR = 0;
LCD_CS = 0; // enable chip
_nop_();_nop_();_nop_(); // wait at least 80ns
_nop_();_nop_();_nop_(); // wait at least 80ns
// lcdDelay(100);
LCD_CS = 1;
LCD_WR = 1;
lcdDelay(10);
}
/*
LCD Initialization
lcdInit()
*/
void lcdInit(void)
{
lcdDelay(100); // wait for power stable
LCD_CS = 0; // chip enable
LCD_RST = 0; // reset
_nop_();_nop_();_nop_();
_nop_();_nop_();_nop_();
lcdDelay(100); // wait for power stable
LCD_RST = 1;
_nop_();_nop_();_nop_();
_nop_();_nop_();_nop_();
lcdWriteCommand(0xA6); // Normal Display
lcdWriteCommand(0xA0); // ADC normal
lcdWriteCommand(0x2F); // Power Control 111
lcdWriteCommand(0xC8); // Common Output Mode select (reversed)
lcdWriteCommand(0xA2); // LCD Bias
lcdWriteCommand(0xAC); // Static Inidcator OFF (double byte command)
lcdWriteCommand(0x00); // Static Inidcator OFF
lcdWriteCommand(0x24); // V5 Ra, Rb ratio (0x20-0x27)
lcdWriteCommand(0xEE); // Read-Write-Modify OFF
lcdWriteCommand(0x40); // start line = 0
lcdWriteCommand(0xB0); // page = 0
lcdWriteCommand(0x10); // Column = 0 (MSB)
lcdWriteCommand(0x00); // (LSB)
lcdWriteCommand(0x81); // Electronic Volume Set (double byte command)
lcdWriteCommand(0x13); // Electronic Volume Register (0x00-0x3F)
lcdWriteCommand(0xAF); // set display ON
lcdClear();
}
void lcdClear() {
uint i, j;
lcdWriteCommand(0xB0); // page = 0
for (i=0;i<8;i++) {
lcdWriteCommand(0xB0 | i); // page = i
lcdWriteCommand(0x10); // Column = 0 (MSB)
lcdWriteCommand(0x00); // (LSB)
for (j=0;j<132;j++) {
lcdWriteData(0x00);
}
}
}
/*
X (0-131), Y (0-7)
Note: X, Y here are screen coordinate (X is page, Y is column
*/
void lcdGotoXY(uchar x, uchar y) {
lcdWriteCommand(0xB0 | y); // page = y
lcdWriteCommand(0x10 | ((x & 0xF0) >> 4)); // Column = 0 (MSB)
lcdWriteCommand(x & 0x0F); // (LSB)
}
void main(void) {
uint i,j;
delay_ms(50);
delay_ms(100);
lcdInit();
lcdClear();
while (1) {
delay_ms(4000);
lcdClear();
lcdWriteCommand(0xB0); // page = 0
for (i=0;i<8;i++) {
lcdWriteCommand(0xB0 | i); // page
lcdWriteCommand(0x10); // Column = 0 (MSB)
lcdWriteCommand(0x00); // (LSB)
for (j=0;j<132;j++) {
if ((i % 2) == 0)
lcdWriteData(0xFF);
else
lcdWriteData(0x00);
}
}
delay_ms(4000);
lcdClear();
lcdWriteCommand(0xB0); // page = 0
for (i=0;i<8;i++) {
lcdWriteCommand(0xB0 | i); // page
lcdWriteCommand(0x10); // Column = 0 (MSB)
lcdWriteCommand(0x00); // (LSB)
for (j=0;j<132;j++) {
if ((i % 2) == 0)
lcdWriteData(0x00);
else
lcdWriteData(0xFF);
}
}
delay_ms(4000);
lcdClear();
lcdWriteCommand(0xB0); // page = 0
for (i=0;i<8;i++) {
lcdWriteCommand(0xB0 | i); // page
lcdWriteCommand(0x10); // Column = 0 (MSB)
lcdWriteCommand(0x00); // (LSB)
for (j=0;j<132;j++) {
lcdWriteData(0xF0);
}
}
delay_ms(4000);
lcdClear();
lcdGotoXY(0,0);
lcdDisplayStr("HELLO WORLD!", &Font_System3x6);
lcdGotoXY(10,2);
lcdDisplayStr("HELLO WORLD!", &Font_System5x8);
lcdGotoXY(20,4);
lcdDisplayStr("Hello World!", &Font_System7x8);
delay_ms(4000);
lcdClear();
lcdWriteCommand(0xB0); // page = 0
for (i=0;i<8;i++) {
lcdWriteCommand(0xB0 | i); // page
lcdWriteCommand(0x10); // Column = 0 (MSB)
lcdWriteCommand(0x00); // (LSB)
for (j=0;j<132;j++) {
lcdWriteData(0xFF);
}
}
delay_ms(4000);
lcdClear();
lcdWriteCommand(0xB0); // page = 0
for (i=0;i<8;i++) {
lcdWriteCommand(0xB0 | i); // page
lcdWriteCommand(0x10); // Column = 0 (MSB)
lcdWriteCommand(0x00); // (LSB)
for (j=0;j<132;j++) {
lcdWriteData(0x00);
}
}
}
}
作者: id19642000 時間: 2007-6-23 23:19
今天看過,解像度非常好,但背光不是太理想,剩下不多了,要買的快手,
作者: dino_lo 時間: 2007-6-26 09:35
ktktkt 大大的 c code 未識睇,只約知一二, 有了driver, 以後就好辦了.
再多謝 ktktkt 大大
作者: hilarycheng 時間: 2007-6-26 16:17
我想問, 電容專家係邊度, 我都想買塊....
作者: winglim7 時間: 2007-6-26 18:29
原帖由 hktvro 於 2007-6-22 06:08 發表
我買了一個 , 控制晶片是KS0713
will it ok to use that with 89s51 instead of 89s52??
thx
作者: ktktkt 時間: 2007-6-26 18:39
原帖由 winglim7 於 2007-6-26 18:29 發表
will it ok to use that with 89s51 instead of 89s52??
thx
YES. Actually you can control the LCD with any microcontroller (PIC, 8051, AVR etc.), the C code above are based on 8051 architecture (i.e. 8051, 89C51, 89S51, 89S52, and many more). To control the lcd, we just need to use the I/O port of the microcontroller. When we say the LCD controller is KS0713, it means that KS0713 command set (and control sequence) only, which is basically independent of the controlling microcontroller. If you don't mind to write PC program to control the LPT port, you can control the LCD with PC as well.
作者: palm3tong 時間: 2007-6-26 22:10
ktktkt,
What version of C are you using? I copy and pasted your C code into Keil and compile it, it generated a lot of syntax errors. Thanks.
作者: MCLL 時間: 2007-6-26 23:03
ktktkt 兄, 送你一個字 '勁'
作者: ktktkt 時間: 2007-6-27 09:14
原帖由 palm3tong 於 2007-6-26 22:10 發表
ktktkt,
What version of C are you using? I copy and pasted your C code into Keil and compile it, it generated a lot of syntax errors. Thanks.
I use Keil C as well, but I think you can't paste the code directly, as there is some header files for DS89C450, data type definition (such as the u32long etc.), font datatype and font bitmap array. You have to tailer the code a bit. I recommend:
you use standard datatype (such as int, unsigned char, etc.)
add the following functions:
void lcdWriteData(uchar d);
void lcdWriteCommand(uchar c);
void lcdInit();
void lcdClear();
void lcdGotoXY(uchar x, uchar y); // (0-131, 0-7)
Try the first few sections of the main
to init the lcd
to clear the lcd
to display a pattern
If you want to display character, you must have the font and corresponding function definition, they can be found on the Internet easily (but you have to tailer it).
作者: ktktkt 時間: 2007-6-27 09:23
It seems that quite a number of people are interested in using the LCD, and I am not very busy these days. I would start a new thread to share some experience in using these LCD, step by step from the very beginning (actually I am a beginner!)
I am sorry to type in English as I am very clumsy in typing Chinese (速成 only).
作者: ktktkt 時間: 2007-6-27 09:49 標題: Controlling LCD with a Microcontroller
LCD categories (part 1)
There are basically two types of LCD. One type is CPU-peripheral-like interface and the other is Video-like interface. The CPU-peripheral-like interface LCD is easier to be controlled by a microcontrollers (or the LPT), because it has build in controller which accept commands and data from the interface. What we need is to connect the LCD to the I/O port of a microcontroller (or LPT) and the program in the microcontroller sends the commands and data to the LCD, that is.
The standard 16x2 character LCD, 128x64, 240x128 are of this type. The controller in 16x2 LCD is usually HD44780 (or compatible), one example is here:
http://www.beyondlogic.org/parlcd/parlcd.htm
For graphical LCD, some standard controllers are KS0107/KS0108, T6963, KS0713 etc. The command set and control sequence are different for different LCD controller IC. So when you are going to buy a LCD, make sure you know the LCD controller IC, and the pinout, it makes your life much easier.
I will use the LCD mentioned in “電容專家有 18pin 的 lcd 仔買” as an example, but the general principles are applicable to all CPU-peripheral-like interface. As I know there is a thread discussing how to control the LCD with PC software such as LCDStudio. I will share experience in controlling the LCD with microcontroller. The platform is
18pin LCD (132x64) with KS0713 controller
8051 architecture uC (such as S51, S52, DS89C430/DS89C450 etc.)
Software in Keil C.
To be continued…
作者: ktktkt 時間: 2007-6-27 10:04
Hardware connections and LCD controlling method (part 2):
I use port P1 for the data bus (D0-D7), other pin definitions are as follows:
/* Hardware */
#define LCD_DATA P1
sbit LCD_WR = P2^0; // write data (active LOW)
sbit LCD_RD = P2^1; // read data (active LOW)
sbit LCD_CS = P2^2; // chip select (active LOW)
sbit LCD_RS = P2^3; // command/data selection: 0=command, 1=data (A0)
sbit LCD_RST = P2^4; // reset (active LOW)
LCD controlling method
To control a LCD, we must have the datasheet as it consists of the following key information:
Command set
Read/Write timing sequence
Other AC/DC characteristics
KS0713’s datasheet can be found here:
http://www.ortodoxism.ro/datashe ... tronic/mXyzvqzy.pdf
If you are going to write your own driver, you must read the datasheet. Even if you obtain the driver code from the Internet (I always do it!), you have to refer to the datasheet and tailor the code for your own projects.
Normally, we need three key functions:
To write a command to the LCD
To write a data to the LCD
To initialize the LCD
And some other supporting functions, for example clearing the screen, moving the cursor to a specific location, displaying a character, a string, a bitmap etc.
to be continued...
作者: ktktkt 時間: 2007-6-27 10:23
Writing command to the LCD (part 3)
To control the LCD, the controller IC defined a set of command (from datasheet), such as to turn of the display, set the cursor on/off etc.
The function is actually very simple, but you must read the timing sequence (from datasheet) very carefully to meet the setup time, hold time, requirements, etc. For slow uC (e.g. standard 11.0592Mhz 89C52), the requirements may be met easily. For high speed uC like DS89C450, some delay needed to be calculated/adjusted.
void lcdWriteCommand(unsigned char c) {
LCD_DATA = c; // place data
LCD_RS = 0; // write command when RS (register select = 0)
LCD_RD = 1; // write operation when (WR = 0 and RD = 1)
LCD_WR = 0;
LCD_CS = 0; // enable chip by setting CS (chip select = 0)
_nop_();_nop_();_nop_(); // wait for a bit, depends on the timing requirement
_nop_();_nop_();_nop_();
LCD_CS = 1; // disable chip select
LCD_WR = 1; // pull WR to high to finish the write cycle
lcdDelay(10); // some delay, sometimes can be omitted
}
// just a time delay loop, you may need to fix the datatype ulong for your case
void lcdDelay(ulong u32Duration)
{
ulong u32Delay;
for (u32Delay=0; u32Delay<u32Duration; u32Delay++);
}
to be continued...
作者: ktktkt 時間: 2007-6-27 10:26
Writing data to the LCD (part 4)
Sending data to LCD is similar to sending command. Some commands may have optional data to be sent and the graphical data is sent as data.
void lcdWriteData(uchar d) {
LCD_DATA = d; // place data on the bus
LCD_RS = 1; // write data when RS (register select = 1)
LCD_RD = 1; // write operation
LCD_WR = 0;
LCD_CS = 0; // enable chip
_nop_();_nop_();_nop_(); // wait, depends on timing requirement
_nop_();_nop_();_nop_();
LCD_CS = 1;
LCD_WR = 1;
lcdDelay(10);
}
to be continued...
作者: ktktkt 時間: 2007-6-27 10:29
A new thread sharing experience in controlling LCD with a Microcontroller
http://www.hkepc.com/bbs/viewthr ... &extra=page%3D1
作者: ktktkt 時間: 2007-6-27 10:49
Initializing the LCD (part 5)
Once we have the two functions to write command and data to the LCD. The next key one is to initialize the LCD. Each LCD controller IC defines its own initialization sequence and the default status after LCD RESET, these information are all specified in the datasheet. The initialization sequence usually involves:
Waiting for the power to become stable
Resetting the LCD
Setting the display options, configurations (You need not to set all of them as some are default settings after reset, but I usually set all of them explicitly to avoid confusion.)
Turning ON the display
Clearing the screen (as you wish!)
For more details on each settings, you can refer to the datasheet, but the followings are rather generic.
/*
LCD Initialization
lcdInit()
*/
void lcdInit(void)
{
lcdDelay(100); // wait for power to become stable
LCD_CS = 0; // chip enable
LCD_RST = 0; // send a Active LOW pulse to reset
_nop_();_nop_();_nop_(); // delay, depends on timing requirement
_nop_();_nop_();_nop_();
lcdDelay(100); // wait for power stable
LCD_RST = 1;
_nop_();_nop_();_nop_();
_nop_();_nop_();_nop_();
lcdWriteCommand(0xA6); // Normal Display
lcdWriteCommand(0xA0); // ADC normal
lcdWriteCommand(0x2F); // Power Control 111
lcdWriteCommand(0xC8); // Common Output Mode select (reversed)
lcdWriteCommand(0xA3); // LCD Bias (1=1/9 for ks0713)
lcdWriteCommand(0xAC); // Static Inidcator OFF (double byte command)
lcdWriteCommand(0x00); // Static Inidcator OFF
lcdWriteCommand(0x23); // V5 Ra, Rb ratio (0x20-0x27)
lcdWriteCommand(0xEE); // Read-Write-Modify OFF
lcdWriteCommand(0x40); // start line = 0
lcdWriteCommand(0xB0); // page = 0
lcdWriteCommand(0x10); // Column = 0 (MSB) (double byte command)
lcdWriteCommand(0x00); // (LSB)
lcdWriteCommand(0x81); // Electronic Volume Set (double byte command)
lcdWriteCommand(0x11); // Electronic Volume Register (0x00-0x3F)
lcdWriteCommand(0xAF); // set display ON
lcdClear();
}
Remarks: I changed back the value of LCD bias to A3 to match the KS0713 datasheet. (Originally, I set it as A2 as I based on ST7565 datasheet which has A2=1/9)
to be continued...
[ 本帖最後由 ktktkt 於 2007-7-16 10:23 編輯 ]
作者: ktktkt 時間: 2007-6-27 10:58
Clearing the screen (part 6)
Clearing the screen is simply sending 0x00 to the whole screen.
The LCD display is arranged as 132 columns x 8 pages, you can treat a ‘page’ as a row of height 8 pixels.
void lcdClear() {
uint i, j;
lcdWriteCommand(0xB0); // set page = 0 (i.e. row 0)
for (i=0;i<8;i++) {
lcdWriteCommand(0xB0 | i); // set page = i (i.e. row i)
lcdWriteCommand(0x10); // set column = 0 (MSB) (double byte command)
lcdWriteCommand(0x00); // (LSB)
for (j=0;j<132;j++) {
lcdWriteData(0x00); // write the data 0x00, auto increment column
}
}
}
to be continued...
作者: ktktkt 時間: 2007-6-27 11:06
Displaying a test pattern on the screen (part 7)
OK, we can now test the LCD with a test pattern!
void main(void) {
uint i,j;
delay_ms(100); // some delay to wait for power to become stable
lcdInit(); // initialize the LCD
lcdClear(); // clear the screen
while (1) {
delay_ms(2000);
lcdClear();
// display a test pattern
lcdWriteCommand(0xB0); // page = 0
for (i=0;i<8;i++) {
lcdWriteCommand(0xB0 | i); // page i
lcdWriteCommand(0x10); // Column = 0 (MSB)
lcdWriteCommand(0x00); // (LSB)
for (j=0;j<132;j++) {
if ((i % 2) == 0)
lcdWriteData(0xFF);
else
lcdWriteData(0x00);
}
}
}
}
That is!
作者: ktktkt 時間: 2007-6-27 11:08
Setting the pointer location (part 8)
/*
X (0-131), Y (0-7)
Note: X, Y here are screen coordinate (X is page, Y is column)
*/
void lcdGotoXY(uchar x, uchar y) {
lcdWriteCommand(0xB0 | y); // page = y
lcdWriteCommand(0x10 | ((x & 0xF0) >> 4)); // Column = 0 (MSB)
lcdWriteCommand(x & 0x0F); // (LSB)
}
Finished! I hope you would enjoy!
作者: ktktkt 時間: 2007-6-27 11:10
Displaying Characters
To display character, you need to define the font pattern in an array and have some supporting function to write the data out. There are quite a lot of samples on the Internet and the code are a bit lengthy. Please try to search and learn from them.
作者: palm3tong 時間: 2007-6-27 13:59
ktktk,
Thank you for your detail information and I will read, digest and try. Thank you again for your time and effort in helping us.
作者: dino_lo 時間: 2007-6-27 14:33
原帖由 palm3tong 於 2007-6-27 13:59 發表
ktktk,
Thank you for your detail information and I will read, digest and try. Thank you again for your time and effort in helping us.
![]()
ps:
pin31(/EA,VPP)tie-high(vcc), 選用內部rom. 如果只pull-high或者是空接,有可能唔work.
132564.hex 的demo 是用了port 0 做data, port 3 做control pin 的.
[ 本帖最後由 dino_lo 於 2007-6-27 14:46 編輯 ]
作者: ktktkt 時間: 2007-6-27 14:50
原帖由 dino_lo 於 2007-6-27 14:33 發表
![]()
真係要認真做.才會學到嘢.
ps:
pin31(/EA,VPP)tie-high(vcc), 選用內部rom. 如果只pull-high或者是空接,有可能唔work.
132564.hex 的demo 是用了port 0 做data, port 3 做cont ...
DELETED
[ 本帖最後由 ktktkt 於 2007-7-5 11:25 編輯 ]
作者: dino_lo 時間: 2007-6-27 16:24
在 lcdinfo 的 Forum 走了幾轉, 相信可以用 sed1565 的 driver, 和 接線方式,
有時間會試玩,初步估計如下
1, vss
2, vdd
3 ps
vdd,>> 3.3v!! 又有話3.3~5v 都係用3aa電池盒,串,一,兩支diode,做降壓.
vss>>>gnd
ps >>>tie gnd
4.~11 db7~db0,>>> lpt 的9~2
12/RD >>> lpt.16
13 /WR>>>LPT.14
14 RS>>>> LPT.1
15 /RESET>>>LPT.17
16 /CS>>>> GND ( 要check data sheet 先.)
17,18,>>>背光.3aa電池盒(是否加電阻? )
ks0713=s6b1713
[ 本帖最後由 dino_lo 於 2007-6-27 16:51 編輯 ]
作者: dino_lo 時間: 2007-6-27 16:30
原帖由 palm3tong 於 2007-6-22 21:32 發表
hi hktvro ,
I bought this one as well but can't make it work. I connected it to 89s51 (not 52) and burn the demo program and it didn't work. I only got the hex file of the demo program and can't ...
你check j1 是tie-vdd,定tie-gnd select 6800/8080
作者: ktktkt 時間: 2007-6-27 18:20
原帖由 dino_lo 於 2007-6-27 16:24 發表
在 lcdinfo 的 Forum 走了幾轉, 相信可以用 sed1565 的 driver, 和 接線方式,
有時間會試玩,初步估計如下
1, vss
2, vdd
3 ps
vdd,>> 3.3v!! 又有話3.3~5v 都係用3aa電池盒,串,一,兩支diode,做降壓 ...
I just read the datasheet of SED1565 and I think the instruction set is compatible, your idea might work! But for pin 3, I think it is C86 (to select 6800/8080 interface), as PS is used to select parallel or serial mode. Also, the LCD can be driven by 5V, as I use 5V for the whole system. Hope to see your experiment result!
Cheers!
作者: ktktkt 時間: 2007-6-27 18:23
原帖由 ktktkt 於 2007-6-27 18:20 發表
I just read the datasheet of SED1565 and I think the instruction set is compatible, your idea might work! But for pin 3, I think it is C86 (to select 6800/8080 interface), as PS is used to sele ...
If you try 5V, make sure to have a limiting resistor.
作者: dino_lo 時間: 2007-6-28 15:01
info 真係推到, sed1565 beta driver, serial mode,
pin 3 gnd>>>serial mode
J1 jumber >>> GND>>> 8080 MODE
作者: dino_lo 時間: 2007-6-28 15:43
Checked:
[attach]541789[/attach]
J1 on PCB side need to change to GND(near C7)
PS,PIN 3 connect to GND :set serial mode
connection as below
printer port lt_13264b
lpt.2---------- #5 DB6(SCLK)
lpt.3---------- #4 DB7(SDA)
lpt.4---------- #15 /RES
lpt.5---------- #16 /CS
lpt.6---------- #14 RS
lpt.7---------- #2 VDD, printer port 供電,或者用背光的電源.
背光,用了usb,過兩支1n4001 ,有3.39v ok 夠光.
lcd _info driver select SED1656 ,need dl from lcd_info forum
>Driver page.
[ 本帖最後由 dino_lo 於 2007-6-28 16:05 編輯 ]
作者: ktktkt 時間: 2007-6-28 19:37
原帖由 dino_lo 於 2007-6-28 15:43 發表
Checked:
[attach]541789[/attach]
J1 on PCB side need to change to GND(near C7)
PS,PIN 3 connect to GND :set serial mode
connection as below
printer port lt_13264b
lpt.2---------- #5 D ...
Congratulations! One more method to play with!
I took out the LCD and check J1, it seems that it is already connected to GND, isn't it?
作者: dino_lo 時間: 2007-6-28 20:00
MY LCD is not!
Every one should check J1 before use.
作者: kkjason 時間: 2007-6-28 20:12
原帖由 dino_lo 於 2007-6-28 20:00 發表
MY LCD is not!
Every one should check J1 before use.
即係short 左 J1 ???
remove 0ohm resistor and solder on J1?
作者: dino_lo 時間: 2007-6-28 20:35
J1 有一個,單行有三個 焊位( land) ,用一粒 000 marking 的 0ohm電阻, 來short vss 或者 vdd
你會check 到 一 邊是vss(gnd), 中間是 6800/8080 的select ,另一邊是vdd(3.3~5v)
[ 本帖最後由 dino_lo 於 2007-6-28 20:37 編輯 ]
作者: kkjason 時間: 2007-6-28 20:42
原帖由 dino_lo 於 2007-6-28 20:35 發表
J1 有一個,單行有三個 焊位( land) ,用一粒 000 marking 的 0ohm電阻, 來short vss 或者 vdd
你會check 到 一 邊是vss(gnd), 中間是 6800/8080 的select ,另一邊是vdd(3.3~5v)
哦...
依加即係要enable 8080?
比個GND 個lcd?
我塊lcd 同你樣default 係vdd
作者: dino_lo 時間: 2007-6-28 20:52
data sheet 上 叫 是 MI
節錄如下:
Microprocessor Interface select input in parallel mode.
MI = “H”: 6800 series MPU interface
MI = “L”: 8080 series MPU interface
作者: winglim7 時間: 2007-6-28 22:33
for my lcd, the J1 0 ohm resistor was connectd to the header direction....
(different from #38)
any brother have this kind of PCB version?
and will this kind will be ok with the original 89c52 code?
[ 本帖最後由 winglim7 於 2007-6-28 22:36 編輯 ]
作者: winglim7 時間: 2007-6-28 22:53
原帖由 dino_lo 於 2007-6-28 15:01 發表
info 真係推到, sed1565 beta driver, serial mode,
pin 3 gnd>>>serial mode
J1 jumber >>> GND>>> 8080 MODE
so, will it be ok to connect it to rs232 instead of lpt???
作者: dino_lo 時間: 2007-6-28 23:39
MSC-51 是 intel 的, 8080 也是!
j1 移去 c7 比較合理.
serial mode, 都不能直駁 rs-232, 要經 convertion去 ttl 的 logic,才有機會用.
作者: winglim7 時間: 2007-6-29 01:41
原帖由 dino_lo 於 2007-6-28 23:39 發表
MSC-51 是 intel 的, 8080 也是!
j1 移去 c7 比較合理.
serial mode, 都不能直駁 rs-232, 要經 convertion去 ttl 的 logic,才有機會用.
max232
作者: dino_lo 時間: 2007-6-29 08:46
原帖由 winglim7 於 2007-6-29 01:41 發表
max232![]()
補多張相,
[ 本帖最後由 dino_lo 於 2007-6-29 09:02 編輯 ]
作者: 大雄 時間: 2007-6-29 10:49
作者: dino_lo 時間: 2007-6-29 11:05
這塊panel 可以行 parallel mode ,
lcd info 用printer port 的 db1-db6 (pin2-pin7) serial mode 來推, nokia 7110 電話的lcd panel(sed1565) 和 ks0713 基本上相同不過driver 未完善,用唔晒個panel.
作者: winglim7 時間: 2007-6-29 12:25
不如做個小調查
有多少爸打塊lcd的 j1 是 vcc,
有多少爸打塊lcd的 j1 是 gnd
作者: ktktkt 時間: 2007-6-29 20:34
原帖由 dino_lo 於 2007-6-28 15:43 發表
Checked:
[attach]541789[/attach]
J1 on PCB side need to change to GND(near C7)
PS,PIN 3 connect to GND :set serial mode
connection as below
printer port lt_13264b
lpt.2---------- #5 D ...
When I saw your experiment result, I got a lot of queries. Your foundings was opposite to mine. So I read the datasheet again, check the hardware jumpers J1 and J2 again, and rewrite my driver to test my hypothesis. The results are as follows:
pin 3 is a pin to select Parallel/Serial mode, according to the datasheet, H means parallel and L means serial. A big question is:
You pull it to GND and use serial to drive it (through LCDinfo), it works.
I pull it to GND too, but I am driving the LCD in parallel mode (I am sure I am driving it in parallel mode, I wrote the driver!)
Jumper 1 in the PCB is originally connected to Vdd, no exception (all PCBs are the same), this pin is used to select 6800/8080 interface. For serial mode, actually it has no meaning at all, it is meaningful to parallel mode only (because serial mode does not use RD/WD pins at all, it uses SDATA and SCLK). According to the datasheet, Jumper 1 connected to Vdd means 6800 mode. A big question is: I am driving the LCD using 8080 interface timing sequence (and it works). When I saw your results, I was thinking if I reversed the mode, so I tried to rewrite the driver to use 6800 timing, it does NOT work. My conclusion is that J1 connected to Vdd is 8080 mode (in this LCD). Actually this founding matches the pinout given by the seller, because the two pins will be usually specified as RD and WR for 8080 interface, and RD/WR (one pin) and E (the other pin) for 6800 interface.
I really have a BIG question mark??? According to my testings, the definition of PS and MI(i.e. C86) pins of THIS LCD seems to be inverted (from the datasheet).
WHAT IS THE TRUTH??? I AM VERY CONFUSING NOW!
Could you try some combinations and test the results? Say pulling pin 3 to Vdd, remaining J1 to Vdd? and let us know the results?
Thanks
作者: ktktkt 時間: 2007-6-29 20:40
原帖由 dino_lo 於 2007-6-28 15:43 發表
Checked:
[attach]541789[/attach]
J1 on PCB side need to change to GND(near C7)
PS,PIN 3 connect to GND :set serial mode
connection as below
printer port lt_13264b
lpt.2---------- #5 D ...
Also, refering to the circuit given by the seller (demo), in message #11. Pin 3 is connected to GND and the microcontroller is driving the LCD in parallel mode (all D0-D7, and RD, WR, CS, RES, are connected).
作者: ktktkt 時間: 2007-6-29 20:48
原帖由 大雄 於 2007-6-29 10:49 發表
依塊野可以行LPT / RS232??
Some LCDs can be driven in both Parallel and Serial mode. But the serial mode is NOT the one used in RS232 (8N1 so on). It use 2 pins, one for serial data (SDATA) and one the clock (SCLK). Nokia phone 3310 LCD is using such serial mode.
作者: dino_lo 時間: 2007-6-29 23:33
I will try with J1 and PS change to other position again with LCD_INFO again.
1. I can try the PS tie high or tie low to see the parallel ,serial mode
2 .for J1 (MI) only affect in the parallel mode,right? So it will left for you to test if you can change the J1 position,near C7>>>GND, near header>>>VDD, that BOTH 6800 and 8080 will work as you expected
作者: dino_lo 時間: 2007-6-29 23:37
原帖由 ktktkt 於 2007-6-29 20:40 發表
Also, refering to the circuit given by the seller (demo), in message #11. Pin 3 is connected to GND and the microcontroller is driving the LCD in parallel mode (all D0-D7, and RD, WR, CS, RES ...
no one report that they can run the demo, yet!
作者: KSC 時間: 2007-6-30 00:07
我那個是
R1
XOO
沒接那個是gnd
現在個ohm接了去pin2
作者: ktktkt 時間: 2007-6-30 00:21
原帖由 dino_lo 於 2007-6-29 23:33 發表
I will try with J1 and PS change to other position again with LCD_INFO again.
1. I can try the PS tie high or tie low to see the parallel ,serial mode
2 .for J1 (MI) only affect in the para ...
I think we made a big mistake at the very begining. My new finding is:
pin3 is for controlling 6800 (when High), 8080 (when GND),
J1 is for parallel (when high), and serial (when GND)
So I made pin3 GND, J1 high, I can drive it in 8080 parallel mode.
And you made pin 3 GND, J1 low, and can drive it in serial mode.
I just tried:
pin 3 HIGH, and J1 high, and my 6800 parallel mode driver works!
I guess: if you make pin3 HIGH, and J1 low, you can drive it in serial mode (because pin3 actually don't bother)
作者: dino_lo 時間: 2007-6-30 15:49
我會話, 才35元, 咁睇就會唔介意了.
作者: 3K 時間: 2007-6-30 17:53
係喎 , 有無人整左個 demo 板呀 ?
我想知用咩software 轉一段 動畫GIF , 做 HEX
作者: 5dollar 時間: 2007-7-1 20:54
多謝dino_lo兄同 ktktkt 兄既資料,
我都成功用lcdhype推到.
另外個controller 好似唔係KS0713, 而係台灣NT7502/NT7532, 不過功能差不多.
網上搜過, 以上芯片同sed1565 唔係100%相容, 有少數command 有分別.
作者: winglim7 時間: 2007-7-1 21:03
原帖由 3K 於 2007-6-30 17:53 發表
係喎 , 有無人整左個 demo 板呀 ?
我想知用咩software 轉一段 動畫GIF , 做 HEX
demo 板????/
作者: KSC 時間: 2007-7-1 21:08
原帖由 3K 於 2007-6-30 17:53 發表
係喎 , 有無人整左個 demo 板呀 ?
我想知用咩software 轉一段 動畫GIF , 做 HEX
都無原裝個C/asm檔,有先知它係點入
要做個圖==>hex出來唔難,我可以寫個program出來
作者: ktktkt 時間: 2007-7-1 21:41
原帖由 5dollar 於 2007-7-1 20:54 發表
多謝dino_lo兄同 ktktkt 兄既資料,
我都成功用lcdhype推到.
另外個controller 好似唔係KS0713, 而係台灣NT7502/NT7532, 不過功能差不多.
網上搜過, 以上芯片同sed1565 唔係100%相容, 有少數command 有分別.
Which commands, can you identify?
作者: 5dollar 時間: 2007-7-1 22:48
haven't studied the datasheets but found some info here
http://www.crystalfontz.com/forum/showthread.php?t=4808
作者: MCLL 時間: 2007-7-1 23:12
今日都買了一個來玩玩, 不過其他沒太多時間, 等一下子先...
作者: 阿死 時間: 2007-7-1 23:22
合眾人之力, 一定成功
作者: hilarycheng 時間: 2007-7-1 23:32
我想請問, 可以係邊到買到 -
作者: MCLL 時間: 2007-7-1 23:44
原帖由 hilarycheng 於 2007-7-1 23:32 發表
我想請問, 可以係邊到買到 -![]()
SSP 公公, 婆婆 電容...
作者: bobbylwl 時間: 2007-7-1 23:47
我都想買個.............
不過我連clcd都搞唔掂
]作者: 3K 時間: 2007-7-1 23:50
原帖由 winglim7 於 2007-7-1 21:03 發表
demo 板????/
89C52 個 DEMO .
作者: vobiscum 時間: 2007-7-2 00:13
跪求Weltrend MCU 61P4 ISP programming 資料
作者: KSC 時間: 2007-7-2 00:14
原帖由 3K 於 2007-7-1 23:50 發表
89C52 個 DEMO .
有無高手將它用Disassembler 轉返做asm或C?
我試過用D51 8051/8052 Disassembler for MSDOS
不過看唔明
ps:我其實是想改用其他pin....(用80c4051去drive@ serial mode....)
pps:原作不要怪我,我用開果本書話,解人地program都是學習的一環
[ 本帖最後由 KSC 於 2007-7-2 00:16 編輯 ]
作者: MCLL 時間: 2007-7-2 00:29
原帖由 KSC 於 2007-7-2 00:14 發表
有無高手將它用Disassembler 轉返做asm或C?
我試過用D51 8051/8052 Disassembler for MSDOS
不過看唔明
ps:我其實是想改用其他pin....(用80c4051去drive@ serial mode....)
有沒有用過 8051 Emulator 之類的軟件呢? 那些都可以都是 Disassebler 來的; 試想想, 用那些 8051 Emulator 軟件, 即要開到 *.hex 或 *.bin 檔案, 然後, 多數有些是會有一個視窗顯示原本的程式, 不過一定會有少少分別, 那麼就要用少少腦筋啦...
我用這個 8051 Emulator
作者: KSC 時間: 2007-7-2 00:50
原帖由 MCLL 於 2007-7-2 00:29 發表
有沒有用過 8051 Emulator 之類的軟件呢? 那些都可以都是 Disassebler 來的; 試想想, 用那些 8051 Emulator 軟件, 即要開到 *.hex 或 *.bin 檔案, 然後, 多數有些是會有一個視窗顯示原本的程式, 不過一定會有 ...
我記得keil好像有,不過唔記得個step....本書借了比人
作者: KSC 時間: 2007-7-2 00:57
@@直接出現了?
ps:我是買了hdd那個
作者: tnovicet 時間: 2007-7-2 00:59
Assembler for the demo.hex
$MOD52
$PAGEWIDTH(132)
$DEBUG
$OBJECT
$NOPAGING
STACK DATA 2FH ; FROM 30H - 5FH
ORG 0000H ; POWER ON/RESET VECTOR
JMP ON_RESET
RETI
ON_RESET:
CLR P3.5
ACALL A156H
SETB P3.5
MOV A,#0E2H
ACALL A140H
MOV A,#0A0H
ACALL A140H
MOV A,#0C8H
ACALL A140H
MOV A,#0A3H
ACALL A140H
MOV A,#2FH
ACALL A140H
MOV A,#23H
ACALL A140H
MOV A,#81H
ACALL A140H
MOV A,#11H
ACALL A140H
MOV A,#40H
ACALL A140H
MOV A,#0A6H
ACALL A140H
MOV A,#0A4H
ACALL A140H
MOV A,#0AFH
ACALL A140H
ACALL A106H
A088H:
MOV A,#0A7H
ACALL A140H
MOV DPTR,#TABLE1
ACALL A124H
ACALL A169H
ACALL A169H
ACALL A169H
ACALL A169H
ACALL A169H
MOV A,#0A6H
ACALL A140H
MOV DPTR,#TABLE2
ACALL A124H
ACALL A169H
ACALL A169H
ACALL A169H
MOV DPTR,#TABLE3
ACALL A124H
ACALL A169H
ACALL A169H
ACALL A169H
MOV A,#0A7H
ACALL A140H
MOV DPTR,#TABLE4
ACALL A124H
ACALL A169H
ACALL A169H
ACALL A169H
MOV A,#0A6H
ACALL A140H
MOV DPTR,#TABLE5
ACALL A124H
ACALL A169H
ACALL A169H
ACALL A169H
MOV DPTR,#TABLE6
ACALL A124H
ACALL A169H
ACALL A169H
ACALL A169H
MOV A,#0A7H
ACALL A140H
ACALL A156H
MOV A,#0A6H
ACALL A140H
ACALL A156H
MOV A,#0A7H
ACALL A140H
ACALL A156H
MOV A,#0A6H
ACALL A140H
ACALL A156H
MOV A,#0A7H
ACALL A140H
ACALL A169H
ACALL A169H
ACALL A169H
ACALL A169H
ACALL A169H
AJMP A088H
A106H:
MOV R6,#0B0H
A108H:
MOV A,R6
ACALL A140H
MOV A,#10H
ACALL A140H
MOV A,#00H
ACALL A140H
MOV R5,#42H
A115H:
MOV A,#00H
ACALL A145H
MOV A,#00H
ACALL A145H
DJNZ R5,A115H
INC R6
CJNE R6,#0B8H,A108H
RET
A124H:
MOV R6,#0B0H
A126H:
MOV R1,#84H ; #80H
MOV A,R6
ACALL A140H
MOV A,#10H
ACALL A140H
MOV A,#02H
ACALL A140H
A133H:
MOV A,#00H
MOVC A,@A+DPTR
ACALL A145H
INC DPTR
DJNZ R1,A133H
INC R6
CJNE R6,#0B8H,A126H
RET
A140H:
NOP
CLR P3.4
SJMP A148H
A145H:
NOP
SETB P3.4
A148H:
SETB P3.2
CLR P3.6
MOV P0,A
CLR P3.3
NOP
SETB P3.3
SETB P3.6
RET
A156H:
MOV 40H,#02H
MOV 41H,#87H
MOV 42H,#13H
A15FH:
DJNZ 42H,A15FH
DJNZ 41H,A15FH
DJNZ 40H,A15FH
RET
A169H:
MOV 40H,#08H
MOV 41H,#0A1H
MOV 42H,#73H
A172H:
DJNZ 42H,A172H
DJNZ 41H,A172H
DJNZ 40H,A172H
RET
TABLE1:
TABLE2:
TABLE3:
TABLE4:
TABLE5:
TABLE6:
END
作者: KSC 時間: 2007-7-2 01:32
原帖由 tnovicet 於 2007-7-2 00:59 發表
Assembler for the demo.hex
$MOD52
$PAGEWIDTH(132)
$DEBUG
$OBJECT
$NOPAGING
STACK DATA 2FH ; FROM 30H - 5FH
ORG 0000H ; POWER ON/RESET VECTOR
JMP ON_RESET
RETI
ON_RESET:
...
可以簡單說明一下和原program的分別嗎?(例如有那些是不能逆的)
有那些是會轉了用其他表示法等等
作者: hilarycheng 時間: 2007-7-2 10:49 標題: 回復 #70 MCLL 的帖子
Thx, 睇完精華區就知道....
$35蚊, 有GLCD, 有BL -_-, 係邊到搵, 返賽格都難搵
快0的去買返幾塊
作者: palm3tong 時間: 2007-7-2 13:20
原帖由 palm3tong 於 2007-6-27 13:59 發表
ktktk,
Thank you for your detail information and I will read, digest and try. Thank you again for your time and effort in helping us.
![]()
ktktkt
just want to let you know. I can make it work both with the demo program and with the C code that ktktkt posted. I can send "something" to the LCD and display on it. Next step is to write something meaningful to it. More things to learn but anyway, thank you for your help.
作者: ktktkt 時間: 2007-7-2 15:29
原帖由 palm3tong 於 2007-7-2 13:20 發表
ktktkt
just want to let you know. I can make it work both with the demo program and with the C code that ktktkt posted. I can send "something" to the LCD and display on it. Next s ...
Contragulations! I just think the demo circuit and the demo program should be OK. The circuit is a very typical 8051 circuit, I can't see why the seller would 'play' us and release false information. DELETED
Thanks sharing! Cheers!
[ 本帖最後由 ktktkt 於 2007-7-5 11:27 編輯 ]
作者: ktktkt 時間: 2007-7-2 15:57
原帖由 5dollar 於 2007-7-1 22:48 發表
haven't studied the datasheets but found some info here
http://www.crystalfontz.com/forum/showthread.php?t=4808
I see! I check the datashseet of sed1565 and ks0713, the bias select value is a bit different. But when we say two LCDs are compatible, we mean they have the same command set and read/write timing only. The bias, duty ratio settings, driving voltage may depend on the LCD type, materials too. But from the software control point of view, they are compatible. That why the posts you mentioned also indicated that their software can drive both type of LCDs. Actually, when I tried the 18pin gLCD, I found that KS0713, SED1565, ST7565, S6B0724 are basically compatible, I actually wrote the driver based on ST7565, not KS0713.
作者: ktktkt 時間: 2007-7-2 17:28
Two more photos for sharing:
作者: Newbie 時間: 2007-7-2 18:08
聽日落去睇下仲有冇貨先^.^
作者: MCLL 時間: 2007-7-2 20:55
那兩幅相好毒...
作者: palm3tong 時間: 2007-7-2 21:41
ktktkt,
I am studying your code but found it difficult to understand.
You wrote:
delay_ms(4000);
lcdClear();
lcdGotoXY(0,0);
lcdDisplayStr("HELLO WORLD!", &Font_System3x6);
lcdGotoXY(10,2);
lcdDisplayStr("HELLO WORLD!", &Font_System5x8);
lcdGotoXY(20,4);
lcdDisplayStr("Hello World!", &Font_System7x8);
delay_ms(4000);
You didn't include the "lcdDisplayStr" function. Can you show me how to send the string to the LCD?
Thanks.
作者: ktktkt 時間: 2007-7-2 21:56
原帖由 palm3tong 於 2007-7-2 21:41 發表
ktktkt,
I am studying your code but found it difficult to understand.
You wrote:
delay_ms(4000);
lcdClear();
lcdGotoXY(0,0);
lcdDisplayStr("HELLO WORLD!" ...
I think you could ignore this part because I didn't include the font data and and the functions to use the font data (they are just based on the code posted, nothing special). If you are interested in that, you can just search the Interest and there are lots of coding examples. I just consolidate all their works and write my own drivers, so when I use a new microcontroller, I can just amend my library a bit and use it.
