Searching \ for 'optrex lcd init code' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/lcds.htm?key=lcd
Search entire site for: 'optrex lcd init code'.

Truncated match.
PICList Thread
'optrex lcd init code'
1998\01\19@220351 by WIL REEDER

flavicon
face
Hi

I have several curcuits working with a pic 16c84 driving 1x16 generic lcd
displays. The larger displays have been a problem for me. I would
appreciate someone stepping me through the init code for the optrex
dmc40218. I understand that there is a code of 0x30 sent three times and
all of the display on cursor on/off stuff but I am still not getting
results. I may have things in the wrong order or may be missing something
entirely. My circuit is 8 bit ( not 4 like most of the lit on the net).
Thanks for your help!

Wil Reeder
spam_OUTteachtechTakeThisOuTspambc.sympatico.ca
Vancouver, Canada

1998\01\20@012916 by Ivan Kocher

flavicon
face
This is my first post to the list!

This is what I have done with a 16C56 and an Optrex 20x2 LCD module...
8bit interface.  Based on datasheet from Phillips LCD modules
Parallax assembler


LCDRW equ RA.1   ;Read/Write       out  18
LCDRS equ RA.2   ;Register Select  out  1
LCDE  equ RA.3   ;enable           out  2

LCD   equ 6      ; PortB bit7..0= pin 13 12 11 10 9 8 7 6


InitLCD
  ;8 bit interface 20x2  as page 10

;    wait 15ms
  movlw 72
  movwf tmp
  clrf wtmp
:L01
  nop
  decfsz wtmp
  goto :L01
  decfsz tmp
  goto :L01

  bcf LCDRW
  bcf LCDRS
  movlw 00111000b
  movwf PortRB
  nop
  bsf LCDE
  nop
  nop
  nop
  bcf LCDE     ;#1

;    wait 4.1ms
  movlw 20
  movwf tmp
  clrf wtmp
:L02
  nop
  decfsz wtmp
  goto :L02
  decfsz tmp
  goto :L02

  movlw 00111000b
  movwf PortRB
  nop
  bsf LCDE
  nop
  nop
  nop
  bcf LCDE     ;#2

;    wait 100us or more =>208us
  clrf wtmp
:L03
  nop
  decfsz wtmp
  goto :L03

  movlw 00111000b
  movwf PortRB
  nop
  bsf LCDE
  nop
  nop
  nop
  bcf LCDE     ;#3

  call Wait40us
  movlw 00111000b
  movwf PortRB
  nop
  bsf LCDE
  nop
  nop
  nop
  bcf LCDE     ;#4

  call Wait40us
  movlw 00001100b
  movwf PortRB
  nop
  bsf LCDE
  nop
  nop
  nop
  bcf LCDE     ;#5  Display On/Off

  call Wait40us
  movlw 00000001b
  movwf PortRB
  nop
  bsf LCDE
  nop
  nop
  nop
  bcf LCDE     ;#6  Display Clear

  movlw 10
  movwf tmp
  clrf wtmp
:L04
  nop
  decfsz wtmp
  goto :L04
  decfsz tmp
  goto :L04

  movlw 00000110b
  movwf PortRB
  nop
  bsf LCDE
  nop
  nop
  nop
  bcf LCDE     ;#7  Entry mode set

InitEnd


Now you just send data to it and wait 40us for it to end the operation,
or read the busy flag.

Ivan Kocher


WIL REEDER wrote:
{Quote hidden}

1998\01\20@063139 by ruben

flavicon
face
> Hi
>
> I have several curcuits working with a pic 16c84 driving 1x16 generic lcd
> displays. The larger displays have been a problem for me. I would
> appreciate someone stepping me through the init code for the optrex
> dmc40218. I understand that there is a code of 0x30 sent three times and
> all of the display on cursor on/off stuff but I am still not getting
> results. I may have things in the wrong order or may be missing something
> entirely. My circuit is 8 bit ( not 4 like most of the lit on the net).
> Thanks for your help!
>
> Wil Reeder
> teachtechspamKILLspambc.sympatico.ca
> Vancouver, Canada
>

Hello Wil

You might want to check out the LCD Technical FAQ. It's at

ftp://ftp.armory.com/pub/user/rstevew/LCD/lcdfaq.zip

or

http://www.paranoia.com/~filipg/HTML/LINK/F_LCD_menu.html

Thanks to this FAQ i got a display connected to a 16C57 up and
running in very short time.

Amongst other things it describes the initialization for both
4-bit and 8-bit mode in detail.


-----------------------------------
Ruben Jšnsson
AB Liros Elektronik, Sweden
.....maxrubenKILLspamspam.....mail.bip.net
-----------------------------------

1998\01\21@022553 by Tom Handley

picon face
  Wil, make sure you are in the 2-line mode and note the display address
for a 40 x 2 display. After the first 3 0x30's send 0x38. The address map
is (decimal):

     Line 1:  0 -> 39
     Line 2: 64 -> 103

  - Tom

At 06:55 PM 1/19/98 -0800, you wrote:
{Quote hidden}

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...