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

PVC160203P LCD & pic16f84a test program

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







PVC160203P LCD & pic16f84a test program
PostPosted: Wed Dec 29, 2004 5:27 am     Reply with quote

Hi !

I have buyed this LCD display ( 2 x 16 ) but i can't find any schematics for pins (on the lower side you have 14 pins + K,A pins) and ond left side power (PICVUE).

Thus anyone knows which pins ( on PIC and LCD ) must i use to write
simple program like "Hello world" on LCD ?

This is the basic, but what pins to use ?
------------------------------------
#include <16F84a.h>
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock = 1200000) //----------12 MHZ XT
#include "lcd.c"

void main()
{
lcd_init();
printf(lcd_putc,"First Line");
printf(lcd_putc,"\nSecond Line");
while(1);
}
------------------------------------
Guest








PostPosted: Wed Dec 29, 2004 9:13 am     Reply with quote

Hi there,

you can find the datasheets here :
http://www.picvue.com.tw/Product_sn/index2_1602.htm

Regards
Michael.
Coax
Guest







PVC160203P LCD & pic16f84a test program
PostPosted: Wed Dec 29, 2004 12:12 pm     Reply with quote

Thanx Michael !
I found the datasheets.

Can u point me how to define the pins for PIC 16f84a to make some test program for LCD ?




Thanx in advance
Guest








PostPosted: Wed Dec 29, 2004 12:53 pm     Reply with quote

Hi, here is a small quote from lcd.c file :

Quote:
// As defined in the following structure the pin connection is as follows:
// D0 enable
// D1 rs
// D2 rw
// D4 D4
// D5 D5
// D6 D6
// D7 D7
//
// LCD pins D0-D3 are not used and PIC D3 is not used.

// Un-comment the following define to use port B
// #define use_portb_lcd TRUE


With this small text program (Your own) :

Code:

#include <16F84a.h>
#fuses XT, NOWDT, NOPROTECT
#use delay(clock = 1200000) //----------12 MHZ XT
#define use_portb_lcd TRUE
#include "lcd.c"

void main()
{
   lcd_init();
   printf(lcd_putc,"First Line");
   printf(lcd_putc,"\nSecond Line");
   while(1);
}


the #define use_portb_lcd TRUE lets the compiler know that we are going to use port B
on the PIC (a PIC16F84A doesnt have a Port D that are default used) so you Pin layout will look like this :

Code:
PIC   LCD
B0    Enable
B1    RS
B2    RW
B4    D4
B5    D5
B6    D6
B7    D7


Pins D0-D3 arent used as we are talking to the LCD in 4bit mode.

Regards
Michael
mkent



Joined: 09 Sep 2003
Posts: 37
Location: TN, USA

View user's profile Send private message

PostPosted: Thu Dec 30, 2004 12:58 am     Reply with quote

Hello coax, Your #use delay(clock) is not 12 MHZ but 1.2 MHZ.
Happy New Year to all. Mick
Coax
Guest







PVC160203P LCD & pic16f84a test program
PostPosted: Thu Dec 30, 2004 4:02 am     Reply with quote

Hi !

Thanx !. I will try it and i will send replay today or tomorrow !

p.s. Thanx for typing error, corection :-)
cambo
Guest







PostPosted: Thu Oct 11, 2007 2:26 am     Reply with quote

I also had this problem, thanks.
hoong
Guest







pls help me
PostPosted: Sat Jun 14, 2008 9:46 am     Reply with quote

can i have a full c program including all the part that i need to enter into my program so that i can test my 16x2 LCD ?? Thank... can email me to cheunhoong@hotmail.com
thx alot
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