7 segment counter from 0 to 9
Fri Jun 20 2014, 01:58 am
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? tqGinger92
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
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.
Powered by e107 Forum System