![]() |
![]() 9 Value Crystal Clock Oscillator HC 49S Assorted 50 pcs US $14.00
|
![]() 50pcs 9 Value SMD Crystal Clock Oscillators 50 x pieces US $13.50
|
![]() 9 Value High Precision Crystal Clock Oscillator 45PCS US $9.95
|
| Powered by phpBay Pro |

Microcontroller and Applications?
Find the TMOD value for both Timer 0 and Timer 1 in mode 2, software start/stop (gate = 0), with the clock coming from the 8051's crystal.
A: mov tmod,#00100010b
my question is how do you derive at this answerr?!
Start with the 8031/8051 data book or programmer's guide and find the section on the TMOD SFR. You can also use my link, find the section titled "The TMOD SFR".
We are told that gate should be zero and both timers should be in mode 2 using the crystal as the clock.
So, bit 7 (GATE1) is 0 as given. Bit 6 (C/T1) should be 0 to use the crystal.
Bit 5 (T1M1) should be 1 for mode 2. Bit 4 (T1M0) should be 0 for mode 2. These are in the mode table.
The second timer is set the same as the first. So: Bit 3 (GATE0) is 0. Bit 2 (C/T0) should be 0. Bit 1 (T0M1) should be 1. Bit 0 (T0M0) should be 0.
Putting it together, we get 00100010, which is exactly what your answer says.


US $14.00

