You are on page 1of 2

WORK SHEET 2

1. Name the features of PIC 18 XXX.


2. Write the instructions to add the values of 16H and CDH. Place the result in the WREG
register.
3. Write a program to get data from the SFRs of PORT B and send it to the SFRs of PORTC
continuously using MOVFF.
4. Show the status of the C, DC and Z flags after addition of 9CH and 64H in the following
instructions:
MOVLW 9CH
ADDLW 64H
5. Compare RISC with CISC.
6. Discuss the addressing modes of PIC 18 with one example for each.
7. Draw the memory organization of PIC18.
8. What is the address range for the scratch pad section of the address bank?
9. Do the ORG and END directives produce opcodes?
10. Toggle all the bits of SFR register of PORT B by sending to it the values of 55H and
AAH continuously. Put a time delay in between each issuing of data to PORT B.
11. How wide is the size of the stack in PIC18?
12. A switch is connected to pin RB2.Write a program to check the status of SW and perform
the following:
I] If SW=0, send the letter “N” to PORT D
II] If SW=1, send the letter “Y” to PORT D.
13. Explain the role of TRISx and PORTx in I/O operations.
14. Which pins are allocated for RxD and TxD?
15. Write a program to monitor RC3.When it is HIGH send 55H to PORT D.
16. Write a program to find the greater of the two values 27 and 54, and place it in the file
register location 0x20.
17. Write a program to transfer the value 41H serially via pin RB1. Put one high at the atart
and end of the data. Send the LSB first.
18. Write a program to find the number of zeros in an 8 bit data.
19. Which bank is used for SFRs?
20. Write a program to generate a square wave of 50% duty cycle on bit RB5.
21. Assume XTAL=10 MHz. Find the clock period fed into the Timer 0 if a prescalar option
of 256 is chosen.
22. How many timers do we have in PIC18?
23. Assume that clock pulses are fed into pin T0CKI and the buzzer is connected into
PORTB.1, write a program for counter 0 in 8 bit mode to sound the buzzer every 100
pulses.
24. Which pins of PIC 18 are set aside for serial communication and what are their
functions?
25. What are line drivers such as MAX232 used for?
26. Write a program for the PIC 18 to transfer the letter “G” serially at 9600 baud rate,
continuously. Assume XTAL = 10 MHZ.
27. List some of the interrupt sources in PIC 18.
28. In PIC 18, what memory area is allotted to interrupt vector table?
29. Which bit of INTCON belongs to timer 0 interrupt? Show how is it enabled?
30. Find the value of ADCON0 register if we want Fosc/8, channel 0 and ADON on.
31. What are the criteria by which an appropriate programming language is chosen for
embedded software of a given system?
32. What is the most important feature in C that makes it popular high level language for an
embedded system?
33. What is the advantage of polymorphism, when programming using C++?
34. Why do you break a program into header files, configuration files, modules and
functions?
35. Design a table to give the features of top- down design and bottom -up design of a
program.
36. Explain the importance of the following declarations: static, volatile and interrupts in
embedded C.
37. Why do you need a cross compiler?
38. What are the advantages of building ISR queues?
39. Why do you use infinite loop in embedded system software?
40. What are the advantages of using freeware, GNU C/C++ compiler?

You might also like