| ??? 02/09/03 20:54 Read: times |
#38670 - please check this code, suggestions |
I have gone through the tutorial but still the question is not answered:-
if some one asks you whats the difference between a Counter and Timer , what is your answer not the tutorial one? Next please check if iam on the right track about writing program for 1 second delay:- Using 12 Mhz crystal. 12/12 = 1000000 timer will increment in a second. so we need to increment the timer 1000000 times in a second to get a 1 second delay. But since the 16 bit timer will over flow after 256*256=65536 finding other value:- For this lets say i have selected a rounded value 50000, Now i will multipy this by some number in order know how many times the counter should count 0-50000 to get a value of 1000000. so 50,000 x 20 = 1000000 so my code should be such that timer count from 0-50000 20 times. now for values of TH0 and TL0:- doing the following subraction 65536 -50000 ------- 15536 decimal now converting the above into HEX MOVing the left hand 2 digits in THO and moving right hand side 2 digits in TLO Is it ok... But if it is, then writing a code for 1 Minute requires NESTED LOOPS coz it will require 50000 x 20 x60 times counter should runs... is there any easier way out... |
| Topic | Author | Date |
| please check this code, suggestions | 01/01/70 00:00 | |
| RE: please check this code, suggestions | 01/01/70 00:00 | |
| RE: please check this code, suggestions | 01/01/70 00:00 | |
| Thanks for all the help.. | 01/01/70 00:00 | |
| RE: please check this code, suggestions | 01/01/70 00:00 | |
| RE: an added note | 01/01/70 00:00 | |
| RE: an added note - Erik | 01/01/70 00:00 | |
| RE: an added note - Erik | 01/01/70 00:00 | |
| RE: an added note - Erik | 01/01/70 00:00 | |
RE: an added note - Erik | 01/01/70 00:00 | |
| RE: please check this code, suggestions | 01/01/70 00:00 |



