1. List and explain the structures of all SFR registers associated in setting up PIC18 Time r0.  TMR0H:TMR0L  T0CON  INTCON

2. List and explain the structures of all SFR registers associated in setting up PIC18 UART Serial communication.

3. With a neat complete block diagram. Describe the steps to program Time r0 in 16-bit mode.

4. With a neat complete block diagram. Describe the steps to program Time r0 in 8bit mode.

5. Find the time rs clock frequency and its period for various PIC-18 based system, with the following crystal frequencies. Assume that a prescaler of 1:64 is used. a. 10 MHz b. 16 MHz

6. Assume the crystal frequency of 10 MHz connected to PIC-18, Calculate the maximum 16-bit Timer0 value in seconds for the following.

a. 1:256 prescaler b. 1:128 prescaler

7. Write a C18 program to toggle only the PORTB.4 bit continuously every 50ms. Use Time r0, 16-bit mode, the 1:4 prescalar to create the delay. Assume XTAL = 10MHz.

8. Write a C18 program to gene rate a frequency of 2 Hz only on pin PORTB.5. Use Time r0, 8-bit mode to create the delay.

9. Write a C18 program to gene rate a frequency of 250 Hz on all the bits of PORTC. Using Time r0 16bit mode. Assume XTAL=10MHz.

10. Write the diffe rence between Serial and Parallel communications. Briefly explain different types of serial communication.

11. List DB9 connector pins and explain the RS232 serial communication protocol interface used between DTE and DCE.

12. Given XTAL = 10MHz. find the SPBRG for the following baud rate a. 9600 b. 4800 c. 2400 d. 1200

13. Draw the asynchronous frame structure and wave form for 8-bit data “A” (41H).

14. Describe the steps to program PIC18 to transfer data serially.

15. Describe the steps to program PIC18 to receive data serially.

16. Write an assembly program to transmit the message “SET COLLEGE” serially at 9600 baud rate, 8-bit UART, 1 stop bit and do this forever.

17. Describe the importance of TXIF flag bit of PIC18 in serial communication.

18. Describe the importance of RCIF flag bit of PIC18 in serial communication.

19. Interface DC Motor to PIC-18 through optoisolator ILD74 and explain the H-Bridge DC motor connection.

20. W rite the C18 program to monitor the status of switch connected to RD7 and perform the following If SW = 0 DC motor moves with 50% duty cycle pulse. If SW = 1 DC motor moves with 2 5% duty cycle pulse.

21. Interface 1 6X2 LCD to PIC -18. And write a C18 program to send “JAIN” to the LCD starting at 5th position of line 1.

#include #define rs PORTCbits.RC0 #define rw PORTCbits.RC1 #define en PORTCbits.RC2 void lcddata(unsigned int); void lcdcommand(unsigned int); void lcdinit(void); void MSDelay( int itime); void MSDelay( int itime) { unsigned int i, j; for(i=0;i
void lcddata(unsigned int character) { PORTD=character ; rs = 1; en = 1; en = 0; MSDelay(10); } void lcdinit(void) { lcdcommand(0X38); lcdcommand(0X0E); lcdcommand(0X0C); lcdcommand(0X01); lcdcommand(0X06); } void main(void) { TRISC=0x00; TRISD=0x00; PORTC=0x00; PORTD=0x00; MSDelay(200); while(1) { lcdinit(); lcdcommand(0X85); lcddata('J); lcddata(‘A'); lcddata('I’); lcddata('N’); MSDelay(500); lcdcommand(0XC1); } } 22. Interface 4x4 keypad to P IC-18 and also write the Key scanning algorithm.

Inte rfacing the keyboard to the PIC18



At the lowest level, keyboards are organized in a matrix of rows and columns.

  

The CPU accesses both rows and columns through ports; therefore, with two 8-bit ports, an 8 x 8 matrix of keys can be connected to a microprocessor. When a key is pressed, a row and a column make a contact; otherwise, there is no connection between rows and columns. In programming for keypad interfacing we must have two processes: (a) key press detection, and (b) key identification.

There are two ways by which the PIC 18 can perform key press detection: (1) the interrupt method, and (2) the scanning method. Scanning method for key press detection

