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 troubles Help please

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



Joined: 26 Feb 2007
Posts: 1

View user's profile Send private message

LCD troubles Help please
PostPosted: Tue Feb 27, 2007 8:54 am     Reply with quote

Hello I have quite problem with LCD display. I am using standard 16x2 Lcd that was added to software prototyping board. In my code I add lcd.c libary and i tried to use init_lcd() function, unfortunatley the compiler seems to get stuck in that function and dose not go any further. Could you please send me a datasheet of that LCD. I the LCD.c only four wires are connected to LCD, but in the data sheet http://info.hobbyengineering.com/specs/MTC-C162DPRN-2N-V10.pdf all 8 are used. Could you expalin my how it is passible to manage LCD with only 4 wires ?
I am looking forward to hearing form you
WW
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Tue Feb 27, 2007 9:04 am     Reply with quote

Looking at the spec. sheet you posted, it will take a minimum of 10 wires to control the LCD. 2 for power, 1 for contrast, 4 for data lines and 3 for control signals. You might need to connect up the remaining wires.

Ronald
rnome



Joined: 18 Dec 2006
Posts: 20
Location: europe (Turkey)

View user's profile Send private message

PostPosted: Tue Feb 27, 2007 7:41 pm     Reply with quote

hi mate

i m workin on lcd for a week and i done it without any problem and i add my circuits schematic. ucan use it to fix yours



Code:


#include <16F877.h>
#device ADC=8 
#fuses XT,NOWDT,NOPROTECT,NOLVP
#use delay(clock=4000000)
#include <lcd.c>

void main()

int data_a0, data_a1;

   setup_adc_ports(ALL_ANALOG);
   setup_adc(ADC_CLOCK_DIV_8);   
   
   for(;;)
      {
      set_adc_channel(0);
      read_adc(ADC_START_ONLY);
      delay_us(100);
      data_a0=read_adc(ADC_READ_ONLY);
     
      set_adc_channel(1);
      read_adc(ADC_START_ONLY);     
      delay_us(100);
      data_a1=read_adc(ADC_READ_ONLY);
     
      lcd_init();
      lcd_gotoxy(1,1);

      printf(lcd_putc, "%03u 1.axis\n",data_a0);
      printf(lcd_putc, "%03u 2.axis\n",data_a1);
      delay_ms(200);
      }
}
and this codes can help u to test the circuit
_________________
live fast, never rest and do your best
rina
Guest







Re
PostPosted: Wed Feb 28, 2007 3:18 am     Reply with quote

hey dude,
the lcd blinks after a period of time.. wat to do then...
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