• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::


Browsing this Thread:   1 Anonymous Users






Re: lcd自建字型顯示疑問
#4
初級會員
初級會員


查看用戶資訊
CG RAM 可自建8個字型 每個字型需要8位元組

CGRAM 指令碼 0b01AAAAAA /A=ADDRESS

如要將 第1個字型 放在 DDRAM 0位址
首先 設定 CGRAM指令碼 0b01000000 寫入lcd
接著 寫入 字型的第一個位元組

設定 CGRAM指令碼 0b01000001 寫入lcd
接著 寫入 字型的第2個位元組
連續寫入8次就能完成1個字型

DDRAM ADDRESS = 1 CGRAM指令碼 0b01001000 寫入lcd

DDRAM ADDRESS = 2 CGRAM指令碼 0b01010000 寫入lcd

每次開機需要都要執行1次

發表於: 2005/6/23 18:49
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: lcd自建字型顯示疑問
#3
新會員
新會員


查看用戶資訊
謝謝你!那假如我用18f452寫的話,我要怎樣把自己建的字寫入CG_RAM裡ㄋ?我現在不知道要如何寫入ㄋ?可否給我一點方向謝謝你!

發表於: 2005/6/23 11:32
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: lcd自建字型顯示疑問
#2
初級會員
初級會員


查看用戶資訊
far rom unsigned char LCD_cha_up[] = {0x00,0x00,0x04,0x0E,0x15,0x04,0x04,0x00}; //UP CHAC
far rom unsigned char LCD_cha_down[] = {0x00,0x00,0x04,0x04,0x15,0x0E,0x04,0x00}; //DOWN CHAC

void LCD_character_code (void)
{

unsigned char char_address;
unsigned char char_counter;

char_address = 0x48; // ↑ 字型CGRAM位址

for(char_counter = 0;char_counter < 8;char_counter++)
{
SetDDRamAddr(char_address);
putcLCD(LCD_cha_up[char_counter]);
char_address++;
}

char_address = 0x50; // ↓ 字型CGRAM位址

for(char_counter = 0;char_counter < 8;char_counter++)
{
SetDDRamAddr(char_address);
putcLCD(LCD_cha_down[char_counter]);
char_address++;
}

}

*上箭頭 ↑ ADDRESS = 01H
*下箭頭 ↓ ADDRESS = 02H

用矩陣方式將碼寫入CGRAM 每個字型需8個位元組 由第一排開始寫入 可自行劃8X8方格 將顯示的點 設1不顯示設0

顯示自建字型跟顯示一般字型一樣將自建字型放入的ADDRESS寫入LCD就能顯示



發表於: 2005/6/22 23:12
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


lcd自建字型顯示疑問
#1
新會員
新會員


查看用戶資訊
請問各位大大!假如我lcd要用自建字型顯示!我是用旁邊的程式去try的!請問又從何修改阿!謝謝各位大大!

發表於: 2005/6/22 13:34
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------