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

how to configure LCD using 16f913

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



Joined: 06 Mar 2007
Posts: 92
Location: Pune,India

View user's profile Send private message AIM Address Yahoo Messenger

how to configure LCD using 16f913
PostPosted: Fri May 04, 2007 12:26 am     Reply with quote

Dear Sir,
here i am using 16f913, MPLAB 7.5 Ver. & CCS PCM C Compiler, Version 3.249, 34534.
1st time i am using this lcd driver.
I read Ex_92lcd.c but i didnt understand this,
[/code]//
Digit segments A B C D E F G DP
// b7 b6 b5 b4 b3 b2 b1 b0
#define DIGIT4 COM1+26, COM1+17, COM2+17, COM3+26, COM2+25, COM1+25, COM2+26, COM3+17
#define DIGIT3 COM1+24, COM1+16, COM2+16, COM3+24, COM2+23, COM1+23, COM2+24, COM3+16
#define DIGIT2 COM1+22, COM1+19, COM2+19, COM3+22, COM2+21, COM1+21, COM2+22, COM3+19
#define DIGIT1 COM1+20, COM1+18, COM2+18, COM3+20, COM2+28, COM1+28, COM2+20, COM3+18

In this example How you did COM1+24,COM2+17,COM3+26 etc & etc.
So plz tell me how enable the segments to display the numbers 0 to 9
_________________
Thank You,
With Best Regards,
Deepak.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri May 04, 2007 6:38 pm     Reply with quote

I don't have the CCS LCD demo board, but here's how I think it works:

The Ex_92lcd.c file shows how to use a PIC 16C924 with a multiplexed
drive LCD that has 3 common (COM) pins and 12 segment pins.
The #define statements shown in your post are used to tell the CCS
lcd functions about the connections between the PIC and the LCD pins.
These connections are made with traces on a printed circuit board.

To understand how the connections are selected, you need to download
the data sheets for the PIC and the LCD.

Download the 16C924 data sheet here:
http://ww1.microchip.com/downloads/en/DeviceDoc/30444e.pdf
The PIC pins are shown on page 3 for the PLCC package. Notice that it
has pins for SEG00 to SEG28, and it also has pins for COM0 to COM3.
The Ex_92lcd.c file uses 12 segment pins on the right side of the PLCC
package: SEG16-SEG28 (There is no SEG27 pin). This is done to allow
making an easy printed circuit board layout.

I don't know for certain what LCD is used by CCS, but I think it's
probably similar to the Varitronix VIM-404-DP:
http://www.varitronix.com/Product/LCD/VIM-404-DP(R0).pdf
This LCD has 4 digits and 3 decimal points. It has 12 pins for the LCD
segments and 3 pins for the COM signals. The important pages in the
data sheet are:
Page 2: Shows the names of the segments in a digit (letters: a-g).
Page 4: Shows the 12 segment connections.
Page 5: Shows the 3 common connections.

Assuming that the Varitronix LCD is used by CCS, here are the
connections between the LCD and the PIC, as given in Ex_92lcd.c:
Code:

PIC       PIC pin   LCD     LCD 
Signal    (PLCC)    pin     signal

COM0       63       N/C     none   
COM1       62       11      COM1
COM2       61       20      COM2
COM3       60        8      COM3

SEG16      48        6      Digit 3 -- segments b, c, DP
SEG17      49        7      Digit 4 -- segments b, c  (no DP)
SEG18      50        4      Digit 1 -- segments b, c, DP
SEG19      51        5      Digit 2 -- segments b, c, DP
SEG20      53       18      Digit 1 -- segments a, g, d
SEG21      54       17      Digit 2 -- segments e, f
SEG22      55       16      Digit 2 -- segments a, g, d
SEG23      56       15      Digit 3 -- segments e, f
SEG24      57       14      Digit 3 -- segments a, g, d
SEG25      58       13      Digit 4 -- segments e, f
SEG26      59       12      Digit 4 -- segments a, g, d
SEG28      52       19      Digit 1 -- segments e, f

Notes: The LCD digits are numbered from 1-4, starting from
the left side. The PIC is the 16C924 in the PLCC package.

Based on this information, you can now tell how the settings in the
#define statements for the DIGITx constants are determined. They
are done by specifying the COMx and SEGxx pins on the PIC that go
to each segment on the LCD.
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