Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 7th November 2008, 07:07 PM   #1
Default Control of EW 162 LCD display module

Hello Everybody!

On last year I have bought from a Hungarian Microchip-reseller-company an EDT LCD module, type is EW-162G0Gr. It is a 2 rowed, 2x16 pcs 5x7 black LCD display with backlight.

I would like to control it with PIC16F628A, internal 4 MHz oscillator. I wrote in the original initialization routine, but it is not works - ellectronic of this display has a BF flag, with which it can sign, when is not allowed any writing operation, while electronic is working.

I wrote the program, and wait 1->0 transition; it has not comes. What is the problem? May I wait more before actions?

fejesg
fejesg is offline  
Old 7th November 2008, 07:52 PM   #2
Default

So, I use this type metod; after it, cursor shall blinking:

fejesg

Quote:
; 8 bits init
;
; wait 15-20 millisec No data should be transferred to or from the display during this time.
;
; RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
; 0 0 0 0 1 1 x x x x Function Set Command: (8-Bit interface)
; BF (BF=R/W !!!)cannot be checked before this command.
;
; wait 5 millisec No data should be transferred to or from the display during this time.
;
; 0 0 0 0 1 1 x x x x Function Set Command: (8-Bit interface)
; BF cannot be checked before this command.
;
; wait 100 mikrosec No data should be transferred to or from the display during this time.
;
; 0 0 0 0 1 1 x x x x Function Set Command: (8-Bit interface)
; After this command is written, BF can be checked.
;
; BF=DB7, which connected to RB3, BF=1 please wait, BF=0, ready
varak
banksel TRISB
bsf TRISB,3 ; change output to input
banksel PORTB
bsf PORTA,7 ; RW
btfsc PORTB,3
goto varak
bcf PORTA,7 ; RW
banksel TRISB
bcf TRISB,3 ; back to output
;
; 0 0 0 0 1 1 N F x x Function Set
; (Interface = 8 bits, Set No. of lines and display font)
;
; 0 0 0 0 0 0 1 0 0 0 Display OFF
; 0 0 0 0 0 0 0 0 0 1 Clear Display
; 0 0 0 0 0 0 0 1 I/D S Entry Mode Set:
; 0 0 0 0 0 0 1 1 C B Display ON (Set C and B for cursor/Blink options.)
;
;Initialization Complete, Display Ready.
;BF should be checked before each of the instructions starting with Display OFF.
fejesg is offline  
Old 7th November 2008, 08:03 PM   #3
Default

I "translated" command lines orientate of PORTB&LCD connections:

Quote:
; LCD data 0-1-2-3-4-5-6-7
; 6.bit RB2, 7.bit RB3 7-6-5-4-0-1-2-3
btfsc PARANCS,0
bsf PORTB,7
btfsc PARANCS,1
bsf PORTB,6
btfsc PARANCS,2
bsf PORTB,5
btfsc PARANCS,3
bsf PORTB,4
btfsc PARANCS,4
bsf PORTB,0
btfsc PARANCS,5
bsf PORTB,1
btfsc PARANCS,6
bsf PORTB,2
btfsc PARANCS,7
bsf PORTB,3
return
fejesg is offline  
Reply

Tags
162, control, display, lcd, module

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
max6960 and LED matrix dot display module neko_whisker General Electronics Chat 7 13th November 2006 04:55 PM
Nokia 3586i LCD display module opinion needed Hopperito Micro Controllers 10 27th February 2005 03:21 PM
NSM 4012 Display module dratomic Datasheet/Parts Requests 0 17th February 2005 10:16 PM
Multi-Array LED Display Module shreik Micro Controllers 2 19th November 2004 02:47 PM
Interfacing IBM PS/2 Server95 Display Module brotulix Electronic Projects Design/Ideas/Reviews 0 3rd November 2004 11:18 PM



All times are GMT. The time now is 07:13 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker