EASy68K  
It is currently Tue Dec 11, 2018 11:49 am

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Tue Dec 20, 2011 12:08 pm 
Offline

Joined: Fri Nov 18, 2011 2:40 am
Posts: 4
Location: Malaysia
hello.. right now, im doing my mini project on microP... i was assigned to make a digital voltmeter... i ve a problem to initialize the lcd... can u help me with the programming..??? thank you...!!!

_________________
PokJak


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 20, 2011 12:26 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1087
You did not provide enough information and we do not do homework questions on this forum.

_________________
Prof. Kelly


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 20, 2011 2:54 pm 
Offline

Joined: Fri Nov 18, 2011 2:40 am
Posts: 4
Location: Malaysia
we try to make coding for voltmeter using lcd but we have a problem to initilize the lcd...we want to make Function Set: 8-bit, 2 Line, 5x7 Dots..
we were using lcd 16 x 2..if u can help us check this voltmeter coding that we have made... we new in this assembly language so it a little bit hard for us... we doing this coding by our own understanding for the voltmeter function and assembly language...
latch 1 connected pin en,rs,rw at lcd meanwhile latch2 connected to D0-D7...
Code:

START      ORG      $1000
BUFFER      EQU      $400000
LATCH   EQU      $600000
LATCH2      EQU      $800000
EN         EQU      7
RS         EQU      5
RW         EQU      6
INTR         EQU      0

INIT         MOVE.B   #$38,LATCH2
         BCLR      #RS,LATCH
         BCLR      #RW,LATCH
         BSET      #EN,LATCH
         BCLR      #EN,LATCH
         BSR      DELAY
         MOVE.B   #$0E,LATCH2
         BCLR      #RS,LATCH
         BCLR      #RW,LATCH
         BSET      #EN,LATCH
         BCLR      #EN,LATCH
         BSR      DELAY
         MOVE.B   #$01,LATCH2
         BCLR      #RS,LATCH
         BCLR      #RW,LATCH
         BSET      #EN,LATCH
         BCLR      #EN,LATCH
         BSR      DELAY
         MOVE.B   #$06,LATCH2
         BCLR      #RS,LATCH
         BCLR      #RW,LATCH
         BSET      #EN,LATCH
         BCLR      #EN,LATCH
         BSR      DELAY

DELAY      MOVE.B      #50,D2
LOOP         SUB.B      #1,D2
         CMP.B      #0,D2
         BNE      LOOP   
         RTS   




thank you..

_________________
PokJak


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 20, 2011 7:08 pm 
Offline

Joined: Mon Jul 26, 2010 11:43 pm
Posts: 198
Location: Aurora, IL
Does this LCD module have a part number? It is really hard to troubleshoot these kinds of things without adequate information or code comments.

Have you considered the initial conditions for LATCH ?

You might want to consider halting the process after INIT is complete, and perhaps have it send some characters to the display.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 21, 2011 3:43 pm 
Offline

Joined: Fri Nov 18, 2011 2:40 am
Posts: 4
Location: Malaysia
sorry... i dont know what you mean by LCD part number... what i discover at the LCD board is VCM162A... and for the initial condition of the latch.. i dont understand what u means... what can i explain here is i want to make an digital voltmeter using LCD as the display... my circuit using one ADC, one BUFFER and two LATCH... the ADC will be connected to BUFFER and the BUFFER will be connected to the two LATCH... LATCH1 will be connected to pin EN,RS,RW of the LCD... the LATCH2 will be connected to D0-D7 of the LCD... we are using Trainer Ablelogic... i want to show you the circuit but i dont know how to upload it here... thank you again...

_________________
PokJak


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 21, 2011 6:22 pm 
Offline

Joined: Mon Jul 26, 2010 11:43 pm
Posts: 198
Location: Aurora, IL
So basically something like this, with an HD44780 or equivalent controller (ie ST7066).

http://www.jameco.com/Jameco/Products/ProdDS/658890.pdf

I don't think you've put any code in there beyond initializing the display. You'll need to pay particular attention to the delays required between commands and signal transitions. Other commands will expect you to wait for a busy status.

You certainly want to be using subroutines to send the data/commands to the display so the source does not expand out of control.

You should start out by clearing RW RS and the DATA

There are commands to clear the screen, set the x,y cursor position, read busy status.

Sending data with RS high puts characters on the screen.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 24, 2011 1:41 pm 
Offline

Joined: Fri Nov 18, 2011 2:40 am
Posts: 4
Location: Malaysia
ok3... thanx clive
i got the initialization...
the program i made will on the LCD and display "digital voltmeter"...
as i want to do a voltmeter...
i will use the ADC and buffer as the input...
the ADC will be connect to two probe...
i still blank how to make the LCD can detect what output of ADC...
do u have any idea...?

_________________
PokJak


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 24, 2011 3:43 pm 
Offline

Joined: Mon Jul 26, 2010 11:43 pm
Posts: 198
Location: Aurora, IL
izzat wrote:
i still blank how to make the LCD can detect what output of ADC...

It really doesn't work like that.

You will have to write code to read the ADC, and then convert that reading into a human readable voltage number, and then display that number on the LCD. Then you'll want to wait a fraction of a second, and repeat the procedure.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group