Exercises

2.1 Describe the program memory map of the PIC18F2410 microcontroller. How much is the maximum addressable memory?

2.2 Describe the data memory map of the PIC18F2410 microcontroller. What is a memory bank? How many memory banks are there in the PIC18F2410 microcontroller?

2.3 What is an SFR register? Give an example.

2.4 Describe how a PIC18F2410 microcontroller can be operated from an external 8 MHz crystal. Draw the circuit diagram.

2.5 Explain how the PLL can be used to increase the clock frequency in a PIC18F2410 microcontroller.

2.6 Show which bits should be set to operate a PIC18F2410 microcontroller from the internal 4 MHz clock.

2.7 Draw a circuit diagram to show how a PIC18F2410 microcontroller can be reset using an external reset button.

2.8 Draw the block diagram of a typical I/O port (without the peripheral functions) and explain how the input-output operations take place.

2.9 Explain the importance of reading a port value using the LAT register instead of the standard PORT register.

2.10 In a non-time-critical application, it is required to operate a PIC18F2410 microcontroller using an external resistor and a capacitor for timing. Assuming the required clock frequency is 5 MHz, what will be the values of the resistor and the capacitor? Draw the circuit diagram to show how these timing components can be connected to the microcontroller.

2.11 In an application it is required to generate a delay of 250 μs using TIMER 0. Calculate the value to be loaded into register TMR0L, assuming that the microcontroller is operated from a 6 MHz clock, and TIMER 0 is operated in 8-bit mode.

2.12 In a TIMER 0 based application, register TMR0L is loaded with 250. Assuming the microcontroller clock rate is 8 MHz, and the prescaler is 64, calculate the time it will take to overflow the timer.

2.13 In an application it is required to use the watchdog to reset the microcontroller every 250 μs. Explain how this can be achieved.

2.14 Explain why the watchdog is important in time-critical applications.

2.15 Explain what a configuration register is. How can the configuration register be loaded?

2.16 Draw the circuit diagram to show how an external clock can be connected to a PIC18F2410 microcontroller to provide clock pulses.

2.17 In an application it is required to operate a PIC18F2410 microcontroller with a clock of 4 MHz. Describe all different ways that this can be achieved and draw the circuit diagram for each case.

2.18 In a time-critical application it is required to operate a PIC18F2410 microcontroller with a 40 MHz clock. Describe how this can be achieved using the PLL and draw the circuit diagram.

2.19 Assuming that an 8 MHz clock is used with a prescaler of 256, what is the maximum time for the timer to overflow assuming operation of the timer in 16-bit mode?

2.20 It is required to set PORT A of a PIC18F2410 microcontroller, such that the pins at the lower nibble are inputs and those at the upper nibble are outputs. What value must be loaded into the TRISA register?

2.21 In a typical A/D converter application, the reference voltage is +5 V. If the digital value of the input signal read is hexadecimal 0 × 3F, what is the voltage in m V?

2.22 In an A/D application, the reference voltage is +5 V. If a 2 V signal is applied to one of the analogue inputs, what is the digital value of the signal read?

2.23 Explain why interrupts are important in microcontroller systems.

2.24 How many different types of interrupt sources are there in the PIC18 series of microcontrollers.

2.25 Explain the differences between high-priority and low-priority interrupts.

2.26 It is required to set up the timer TMR0 to generate interrupts on overflow. Explain which registers need to be set up

2.27 Explain the steps required to generate a PWM signal.

2.28 It is required to generate a PWM signal with a period of 100 μs and duty cycle of 80 μs. Assuming a microcontroller clock frequency of 4 MHz, calculate the values to be loaded into various registers.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.251.217