Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech Chapter 2 Section 2.1:- 1. 8 bit 2. 8 bit 3. 8 bit 4. PSW (Program Status Word) is of 16 bit. 5. Necessary (for literal value). 6. 28H and it is kept in accumulator. 7. (a),(d),(g) are illegal and for f only 0 is required before F5H 8. (c),(d) are illegal. 9. 44H and kept in Accumulator (A). 10.1EH and kept in Accumulator (A). Section 2.4 21.0000H 22.Program counter will look for the location 0000H and if the program is not starting for that address, it will consider that there is no program written so program has to start from the location 0000H. 26.Lowest Memory is 0000H and the Highest memory is FFFFH.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
Chapter 2Section 2.1:-
1. 8 bit2. 8 bit3. 8 bit4. PSW (Program Status Word) is of 16 bit.5. Necessary (for literal value).6. 28H and it is kept in accumulator.7. (a),(d),(g) are illegal and for f only 0 is required before F5H8. (c),(d) are illegal.9. 44H and kept in Accumulator (A).10.1EH and kept in Accumulator (A).
Section 2.4
21.0000H22.Program counter will look for the location 0000H and if the program is not
starting for that address, it will consider that there is no program written so program has to start from the location 0000H.
26.Lowest Memory is 0000H and the Highest memory is FFFFH.
MOON
Highlight
MOON
Sticky Note
8 bit;;;; true answer is DPTR,PC
MOON
Highlight
MOON
Highlight
MOON
Sticky Note
Also 'g'
MOON
Sticky Note
Q-27==>32Kbytes Q28==> 1Kbyte
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
Section 2.5:-
29.Solved below,(Data) (Locations)
E 200A 201R 202T 203H 204
9 2058 2067 207- 2086 2095 20A
Section 2.6:-
31.8 bit32.And 33.
D7 D6 D5 D4 D3 D2 D1 D0CY AC F0 RS1 RS0 OV -- P
34.We know that in 8051 registers are of 8 bits CY Flag is raised when the carry is generated beyond past the max value that a register can store like FFH + 1.
35.AC is raised when a carry is generated from D3 to D4. Like
Mov a,#0FH
Add a,#1
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
q1=255 ;;; q2=instruction next to it;;; q3=PC ;;; q4=short jump & 2;;; q5=long jump & 3;;; q6=it takes 2 bytes to execute q7=False ;;; q8=True ;;; q9=LJMP ;;; q10=2bytes because 1 byte is opcode like LJMP but 2nd byte is address of target location with range -128 to 127 unlike LJMP;;; q11=True
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
23.That’s because Stack works on the concept of LIFO so if the push is implied 2 times for instance, then pop must be used 2 times exactly.
Section 3.3:-
27. T = 1.2usec F = 1/T = 833.333KHz System frequency = 833.333KHz*12 = 10MHz
28. F = 18MHz F =18MHZ/12 =1.5MHz T = 1/F =1/1.5MHz T = 0.666usec
29. F = 12MHz F =12MHZ/12 =1MHz T = 1/F =1/1.5MHz T = 1usec
30. F = 25MHz F =25MHZ/12 = 2.08MHz T = 1/F =1/2.08MHz T = 0.48usec
32. F = 11.0592MHz F =11.0592MHZ/12 = 921.6KHz T = 1/F = 1/921.6KHZ T = 1.085usec
MOON
Sticky Note
so that RET command may return the address to PC for execution of statements after CALL.
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
DELAY:MOV R3,#150 1 machine cycleHERE:NOP 1 mc NOP 1NOP 1DJNZ R3,HERE 2 mc RET 2The time delay of the HERE loop is [150(2+1+1+1)]*1.085usec=0.813msecNow for the instruction outside the loop (mov and ret), (2+1)*1.085Usec = 3.25usecNow 0.813ms + 3.25usec = 0.8162msec
33. F = 16MHz F =16MHZ/12 = 1.33333MHz T = 1/F = 1/1.33333MHZT = 0.75usec
DELAY:MOV R3,#200 1HERE:NOP 1 NOP 1 NOP 1 DJNZ R3,HERE 2 RET 2The time delay of the HERE loop is [200(2+1+1+1)]*0.75usec=0.75msecNow for the instruction outside the loop (mov and ret), (2+1)*0.75usec = 2.25usecNow 0.75ms + 2.25usec = 0.75225msec
34. F = 11.0592MHz F =11.0592MHZ/12 = 921.6KHz T = 1/F = 1/921.6KHZT = 1.085usec
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
DELAY:MOV R5,#100 1BACK: MOV R2,#200 1AGAIN:MOV R3,#250 1HERE:NOP 1 NOP 1 DJNZ R3,HERE 2 DJNZ R3,AGAIN 2DJNZ R3,BACK 2 RET 2The time delay of the HERE loop is [250(2+1)]*1.085usec=1.085msecThe time delay of the AGAIN loop it repeats 200 times so , 1.085msec*200 = 0.217 + (3*200*1.085usec) = 0.2176sThe time delay of the BACK loop, it is repeated 100 times so 0.2176*100=21.76sec
Time Delay = 21.76sec
35.Try it yourself it’s just like 34 with only 2 loops instead of 3 loope.
36. To 39.For the problems from 36 to 39 everything remains the same except the time delay that is changed due to the change of Microcontroller now you must take Clock of DS89C420/30 Microcontroller i.e equal to 1 rather than 12 that was for 8051.
40.Yes it is 12 times faster because it only have 1 clock and on the other hand 8051 have 12 clocks so if we decrease the clocks our microcontroller becomes faster.
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
Chapter 4:-
Section 4.1:-
1. 402. VCC 40TH PIN And GND9TH PIN3. 32 Pins4. 8 Pins and from 32 to 39.5. 8 Pins and from 1 to 8.6. 8 Pins and from 21 to 28.7. 8 Pins and from 10 to 17.8. Input 9. P0 (Port 0)10.P1 (Port 1)
11.ORG 000HMOV P1,#0FFH; MAKE IT AN INPUT PORTMOV A,P1MOV P2,AMOV P0,AMOV P3,AEND
12.ORG 000HMOV P2,#0FFH; MAKE IT AN INPUT PORTMOV A,P2MOV P1,AMOV P0,AEND
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
13.P3.0 AND P3.114.0000H is the address upon reset.15.
(A) ORG 0000H
BACK:MOV A,#0AAHMOV P1,AMOV P2,ACALL DELAYMOV A,#55HMOV P1,AMOV P2,ASJMP BACK
(B) ORG 0000HMOV A,#0AAH
BACK:MOV P1,AMOV P2,ACALL DELAYCPL AMOV P1,AMOV P2,ASJMP BACK
Section 4.2:-
16.All ports are bit addressable.17.The advantages for Bit addressable mode is that u con manipulate aa single
bit without disturbing and other bits of the port by using Setb and Clr.18.Setb P1.X OrClr P1.X where X can vary from 0 to 7.
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
19.No , a whole port cannot be complemented at a time.
12.ORG 0000MOV P1,#0FFHMOV A,P1MOV R0,A ; R0=xMOV B,R0 ; B=xMUL AB ; MULTIPLY A WITH B ANSWER STORE IN A=x*xDA AMOV R1,A ;R1=x*x Or x^2MOV A,R0 ;A=xMOV B,#2 ; B=2MUL AB ; A=2*xDA AMOV R7,#5
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
24.80H TO 87H25.90H TO 97H26.A0H TO A7H27.B0H TO B7H28.Not bit addressable register.29.88H TO 8FH30.E0H TO E7H31.F0H TO F7H32.D0H TO D7H33.(a) P0 (b)87H (c)TCON (d)TCON (e)P1H (f)P2 (g)P2 (h)P3 (i)PSW (j)PSW (K)B
34.ORG 0000HSETB RS1; FOR SELECTING REGISTER BANK 2SETB RS0;FOR SELECTING REGISTER BANK 2MOV R3,AMOV R5,BEND
35.CLR 0D7H37.See example 5-14.38.To check the carry flag there are instructions namely JC and JNC.39. And 40 see example 5-14. 41.CY0D7H
P0D0HAC0D6HOV0D2H
42.For this question see page 124 fig 5-2.46.For this question see page 123 fir 5-1.47.(a)20H (b)28H (c)18H (d)2DH (e)53H (f)15H (g)2CH (h)2AH (i)14H (j)37H
(k)7FH
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
58.ORG 0000HMOV R1,#8BACK:MOV A,R2RRC A; Rotate Right through carry means instead of 8 bit rotation it JC HERE ;include carry flag as an MSB(most significant bit).INC R0HERE:DJNZ R1,BACKEND
Section 5.4:-
67.ORG 0000GMOV A,#55HMOV R0,#0C0HMOV R7,#16
HERE:MOV @RO,AINC R0CALL DELAYDJNZ R7,HEREEND
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
MOV A,#48HMOV R0,#9AHADD A,R0MOV R7,AMOV A,#0BCHMOV R0,#7FHADDC A,R0 ;ADC is add with carry, if by adding A and R0 MOV R6,A ;Carry generates .What will it do , it will add both A and R0 With MOV A,#34H;the Upside to it, it will also add the carry flag if it generates.MOV R0,#89HADDC A,R0MOV R5,AJNC HEREINC R4
HERE:MOV R0,#40HMOV A,R4MOV @R0,AINC R0MOV A,R5MOV @R0,AINC R0MOV A,R6MOV @R0,AINC R0MOV A,R7MOV @R0,AEND Here R5=BE,R6=3BH,R7=E2.The and is BE3BE2H.
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
12.ORG 0000Hmov a,#77mov b,#34mulabend
13.ORG 0000Hmov a,#77mov b,#3divabend
14.No, Only on A and B.
15.ORG 0000HMOV DPTR,#MYDATAMOV R0,#30HCALL TRANSFERCALL ADDITIONCALL AVERAGELJMP FIN
23.(a) A=40h (b)A=F6H (c)A=86HRest do it yourself just use Keil write instruction and see the result in project window.
24.Just as in Question no 23 write those instruction in Kiel and view the result of accumulator in Project window.
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
27.There is no such instruction like CJE.28.In this question you must monitor the status of the carry flag after the
execution of CJNE. Write a program below and check the status of the carry flag in the PSW resister.
(a) ORG 0000HBACK:MOV A,#25H ;Here the carry flag will go high.Always rememberCJNE A,#44H,over ; that carry will only go high when the value of source SJMP BACK ; of CJNE instruction is greater than its destination.OVER:END ;
(b)ORG 0000Hback:mov a,#0ffh ;Here carry flag will not go high as the value of thecjne a,#6fh,over ;destination is greater than that of the source.sjmp back
over:end
Rest of the parts of question 28 now you can do them on your own.
30.(a)MOV A,#56HSWAP A; What swap do is swap the upper and lower nibble now A becomes ; A=65H RR A RR A
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
(C)CLR CMOV A,#4DH ; A=0100 1101BSWAP A; A=D4 OR A= 1101 0100BRRC A ;9 BIT ROTATION, A= 0 0110 1010B. You can see the zero before ;8-bit that is the carry bit that you included through RRC instructin.RRC A ; A= 0 0011 0101bRRC A ; A= 1 0001 1010b
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
43.This program is same as the check-sum program, right next to 6-36 example. The only difference is here you have to find the checksum byte of a whole sentence and in the program you had to find the check sum of HEX values. I point out the difference that has to make for this program the rest of the program will remain the same,------------------------------------------------------DATA_ADDR EQU 400HCOUNT EQU 31 ; Nos of characters in the whole sentence.RAM_ADDR EQU 20H
COPY_DATA: --- ;THERE SUBROUTINES ARE PRESENTIS THE BOOK Pg 172.-------------------- --------------------RETCAL_CHKSUM:---------------------------------------------RETTEST_CHKSUM:-----------------------------------------------RETORG 400HMYBYTE: DB ‘Hello, my fellow World citizens’END
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
SJMP $ END
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
Chapter 9:-
1. 2 timers2. 16 bit, Timer 0 and Timer 1.3. TH0 AND TL0.4. TH1 AND TL1.5. NO,These register are not bit addressable.6. 8 bit 7. TMOD is used to initialize the Timer0 or Timer1 and also Mode of timer to
which we have to use.it also let us to select that weather we have to use Timer or Counter.
8. No9. Use the Figure 9-3 of TMOD register.
Gate C/T M1 M0 Gate C/T M1 M00 1 1 0 0 1 1 0
10.Just Divide the XTAL values with 12 for frequencies and for the time period take the inverse of frequence.
11.(a)13 bit (b)16 bit (c)8 bit12.(a)Mode 08192 in decimal you can find out by 2^(13)=8192, that is
because our Mode is of 13 bit and 2000H(b)Mode 165536 in decimal 2^(16)=65536, it is 16 bit and HEX Value is FFFFH.(c)Mode 2256 in decimal 2^(8)-256, it is 8 bit and HEX value is FFH.
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
16.TF0 flag is raised when value of TH and TL rolls over, which means after FFFFH in TH and TL is incrimented, TF0 goes high.XTAL=11.0592MhzTH=1CH and TL=12H so by combining both it becomes 1C12H A 16 BIT VALUE.Frequency = 11.0592Mhz/12 = 921.6KhzTime = 1/F = 1/921.6Khz = 1.085usecNow 1C12H is a HEX value, you must subtract it with the max vale of 16 bit in decimal i.e FFFFH=65536 and for 1C12H=7186. Now you must subtract 65536-7186=58350value is in decimal convert it in HEX to get58350=E3EEH. Now Multiply 58350 with 1.085usec,58350*1.085usec = 63.3msec. Which means it generate the time delay of 63.3msec approximately.TF flag will roll over when 1C12H will complete its counts till FFFFH or Simply it count like this 1C12,1C13,1C14,1C15 and onwards till it reach FFFFH and after FFFFH it raises the TF0 flag. You can also test it like this, just add 1C12H+E3EE=10000H, you can see that 10000H, now TL0=00H, TH0=00H and TF0=1,this shows that the value is rolled over.
17.TF0 flag is raised when value of TH and TL rolls over, which means after FFFFH in TH and TL is incremented, TF0 goes high.XTAL=16MhzTH=1CH and TL=12H so by combining both it becomes 1C12H A 16 BIT VALUE.Frequency = 16Mhz/12 = 1.33333MhzTime = 1/F = 1/1.33333Mhz = 0.75usec
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
Now 1C12H is a HEX value, you must subtract it with the max vale of 16 bit in decimal i.e FFFFH=65536 and for 1C12H=7186. Now you must subtract 65536-7186=58350�value is in decimal convert it in HEX to get58350=E3EEH. Now Multiply 58350 with 1.085usec,58350*0.75usec = 47.3msec. Which means it generate the time delay of 47.3msec approximately
18.TF0 flag is raised when value of TH and TL rolls over, which means after FFFFH in TH and TL is incrimented, TF0 goes high.XTAL=11.0592MhzTH=0F2H and TL=10H so by combining both it becomes F210H a 16 BIT VALUE.Frequency = 11.0592Mhz/12 = 921.6KhzTime = 1/F = 1/921.6Khz = 1.085usecNow F210H is a HEX value, you must subtract it with the max vale of 16 bit in decimal i.e FFFFH=65536 and for F210H=61968. Now you must subtract 65536-61968=3568 this value is in decimal convert it in HEX to get3568=0DFH. Now Multiply 3568 with 1.085usec,3568*1.085usec = 3.87msec. Which means it generate the time delay of 3.87msec approximately.TF flag will roll over when F210H will complete its counts till FFFFH or Simply it count like this F210,F211,F212,F213 and onwards till it reach FFFFH and after FFFFH it raises the TF0 flag. You can also test it like this, just add F210H+0DF0H=10000H, you can see that 10000H, now TL0=00H, TH0=00H and TF0=1,this shows that the value is rolled over.
19.It can be done by only changing the XTAL value and calculate rest.
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
20.XTAL = 11.0592Mhz, and need to find the delay 0f 2msec, Timer 1 is programed in mode 1.Frequency = 11.0592Mhz/12 = 921.6KhzTime Period (Machine Cycle)= 1/T = 1/921.6Khz = 1.085usecFor the Time delay of 2msec = 2msec/1.085usec = 1843 in decimal.Now subtract it from the max value that can be stored in TH and TL combined, so 65536-1843 = 63693, now convert it in HEX to get 63693 = F8CDH, this is the value to be loaded in TH and TL, now to write the program.ORG 0000HMOV TMOD,#10HMOV TL1,#0CDHMOV TH1,#0F8HSETB TR1;To start the Timer TR0 must be set high.JNB TF1,$CLR TR1;To stop the timer.CLR TF1END
21.Frequency = 16Mhz/12 = 1.33333MhzTime Period (Machine Cycle)= 1/T = 1/1.33333Mhz = 0.75usecTime Period for 2msec = 2msec/0.75usec = 2667 in decimal.65536-2667 = 62869 for HEX F595H
ORG 0000HMOV TMOD,#10HMOV TL1,#95HMOV TH1,#0F5HSETB TR1;To start the Timer TR0 must be set high.
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
JNB TF0,$CLR TR1CLR TF1END
22.Frequency = 11.0592Mhz/12 = 921.6KhzTime Period (Machine Cycle)= 1/T = 1/921.6Khz = 1.085usecTime Period for 2msec = 2.5msec/1.085usec =2304 in decimal.65536-2304 = 63232 for HEX F700H
ORG 0000HMOV TMOD,#01H ;For Timer 0.MOV TL0,#00HMOV TH0,#0F7HSETB TR0 ;To start the Timer TR0 must be set high.JNB TF0,$CLR TR0CLR TR0END
23.Frequency = 11.0592Mhz/12 = 921.6KhzTime Period (Machine Cycle)= 1/T = 1/921.6Khz = 1.085usecTime Period for 2msec = 0.2msec/1.085usec = 184in decimal.65536-184 = 65352 for HEX FF48H
ORG 0000HMOV TMOD,#10H ;For Timer 1.MOV TL1,#48HMOV TH1,#0FFHSETB TR1;To start the Timer TR0 must be set high.JNB TF1,$
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
CLR TF1CLR TR1END
24.Frequency = 20Mhz/12 = 1.66666MhzTime Period (Machine Cycle)= 1/T = 1/1.66666Khz = 0.6usecTime Period for 100msec = 100msec/0.6usec = 166667 in decimal.Now we can see that 166667 is greater than 65536 that is the max value that can be stored in TH and TL.So now divide 166667 with any value that makes it less than 65536, here I divide it by 5,166667/5 = 33333 in decimal now this value is less than 166667, OK now remember the value that you divide 166667 with. Now,65536-33333 = 32203 for HEX 7DCBH
ORG 0000HMOV TMOD,#10H ;For Timer 1.MOV R0,#5HERE:MOV TL1,#0CBH ;You must load TH and TL again as it is not anMOV TH1,#7DH ;auto-reload mode.SETB TR1 ;To start the Timer TR0 must be set high.HERE1:JNZTF1,HERE1CLR TF1CLR TR1DJNZ R0,HEREEND
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
25.Frequency = 11.0592Mhz/12 = 921.6KhzTime Period (Machine Cycle)= 1/T = 1/921.6Khz = 1.085usecTime Period for the lowest square wave you must put the maximum value in TH and TL i.e FFFEH and it should be divided by 2 because of the square wave to get 7FFFH.
ORG 0000HSETB P1.2MOV TMOD,#10H ;For Timer 1.HERE:MOV TL1,#0FFHMOV TH1,#7FHSETB TR1;To start the Timer TR0 must be set high.JNB TF1,$CLR TF1CLR TR1CPL P1.2SJMP HEREEND
26.Frequency = 11.0592Mhz/12 = 921.6KhzTime Period (Machine Cycle)= 1/T = 1/921.6Khz = 1.085usecTime Period for the Highest square wave you must put the minimum value in TH and TL i.e 0000H because it only has to increment all the way from 0000h to FFFFH to roll over mean from 0000H, 0001H, 0002H, till 10000H
ORG 0000HSETB P1.2MOV TMOD,#10H ;For Timer 1.HERE:MOV TL1,#00HMOV TH1,#0FFHSETB TR1;To start the Timer TR0 must be set high.
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
JNb TF1,$CPL P1.2CLR TR1CLR TF1SJMP HEREEND
27. AND 28. Are solved just like question 25 and 26, only change that occurs is to change the values of crystal frequency to 16Mhz instead of 12Mhz, and then find the remaining value and write a program.
29.Timer goes through states that are from F1H, F2H, F3H, F4H, F5H, F6H, F7H, F8H, F9H, FAH, FBH, FCH, FDH, FEH, FFH and lastly 100 which makes the Timer in mode 2 to roll over, total of 16 state.
921659 this value is greater than 65536 so 921659/17 = 54215 in decimal and for HEX 0D3C7H.
65536-54215 = 11321 in decimal for HEX 2C39H is the value to load in TH and TL.
ORG 0000HMOV R0,#17 ;Value that we divided 921659 by.MOV TMOD,#01H ;For Timer 1.HERE:MOV TL0,#39HMOV TH0,#2CHSETB TR0 ;To start the Timer TR0 must be set high.JNB TF0,$CLR TR0CLR TF0DJNZ R0,HEREEND
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
333333 this value is greater than 65536, so 333333/33 = 10101 in decimal and for HEX 2775H.
65536-10101 = 55435 in decimal for HEX D88BH is the value to load in TH and TL.
ORG 0000HMOV R0,#33 ;Value that we divided 333333 by.MOV TMOD,#01H ;For Timer 1.HERE:MOV TL0,#8BHMOV TH0,#0D8HSETB TR0 ;To start the Timer TR0 must be set high.JNB TF0,$CLR TR0;To stop the Timer.CLR TF0DJNZ R0,HEREEND
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
Lowest square wave we must take the largest value i.e 256 i.e 0FFH is HEX for TH because this is mode 2 = 2*256*1.085usec = 0.555msec and for Frequence =1/T = 1.8Khz.
Highest square wave we must take the smallest value i.e 00H for TH because this is mode and the Maximum Frequency is 0.45Mhz, T = 2*1*1.085usec = 2.1usec, and for the Frequency = 1/T = 1/2.1usec = 460Khz.
Microcontroller Solutions From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech