WhyWhy
Member level 4
- Joined
- Mar 18, 2013
- Messages
- 68
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Activity points
- 1,779
Hi guys,
i know how to display word in LCD,but how i display the current time and date.
Thanks for help.
Regards,
YY
i know how to display word in LCD,but how i display the current time and date.
Thanks for help.
Code:
#include<htc.h>
#include<pic.h>
#define RS RB2
#define EN RB3
#define D4 RB4
#define D5 RB5
#define D6 RB6
#define D7 RB7
#define _XTAL_FREQ 8000000
#include "lcd.h"
void main()
{
int i;
TRISB = 0x00;
Lcd4_Init();
while(1)
{
Lcd4_Set_Cursor(1,1);
Lcd4_Write_String("LCD Hello World");
for(i=0;i<15;i++)
{
__delay_ms(1000);
Lcd4_Shift_Left();
}
for(i=0;i<15;i++)
{
__delay_ms(1000);
Lcd4_Shift_Right();
}
Lcd4_Clear();
Lcd4_Set_Cursor(2,1);
Lcd4_Write_Char('e');
Lcd4_Write_Char('S');
__delay_ms(2000);
}
}
Regards,
YY