Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/01/05 16:32
Read: times


 
#104518 - answer for tmod problem
Responding to: ???'s previous message


hi,

as we know tmod register is used for timer or counter mode control. tmod is the 8bit register in which,lower 4 bit is used for timer/counter 0 & higher 4 bit is used for timer/counter 1,
open ur reference book,see the bits of tmod.ok now i m coming to ur problem.(always remember tmod is byte addressable register,we cant configure bit wise,we have to configure byte wise)

mov tmod,#02h
here 'h' is representing its a hexa decimal number so when it will be store in tmod the configuration will be 0000 0010,so timer 0 mode 2 will be selected.

mov tmod,#11010101b

gate c/bar(t) m1 m0 | gate c/bar(t) m1 mo
|
1 1 0 1 | 0 1 0 1

higher 4 bitS is telling....
its a counter 1 in mode 1 ,& THE COUNTER WILL RUN WHEN

TR1 BIT -'HIGH' AND EXTERNAL INTERRUPT 'INT1'--'HIGH'.SO BOTH MUST BE HIGH TO START THE COUNTER.

LOWER 4 BITS IS TELLING....
COUNETR 0 IN MODE 1,AND IT WILL START WHEN ONLY TR0 BIT WILL BE 'HIGH',
the combination of counter and timer which can be selected by tmod,c- counter,t- timer
c|c
c|t
t|c
t|t

hope u got it

List of 14 messages in thread
TopicAuthorDate
TMOD            01/01/70 00:00      
   Math            01/01/70 00:00      
   TMOD            01/01/70 00:00      
      clarification            01/01/70 00:00      
         Eh???            01/01/70 00:00      
            thanks            01/01/70 00:00      
               Not quite...            01/01/70 00:00      
                  direct addressing            01/01/70 00:00      
                     The point being...            01/01/70 00:00      
         answer for tmod problem            01/01/70 00:00      
            Tutorial???            01/01/70 00:00      
   which is a whole lot easier to read            01/01/70 00:00      
   answer for tmod problem            01/01/70 00:00      
      Samirul, I am sure that Paul has been pa            01/01/70 00:00      

Back to Subject List