clr
LCM_CTRL.E
;low (trigger)
endif
ret
;== delay ==
delay:
;=delay for a while=
mov
dtmp,a
drep:
sdz
dtmp2
;count down dtmp2
jmp
drep
sdz
dtmp
;count down dtmp
jmp
drep
ret
end ;module
Program description
The program begins by calling in include files and by defining the LCM to
be on Port B. The LCM control lines are defined on Port C. External
modules are also declared to define whether the LCM is in 4-bit or 8-bit
mode.
The LCM will automatically conduct an internal reset during power-up.
However most program controlled LCMs will still utilize software for their
initialization. In this example the code begins at ’start’ by running some
initialization code. According to the data for the HD44780, there needs to
be at least 4.5 ms delay between each program. This is the function of the
LCM_DELAY code section. Before the LCM initialization has been carried
out it is not possible to check the status of BUSY. To issue instructions to
the LCM refer to the HD44780 instruction definitions. The code section
LCM.INC contains several often used instructions. Before the LCM writes
instructions it must first check whether LCM is in a busy condition. The
code section BUSY_CHK exists to check the BUSY status of the LCM. After
checking this, data can then be sent to the LCM. The ASCII codes to be
displayed should be placed in the last page of the program, and a table look
up method used to place the data in the accumulator, from where the code
section WRITE_CHAR can display it on the LCM.
Operation truth table of signal RS, R/W and E:
HT-IDE User’s Guide
202
Summary of Contents for HT-IDE
Page 11: ...P a r t I Integrated Development Environment Part I Integrated Development Environment 1 ...
Page 12: ...HT IDE User s Guide 2 ...
Page 20: ...Fig 1 6 Fig 1 7 HT IDE User s Guide 10 ...
Page 24: ...HT IDE User s Guide 14 ...
Page 70: ...HT IDE User s Guide 60 ...
Page 76: ...HT IDE User s Guide 66 ...
Page 92: ...HT IDE User s Guide 82 ...
Page 93: ...P a r t I I Development Language and Tools Part II Development Language and Tools 83 ...
Page 94: ...HT IDE User s Guide 84 ...
Page 148: ...HT IDE User s Guide 138 ...
Page 150: ...Fig 12 1 Fig 12 2 HT IDE User s Guide 140 ...
Page 154: ...HT IDE User s Guide 144 ...
Page 192: ...HT IDE User s Guide 182 ...
Page 194: ...HT IDE User s Guide 184 ...
Page 218: ...HT IDE User s Guide 208 ...
Page 235: ...P a r t V Appendix Part V Appendix 225 ...
Page 236: ...HT IDE User s Guide 226 ...
Page 250: ...HT IDE User s Guide 240 ...