madhunica
Joined: 22 Dec 2013 Posts: 6
|
lcd display *** Duplicate post |
Posted: Thu Dec 26, 2013 11:28 pm |
|
|
++++++++++++++++++++++
Locked.
Reason: Duplicate thread on same lcd topic.
Add new questions to your original thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=51639
Do not use PicBasic Pro lcd driver. Use CCS lcd driver.
- Forum Moderator
++++++++++++++++++++++
Code: |
#include <16F877.h> // Preprocessor directive that selects the chip
#fuses HS,NOWDT,NOPROTECT,NOLVP // Preprocessor directive that defines the chip fuses
#use delay(clock=20000000) // Preprocessor directive that specifies clock speed
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7) // Preprocessor directive that includes RS232 libraries
#include "lcd.c"
#define ADC_CLOCK 3
#define LCD_RSBIT 1
#define LCD_EREG pin_b6
#define LCD_EBIT 1
#define LCD_COMMANDUS 2000
#define LCD_DATAUS 50
#define LCD_INITMS 1
#define LCD_INIT1
void main(void)
{
LCD_INIT();
int8 TRIS_valueB=0x00;
int8 tris_valuec=0x00;
set_tris_b(tris_valueb);
set_tris_c(tris_valuec);
output_bit(pin_b7,0x01);
output_bit(pin_b6,0x01);
while(true)
{
byte x,y,z;
printf("HiThere");
printf("%2u %X %4X\n\r",x,y,z);
printf(LCD_PUTC, "n=%u",1);
DELAY_ms(1);
}
} |
when i compile this program i found no error but i didn't get the simulator output......can you help me .... |
|
gpsmikey
Joined: 16 Nov 2010 Posts: 588 Location: Kirkland, WA
|
|
Posted: Thu Dec 26, 2013 11:49 pm |
|
|
don't know about the simulator (it has it's own series of bugs), but one problem you have is there needs to be a delay after reset goes away before you call LCD_INIT - the LCD controllers typically require additional time to power up before you can talk to them. Check out the spec sheets for the common controllers (or whatever one you are using).
mikey _________________ mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3 |
|