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 CCS Technical Support

pic18f4580 and LCD on port d

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



Joined: 17 Feb 2011
Posts: 1

View user's profile Send private message

pic18f4580 and LCD on port d
PostPosted: Thu Feb 17, 2011 8:00 am     Reply with quote

I am trying to drive LCD with 18f4580 on port d but with no success. I use driver that comes with 4.114 ccs compiler. This driver works fine for me with 16f876 on port b and 18f67j60 with pin access on two ports.
I want to know if there is some known issues about LCD, 18f4580 and port d.

Sometime LCD doesn't initialize. Sometime LCD shows some wrong symbols on a random places in a period of 3 sec (according to code).
Code:

#include <18F4580.h>
#fuses HS,NOPROTECT,NOLVP,NOWDT
#use delay(clock=20M)

#define LCD_DATA_PORT getenv("SFR:PORTD")

#include "LCD.c"

void main() {
   
   set_tris_e (0x00);
   set_tris_d(0x00);
   
   delay_ms(100);
   lcd_init();
   delay_ms(100);
   
   printf(lcd_putc,"\f123456789");
   delay_ms(3000);
   
   while(TRUE)
   {
   output_low(PIN_A2);
   printf(lcd_putc,"\fLow");
   delay_ms(3000);
   output_high(PIN_A2);
   printf(lcd_putc,"\fHigh");
   delay_ms(3000);
   }
}






I change the MCU and now everything works fine. I also order another MCU and check again to see if everything is fine with 3rd MCU or with second i was lucky Smile
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