CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

lcd display *** Duplicate post

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
madhunica



Joined: 22 Dec 2013
Posts: 6

View user's profile Send private message

lcd display *** Duplicate post
PostPosted: Thu Dec 26, 2013 11:28 pm     Reply with quote


++++++++++++++++++++++
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

View user's profile Send private message

PostPosted: Thu Dec 26, 2013 11:49 pm     Reply with quote

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
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group