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

16F887 and serial LCD

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Wohn
Guest







16F887 and serial LCD
PostPosted: Thu Feb 12, 2009 8:52 pm     Reply with quote

I'm having a problem getting my LCD to work. NHD-0216K3Z-NSW-BBW and here is my code. Im just trying to get the backlight to turn on, and nothing is happening at all. Any help would be appreciated.

Code:
#include "16F887.h"
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_A0,invert, BITS=8, PARITY=N)
#fuses INTRC_IO,NOWDT,PUT,NOMCLR,NOPROTECT,NOCPD,NOBROWNOUT,NOIESO,NOFCMEN,NOLVP,NOWRT,BORV40

void main()
{
   delay_ms(1000);
   putc(0xFE);
   delay_ms(2);
   putc(0x53);
   delay_ms(2);
   putc(0x04);
   while(1);
}
Wohn
Guest







Solved
PostPosted: Fri Feb 13, 2009 10:36 am     Reply with quote

Well it seems that the default baud rate was not set on the LCD. I reset it by putting the LCD into i2c mode and that resets the baud.
Display posts from previous:   
Post new topic   Reply to topic    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