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
Содержание HT-IDE
Страница 11: ...P a r t I Integrated Development Environment Part I Integrated Development Environment 1 ...
Страница 12: ...HT IDE User s Guide 2 ...
Страница 20: ...Fig 1 6 Fig 1 7 HT IDE User s Guide 10 ...
Страница 24: ...HT IDE User s Guide 14 ...
Страница 70: ...HT IDE User s Guide 60 ...
Страница 76: ...HT IDE User s Guide 66 ...
Страница 92: ...HT IDE User s Guide 82 ...
Страница 93: ...P a r t I I Development Language and Tools Part II Development Language and Tools 83 ...
Страница 94: ...HT IDE User s Guide 84 ...
Страница 148: ...HT IDE User s Guide 138 ...
Страница 150: ...Fig 12 1 Fig 12 2 HT IDE User s Guide 140 ...
Страница 154: ...HT IDE User s Guide 144 ...
Страница 192: ...HT IDE User s Guide 182 ...
Страница 194: ...HT IDE User s Guide 184 ...
Страница 218: ...HT IDE User s Guide 208 ...
Страница 235: ...P a r t V Appendix Part V Appendix 225 ...
Страница 236: ...HT IDE User s Guide 226 ...
Страница 250: ...HT IDE User s Guide 240 ...