 |

|
Elektronika.lt portalo forumas
Jūs esate neprisijungęs lankytojas. Norint dalyvauti diskusijose, būtina užsiregistruoti ir prisijungti prie forumo.
Prisijungę galėsite kurti naujas temas, atsakyti į kitų užduotus klausimus, balsuoti forumo apklausose.
Administracija pasilieka teisę pašalinti pasisakymus bei dalyvius,
kurie nesilaiko forumo taisyklių.
Pastebėjus nusižengimus, prašome pranešti.
Dabar yra 2025 03 10, 12:26. Visos datos yra GMT + 2 valandos.
|
|
|
 |
Forumas » Mikrovaldikliai » lcd asamblerio kode nesupratimas
|
Jūs negalite rašyti naujų pranešimų į šį forumą Jūs negalite atsakinėti į pranešimus šiame forume Jūs negalite redaguoti savo pranešimų šiame forume Jūs negalite ištrinti savo pranešimų šiame forume Jūs negalite dalyvauti apklausose šiame forume
|
|
|
 |
 |
lcd asamblerio kode nesupratimas |
Parašytas: 2009 02 06, 00:23 |
|
|
|
tokiame puslapyje http://www.8052.com/tutlcd radau kaip uzprogramuoti lcd 16x2 akraniuka. bet man tokia kodo vieta kelia nesupratimu
WAIT_LCD:
CLR EN ;Start LCD command
CLR RS ;It's a command
SETB RW ;It's a read command
MOV data,#0FFh ;Set all pins to FF initially
SETB EN ;Clock out command to LCD
MOV A,data ;Read the return value
JB ACC.7,WAIT_LCD ;If bit 7 high, LCD still busy
CLR EN ;Finish the command
CLR RW ;Turn off RW for future commands
RET
cia tokia eilute yra JB ACC.7,WAIT_LCD ; O pries ta eilute parasyta MOV DATA,#0FFh o pries ta eilute yra mov A,data, tai skaiciu ff ikelia A regstra. ir poto tikrina ar septintas A registro bitas yra vienetas ar ne. jeigu vienetas tai suolis vel i wait_lcd. tai cia gaunas kaip begalybes ciklas juk programiskai irasom A registro 7 bitus vienetus. niekaip tos vietos as nesuprantu  |
|
|
|
|
 |
 |
Re: lcd asamblerio kode nesupratimas |
Parašytas: 2009 02 06, 09:12 |
|
|
|
pcwortex rašo: |
tokiame puslapyje http://www.8052.com/tutlcd radau kaip uzprogramuoti lcd 16x2 akraniuka. bet man tokia kodo vieta kelia nesupratimu
WAIT_LCD:
CLR EN ;Start LCD command
CLR RS ;It's a command
SETB RW ;It's a read command
MOV data,#0FFh ;Set all pins to FF initially
SETB EN ;Clock out command to LCD
MOV A,data ;Read the return value
JB ACC.7,WAIT_LCD ;If bit 7 high, LCD still busy
CLR EN ;Finish the command
CLR RW ;Turn off RW for future commands
RET
cia tokia eilute yra JB ACC.7,WAIT_LCD ; O pries ta eilute parasyta MOV DATA,#0FFh o pries ta eilute yra mov A,data, tai skaiciu ff ikelia A regstra. ir poto tikrina ar septintas A registro bitas yra vienetas ar ne. jeigu vienetas tai suolis vel i wait_lcd. tai cia gaunas kaip begalybes ciklas juk programiskai irasom A registro 7 bitus vienetus. niekaip tos vietos as nesuprantu  |
po kodo prierašas:
Citata: |
Programming Tip: The above routine does the job of waiting for the LCD, but were it to be used in a real application a very definite improvement would need to be made: as written, if the LCD never becomes "not busy" the program will effectively "hang," waiting for DB7 to go low. If this never happens, the program will freeze. Of course, this should never happen and won't happen when the hardware is working properly. But in a real application it would be wise to put some kind of time limit on the delay--for example, a maximum of 256 attempts to wait for the busy signal to go low. This would guarantee that even if the LCD hardware fails, the program would not lock up.
|
kitaip sakant, reikia viską atidžiai perskaityti kai nesi tame dirbęs. |
|
|
|
|
 |
 |
|
 |
|
 |
Google paieška forume |
|
 |
Naujos temos forume |
|
 |
FS25 Tractors
Farming Simulator 25 Mods,
FS25 Maps,
FS25 Trucks |
 |
ETS2 Mods
ETS2 Trucks,
ETS2 Bus,
Euro Truck Simulator 2 Mods
|
 |
FS22 Tractors
Farming Simulator 22 Mods,
FS22 Maps,
FS25 Mods |
 |
VAT calculator
VAT number check,
What is VAT,
How much is VAT |
 |
LEGO
Mänguköök,
mudelautod,
nukuvanker |
 |
KCD2 Mods
Installing KCD 2 Mods,
KCD 2 Guides,
KCD 2 Cheats |
 |
FS25 Mods
FS25 Harvesters,
FS25 Tractors Mods,
FS25 Maps Mods |
 |
Dantų protezavimas
All on 4 implantai,
Endodontija mikroskopu,
Dantų implantacija |
 |
FS25 Mods
FS25 Maps,
FS25 Cheats,
FS25 Install Mods |
 |
GTA 6 Wiki
GTA 6 Map,
GTA 6 Characters,
GTA 6 News |
 |
FS25 Mods
Farming Simulator 25 Mods,
FS25 Maps |
 |
ATS Trailers
American Truck Simulator Mods,
ATS Trucks,
ATS Maps |
|

|
 |