2015-01-20 06:41 AM
2015-01-20 08:16 AM
A warning is not an error.
When posting code please use the format code block (Paintbrush [<>]), and if refering to specific line numbers IDENTIFY them. The default of ASCII strings in the compiler is signed chars, so either change your code to match that or cast. Or see if there is a compiler option. Print(100,90,(unsigned char *)''0123456789'',0xffff,0x0054);2015-01-20 08:27 AM
I'm using
emblocks
2.30
now
I'll try.
thank you very much
2015-01-20 09:00 AM
yes, this problem is solved.
bin \ Debug \ sa.map | 1 | Program size (bytes): 3764 | || Data size (bytes): 948 | || BSS size (bytes): 32 | || ---------------- | || Total size (bytes): 4744 (R / W Memory: 980) | ||| || === Build finished: 0 errors, 0 warnings (0 minutes, 3 seconds) === | /****************************************************************************************/ There's a problem. LCD 8-bit data port. I will be writing only How do I set the data port? thank you very much/****************************************************************************/
void LCD_InitializePorts(void)
{
// Configure PB0~PB7 ----------------------------------
// DB0-DB7 lcd data
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);
GPIO_StructInit(&GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1|GPIO_Pin_2 | GPIO_Pin_3|GPIO_Pin_4 | GPIO_Pin_5|GPIO_Pin_6 | GPIO_Pin_7;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;//GPIO_Mode_Out_OD;
GPIO_Init(PORT, &GPIO_InitStructure);
//GPIO_Write(PORT, _WR | RS | (0xFF << B0));
// C portu------------------
//
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE);
GPIO_StructInit(&GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1 ; // Pin_0=RES//(RST ) //// GPIO_Pin_1 = CS
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_OD;
GPIO_Init(REST, &GPIO_InitStructure);
}
void Write_Data(unsigned char DH,unsigned char DL)
{
GPIO_SetBits(PORT, GPIO_Pin_9);//RS=1;
GPIO_ResetBits(REST, GPIO_Pin_1);//CS=0;
//???? =DH; // PB0~PB7 How do I set the data port?
GPIO_ResetBits(PORT, GPIO_Pin_8);//_WR=0;
GPIO_SetBits(PORT, GPIO_Pin_8);//_WR=1;
// ????=DL; // PB0~PB7 How do I set the data port?
GPIO_ResetBits(PORT, GPIO_Pin_8);//_WR=0;
GPIO_SetBits(PORT, GPIO_Pin_8);//_WR=1;
GPIO_SetBits(REST, GPIO_Pin_1);//CS=1;
}