Discussion in "8051 Discussion Forum" started by    Ginger92    Jun 15, 2014.
Fri Jun 20 2014, 01:58 am
#11


and also the displayroutine... tq so much >.<

Ginger92


We try to help,rather than write all your code.
In displayroutine move the pattern that matches maincount
to the display.
So if maincount is 0 move 40h to the port
mov p0,#40h

If maincount is 1 move 79h to the port
mov p0,#79h

The compare instruction might be useful CJNE


What suppose to have in waitinc/waitdec and the maincount? tq

Ginger92


Nothing else is needed at waitinc: it is just a label.
In incRoutine and decRoutine you just have to change the count
but make sure the count does not go below 0 or above 9.
again The compare instruction might be useful CJNE


[ Edited Fri Jun 20 2014, 02:06 am ]
Wed Jun 25 2014, 10:29 am
#12
You need to first learn to decode the 7-segment display as you're connecting it directly to the controller port. if you are finding it difficult then use a BCD to 7-segment converter so you do not have to worry about converting your numbers to segment values. I posted a link in my previous post which make you understand how to decode segments.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

FrabSeby
Thu May 16 2024, 07:31 pm
PeterGem
Thu May 16 2024, 06:27 am
Timothywalay
Thu May 16 2024, 04:40 am
Timothypet
Wed May 15 2024, 06:14 pm
RandyBence
Wed May 15 2024, 02:00 pm
JordanDic
Wed May 15 2024, 01:55 pm
DavidDeelf
Wed May 15 2024, 11:16 am
ytaletjkca
Wed May 15 2024, 09:45 am