亮第一行,说明1602应该没有坏。我写的程序很简单,只是想先让1602亮,程序如下:
#include <m8c.h> // part specific constants and macros
#include "PSoCAPI.h" // PSoC API definitions for all User Modules
void main()
{
BYTE LCD_SOLID_BG;
LCD_1_Start();
LCD_1_InitBG(LCD_SOLID_BG);
LCD_1_DrawBG(0,0,16,72);
LCD_1_DrawBG(1,3,10,32);
}
显示程序
include <m8c.h> // part specific constants and macros
#include "PSoCAPI.h" // PSoC API definitions for all User Modules
void main()
{
char theStr[] = "PSoC LCD"; // Define RAM string
LCD__1_Start(); // Initialize LCD
LCD_1_Delay50uTimes(BYTE 2);
LCD__1_Position(0,5); // Place LCD cursor at row 0, col 5.
LCD_PrString(theStr); // Print "PSoC LCD" on the LCD
} |