November 23, 2024, 12:26:22 PM

PIC-LCD

Started by r0cket, January 10, 2013, 01:22:59 PM

Previous topic - Next topic

r0cket

Hi. Tell me please where i can read about LCD.
LCD449STK - this is ?
in datasheet on your site only picture.

how it work ? why it has 48 legs? what registerg in there and other.... how work with this.

i use asembler.

thanks

LubOlimex

Hey r0ocket,

It is fairly simple to use it. It is a segment display and the table how to access each segment is situated here: https://www.olimex.com/Products/Components/LCD/LCD449STK/.

Example: you want to access segment A1 (the top dash of the first big letter after the plus/minus segment. You have to access Pin 1 and COM3.

More information how to work with the display can be gained from the examples of the board that has this display.  MSP430F449STK2 it is - https://www.olimex.com/Products/MSP430/Starter/MSP430-449STK2/.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

r0cket

void InitLCD(void) {
   
   // LCDCON -> 1/4 COM3-COM1, LCD Driver Enable, Enable Sleep Mode
   LCDCON    = 0x87;
   // LCDCON    = 0xC7;
   
   // LCDPS -> Prescaler 1/1, Active mode, Write to LCD data
   LCDPS    = 0x30;
   // LCD Segment select function
   LCDSE0    = 0xFF;
   LCDSE1    = 0x03;
   LCDSE2    = 0xFF;
   LCDSE3    = 0xFF;
   LCDSE4    = 0xFF;
   LCDSE5    = 0xFF;

what is it ? what is LCDCON ?

Example: you want to access segment A1 (the top dash of the first big letter after the plus/minus segment. You have to access Pin 1 and COM3.

if i do it - 5 segments is on and they off from some time


olimex

this is explained in MSP430 Users Manual, you really should read it before attempt to program the LCD controller so you know what is LCDCON etc

r0cket

it`s from test program for PIC

msp430 manual ?

https://www.olimex.com/Products/MSP430/Starter/MSP430-449STK2/

this ? are you read it ? it has 2 picture and no else.

olimex

sorry :) I was misleaded by the LCD this LCD we use for 449STK
sure the LCD registers for PIC-LCD are in PIC18LF8490 datasheet !

r0cket

it`s not datasheet.
it`s 2 picture.

where i can read about LCD? i want light 1 segment. what i must to do?

com = 1
s1 = 1? is it right?

or some before it. i need to do strobe? or it static?


LubOlimex

#7
Hey R0cket,

As Tsvetan said for PIC-LCD, check the PIC datasheet. The registers would depend on the controller! The explanation below is for PIC18F8490 only. I think this is the easier way to explain it.

Download this datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/39629c.pdf and the PIC-LCD's schematic: https://www.olimex.com/Products/PIC/Development/PIC-LCD/resources/PIC-LCD-SCH-REV-D.pdf and finally the example to run in MPLAB: https://www.olimex.com/Products/PIC/Development/PIC-LCD/resources/PIC-LCD_LCD.zip. Now you open the datasheet and go to page 257, PART22: LIQUID CRYSTAL DISPLAY (LCD) DRIVER MODULE. There are a lot of good tables and registers you might want to check but we will head for the table on page 279 (table 22-6). Now you have also to open the schematic of the PIC-LCD and zoom at the LCD part and also have the schematic of the display open. The rows of display table are pins of the processor with names S45 to S0 (and some extra names), that is why you need to check which pin is exactly representing your chosen symbol in the board's schematic(they are not shown in display's datasheet since you might use other video controller - not the mentioned PIC). After that you should see which of the four COMs it represents - depending on the row(being in second row means COM2, being in third row means COM3, etc). Then in PIC18F8490's datasheet (Table 22-6) you find the box which contains the Sxx (the number from the schematic for example S45 or S32) concatenated with Cx (COM number) - this will give you the register and the bit you need to set.

Please also check page 278 (22.11 Configuring the LCD Module). These are things to consider before setting any part of the module. Remember the above is true only for PIC18F8490, if you use MSP processor you have to do approximately the same but using the respective processor datasheet.

Here some explanation of the above visually: http://i.imgur.com/QNshu.png

I don't know if I explained it very well but this is the best explanation I can pull on the subject. The single page about the display is sufficient enough for the display, the rest depends on the video controller's datasheet.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

r0cket

oh sorry. i don`t know that pic8490 has lcd registers =( thanks. i will try