با سلام
در حال شروع پروژه ای با کد ویژن3.12 و مگا128 هستم و موردی پیش اومده که نیاز به راهنمایی دارم.
یک GLCDts12864a-2egaea روی پورت های A وC درایو شده و یک LED روی پین چهار از پورت D،
// Graphic Display Controller initialization
// The KS0108 connections are specified in the
// Project|Configure|C Compiler|Libraries|Graphic Display menu:
// DB0 - PORTC Bit 0
// DB1 - PORTC Bit 1
// DB2 - PORTC Bit 2
// DB3 - PORTC Bit 3
// DB4 - PORTC Bit 4
// DB5 - PORTC Bit 5
// DB6 - PORTC Bit 6
// DB7 - PORTC Bit 7
// E - PORTA Bit 0
// RD /WR - PORTA Bit 1
// RS - PORTA Bit 2
// /RST - PORTA Bit 3
// CS1 - PORTA Bit 4
// CS2 - PORTA Bit 5
// Specify the current font for displaying text
glcd_init_data.font=font5x7;
// No function is used for reading
// image data from external memory
//glcd_init_data.readxmem=NULL;
// No function is used for writing
// image data to external memory
//glcd_init_data.writexmem=NULL;
glcd_init(&glcd_init_data);
با حذف ستینگ مربوط به GLCD پورت D کار میکنه و در غیر اینصورت عملکرد میکرو مختل میشه. میشه راهنمایی بفرمایید؟
در حال شروع پروژه ای با کد ویژن3.12 و مگا128 هستم و موردی پیش اومده که نیاز به راهنمایی دارم.
یک GLCDts12864a-2egaea روی پورت های A وC درایو شده و یک LED روی پین چهار از پورت D،
// Graphic Display Controller initialization
// The KS0108 connections are specified in the
// Project|Configure|C Compiler|Libraries|Graphic Display menu:
// DB0 - PORTC Bit 0
// DB1 - PORTC Bit 1
// DB2 - PORTC Bit 2
// DB3 - PORTC Bit 3
// DB4 - PORTC Bit 4
// DB5 - PORTC Bit 5
// DB6 - PORTC Bit 6
// DB7 - PORTC Bit 7
// E - PORTA Bit 0
// RD /WR - PORTA Bit 1
// RS - PORTA Bit 2
// /RST - PORTA Bit 3
// CS1 - PORTA Bit 4
// CS2 - PORTA Bit 5
// Specify the current font for displaying text
glcd_init_data.font=font5x7;
// No function is used for reading
// image data from external memory
//glcd_init_data.readxmem=NULL;
// No function is used for writing
// image data to external memory
//glcd_init_data.writexmem=NULL;
glcd_init(&glcd_init_data);
با حذف ستینگ مربوط به GLCD پورت D کار میکنه و در غیر اینصورت عملکرد میکرو مختل میشه. میشه راهنمایی بفرمایید؟
دیدگاه