# data[].attributes.body
Q12 & Q22

# data[].attributes.body
Q10,Q11,Q20

# data[].attributes.body
Q7
- T0CON = 01101000

Q18
a) XTAL/4 =10M/4 =2.5MHz
b) T= 1/f
= 1/2.5M
= 400n
c)DsT= 1/250
=4ms
d) 4ms/0.4microsecond = 10K

e)65536-10000
=55536
=D8F0
TMR0L=F0
TMR0H=D

# data[].attributes.body
Q3,Q4,Q15

# data[].attributes.body
Q13
In 16-bit mode, the counter rolls over when the counter goes from 0-65536

Q22
Time delay=5ms
XTAL=10Mhz
Find:
i)TMROL
ii)TMROH

1)XTAL/4=10Mhz/4=2..5Mhz
2)Z/prescaler=2.5Mhz/256=9.77KHZ
3)T=1/x=1/9.77KHz=102.4us
4)Desired time/T=5ms/102.4us=48828s
5)65536-48828=65487(dec)
=FFCF(hex)
TMROH=FF
TMROL=CF

# data[].attributes.body
Q1: How many timers do we have in the PIC18F4520
-TxCON

-TMRxH

-TMRxL

Q2: True or False.
Timer0 can be used only as a 16-bit timer.
-False

Q14: Find the frequency and period used by timer if the crystal attached to the PIC18 has the following values:

a. XTAL =10MHz
1/4 x 10M = 2.5M
T = 1/2.5M = 0.4μ

b. XTAL =20MHz
1/4 x 20M = 5M
T = 1/5M = 0.2μ

c. XTAL =24MHz
1/4 x 24M = 6M
T = 1/6M = 0.17μ

d. XTAL =30MHz
1/4 x 30M = 7.5M
T = 1/7.5M = 0.13μ

# data[].attributes.body
LUQMAN & AZWAR

# data[].attributes.body
1. SYAZA & AINA - Q1,Q2,Q14
2. SYAFIQ & UMI - Q3,Q4,Q15
3. LUQMAN & AZWAR - Q5,Q16
4. IRFAN, KUMARESH & AMIN -Q6,Q17
5.JEVA & MOHAN -Q7,Q18
6. AIMAN & TAQIUDDIN-Q8,Q9,Q19
7. AHMAD NURHAKIM & AFIQ-Q10, Q11, Q20
8.ASYRAF & MURSYIDI-Q12, Q21
9.ELA & NIK HAFIZAH -Q13,Q22