Documente Academic
Documente Profesional
Documente Cultură
i) What is the largest scale that can be setup with Timer2? (4)
ii) What is the resulting period between timer2 interrupts using a 4 Mhz crystal?
(4)
iii) How should T2CON and PR2 registers be initialized in this case? (5)
Program Timer-1 to be an event counter. Use 16-bit mode, and display the binary
count on Port-B and Port-D continuously, set the initial count to 20000. (13)
11.
A switch is connected to pin RC6. Write a program to check the status of SW and
do the following.
If SW =0, send letter ‘N’ to PORTA.
If SW=1, send letter ‘Y’ to PORTA (15)
A green LED is connected to the 5th pin of PORTA. Write a program to blink the
LED for every 10 mili seconds of regular interval. (15)
12.
Draw the architecture of timer 2 in PIC micro controller and determine the values of
scaling factors to be used to obtain interrupts at output at every 8 milli seconds at the
output, assume a 10MHZ of Crystal oscillator clock frequency (Note: crystal
generates and internal clock rate of OSC/4 =2.5MHZ). (15)
OPTION register is loaded with a binary value of 01001101, and TMR0 register is
loaded with a binary number of ‘11110011’. Calculate how much delay is
produced in timer’0’ with an oscillator clock frequency of 4 MHZ. (15)
Determine the pulse width of positive going pulse to RC2/CCP1 pin of P1 micro
controller. Assume that OSC=4MHz and that the pulse width is less than 65,535µs
and longer than 300µs. Write an assembly language program for the given
specification using PIC instruction set. Determine the pulse width of positive going
pulse to RC2/CCP1 pin of P1 micro controller. Assume that OSC=4MHz and that
the pulse width is less than 65,535µs and longer than 300µs. Write an assembly
language program for the given specification using PIC instruction set. (15)
Write PIC Micro controller assembly language program to display the characters
‘2019’ in the first row of 2 lines x 20 characters LCD. (15)