1. Key press detection is by scanning. In this method, to detect a pressed key, the microcontroller grounds all rows by providing 0 to the output latch, then it reads the columns. 2. If the data read from the columns are equal to nil, no key has been pressed and the process continues until a key press is detected. If one of the column bits has a zero, however, this means that a key press has occurred. 3. After a key press is detected, the microcontroller will go through the process of identifying the key. Starting with the top row, the microcontroller grounds it by providing a LOW to the first row only; then it reads the columns. 4. If the data read is all Is, no key in that row is activated and the process is moved to the next row. It grounds the next row, reads the columns, and checks for any zero. 5. This process continues until the row is identified. After identification of the row in which the key has been pressed, the next task is to find out which column the pressed key belongs to. This should be easy since the microcontroller knows at any time which row and column are being accessed. Figure shows the flowchart for this method.

23. Interface unipolar stepper motor to PIC-18 through Line driver ULN2003. And write half wave(8 step) sequence and normal four step sequence.

24. For an 8 -bit ADC , we have VREF = 5V. Calculate D0:D7 output if the analog input is 2.1volt and 1.7volt.

UNIT-5 QB and scheme.pdf

Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. UNIT-5 QB and scheme.pdf. UNIT-5 QB and scheme.pdf. Open.

2MB Sizes 2 Downloads 57 Views

Recommend Documents

QB 1ida.pdf
Whoops! There was a problem loading more pages. Retrying... QB 1ida.pdf. QB 1ida.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying QB 1ida.pdf.

qb - Copy.pdf
x. x. z. y. c). 0...... y. z. x. x. z. y. d). 0...... y. z. x. z. 2. The partial differential equation. 2 6 3 0 2. 2 2. 2. 2................ y. z. x. z. x. z. x y. z. x. z. is. a) Parabolic. b) Hyperbolic. c) Elliptic. d) None of these. 3. The initia

qb - Copy.pdf
Page 1 of 11. Unit-4. Set -A. 1. The partial differential equation corresponding to the equation. ( ). 2 2. z f x y. is. a). 0...... y. z. y. x. z. x. b). 0..... .... qb - Copy.pdf. qb - Copy.pdf. Open. Extract. Open with. Sign In. Details. Comments.

TSEDUHUB m1-qb-signed.pdf
Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. TSEDUHUB m1-qb-signed.pdf. TSEDUHUB m1-qb-signed.pdf.

rahe-qb 4- BY Civildatas.blogspot.in.pdf
PREPARED BY. N.ARUN PRAKASH AP/CIVIL. M.SARANYA AP/CIVIL. T.SWEDHA AP/CIVIL. 17. What are all the factors is to be considered if a railway station is to be. constructed. BT 5. 18. Design and draw a neat sketch of a junction station. BT 5. 19. Under w

QuickBird-DS-QB-Web.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. QuickBird-DS-QB-Web.pdf. QuickBird-DS-QB-Web.pdf. Open. Extract. Open with. Sign In. Main menu.

PSOC QB WITH ANSWERS.pdf
(2) serve as additional reserve power for expected demands, or. (3) permit shutting down one machine and cutting in a standby machine. without interrupting power distribution. 13.Distinguish between load curve and load duration curve. The curve showi

EC6504 MPMC(QB ).pdf
Page 2 of 69. PART A - TWO MARKS. UNIT-I. 1. What is pipelining? Fetching the next instruction while the current instruction executes is called pipelining.

tem qb- By EasyEngineering.net.pdf
The frontal projection area of the car is 2.15 m2 . The car tyres have radius of 0.33 m. The. rear axle gear ratio is 3.82:1 and the first gear ratio is 2.78:1. Calculate the engine. horsepower needed and the speed of the engine. Make suitable assump

BEE SL QB with answers.pdf
Agni college of Technology. Department of BME. Basics of Electrical Engineering. 2Marks. 1. .... (ii) Voltage control method. (iii) Rheostat control method (Armature control method). 16. Classify three phase induction motors. ... BEE SL QB with answe

CHEM QB ME, CE.pdf
A Gravity separation. B Magnetic separation. C Froath ... C Gravity separation. D Electrolysis. ANS C ... CHEM QB ME, CE.pdf. CHEM QB ME, CE.pdf. Open.

ADC SL QB with answers.pdf
... by data communication. Data communication can be defined as two personal computers. connected through a Public Telecommunication Network (PTN). 13.

ge6351-qb- By EasyEngineering.net.pdf
(i) Explain the major factors that are responsible for the loss of biodiversity. (8). (ii) Analyze the importance and values of biodiversity reserves. 4. (i) Define ecosystem. Give an account of structure and functions of grassland. ecosystem. (8). (