Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

FL051 DethiCLC20222 De1 Dapan Vi Dieu Khien

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Mẫu đề thi Tiếng Anh

(Date) (Date)
Lecturer: Approved by:
(Signature & Fullname) (Signature, Position & Fullname)

Semester/Academic year 2 2022-2023


FINAL EXAM Date 27/05/2023
Course title Micro-controller
UNIVERSITY OF TECHNOLOGY - VNUHCM Course ID ME3007
FACULTY OF M.E Duration 70 mins. Question sheet code 3
Notes: - Open book

1. How many types of interrupts are supported by PIC 16F877A (L.01)


a) Internal and External b) Internal c) External d) Do not support

2. How many memory locations can a 10-bit address bus access? (L.01)
a) 1024 b) 1048576 c) 65536 d) 2097152

3. What does 16-bit microcontroller mean (L.01)


a) The address bus has 16-bits
b) Data bus has 16-bit
c) The control bus has 16-bit
d) A port of the microcontroller capable of 16-bit output

4. Does PIC16F877 support analog outputs? If yes, then what’s its range? (L.01)
a) Yes, it does support, and range from 0-5V
b) Do not support
c) Yes, it does support, and range from 0-3V

5. Suppose, for the crystal to use with a frequency of 12MHz, the instruction cycle of the
microcontroller PIC16F877 is: (L.01)
a) 0.2 us b) 0.33 us c) 0.5 us d) 0.53 us

6. Which of the following statements is correct about microcontrollers? (L.01)


a) A microcontroller is a microprocessor
b) Microcontroller is a computer
c) A microcontroller is a system consisting of a microprocessor with sufficient
performance, combined with peripheral blocks such as memory, I/O modules,
timing modules, and analog-to-digital converters, motor control modules
d) All of the above sentences are incorrect

7. Bus in PIC16F877 microcontroller included: (L.01)


a) address bus, data bus, power bus, control bus
b) data bus, power bus, signal bus
c) address bus, data bus, control bus
d) power bus, control bus, address bus

8. What happens when an external voltage higher than 5V is applied to RA0/AN0 (L.02)
a) Operate normally b) Damage the microcontroller c) reset PIC

9. Microcontroller PIC16F877 is a microcontroller (L.01)


a) 8 bit.
b) 16 bit.
c) 4 bit.
d) 32 bit.

10. Harvard structure is characterized by (L.01)


a) It is not possible to read and write at the same time on the bus line
b) Only sequential tasks can be performed
c) Both a and b are correct
d) Both a and b are false

11. For a pin (PIN) on a microcontroller, choose the most correct statement: (L.01)
a) It is possible to use both Input and Output pins at the same time
b) Can be used to read Encoder, ADC
c) Can be used to communicate RS232, I2C
d) Only 1 function can be used at a time

12. What is meant by a flash program memory in PIC (L.03)


a) Non-volatile memory that can be erased and reprogrammed in order to store new code
b) Non-volatile memory that can only be read from
c) Both a and b are correct
d) Both a and b are false

13. Given the circuit and value of port b: 01100111 then the displayed result is: (L.02)

a) 3 b) 7 c) “C” d) All are incorrect


14. The PIC16f877 microcontroller has a minimum resolution of ADC: (L.04) (L.04)

a) 8 bits b) 10 bits c) 12 bits d) Sentences a and b are both correct

15. Write statement C setting the PIC ADC so that only RA0 is used as analog input. If assuming
V reference is 12V, 10 bit conversion, calculate resolution (L.04)
a) 4.88mv/bit
b) 11.7mV/bit
c) 1.2mV/bit
d) a, b, c are wrong

16. Suppose the timer1 interrupt declaration in the Header file is # INT_TIMER1, to use the
timer1 interrupt function. We declare as follows: (L.01)
a) enable_interrupts(INT_TIMER1); enable_interrupts(GLOBAL);
b) enable_interrupts(INT_TIMER1);
c) enable_interrupts(INT_TIMER); enable_interrupts(PEIE);
d) enable_interrupts(INT_TIMER0); enable_interrupts(GLOBAL);

17. Purpose of using presale in timer module: (L.04)


a) Increase the processing speed of the microcontroller.
b) Increase the timer period
c) Will reduce the timer cycle.
d) Will shrink the size of the timer.

18. What is the advantage of using serial communication over I2C with PIC (L.02)
a) Faster speed
b) Least wiring
c) Do not have
d) Both a and b are correct.

19. For microcontroller use is 16F877A; Crystal has a frequency of 20MHz; select the value
presale = 4. If you want timer0 to time a time interval of 60us, the initial value to be set for timer0
is: (L.04)
a) TMR0 = 146 b) TMR0 = 181 c) TMR0 = 75 d) TMR0 = 166

20. Using 16F877A microcontroller, the quartz frequency used is 20MHz. Using timer0, suppose
we want to extend timer0's timing capacity up to 1h or 10h then: (L.04)
a) Can't be done because timer0 is just an 8-bit timer.
b) Can't be done because timer0 8bit can specify the maximum time to 51.2us.
c) It is recommended to use a timer with a larger capacity.
d) Implemented by letting timer0 overflow many times and passing an intermediate variable to
count the number of overflows corresponding to the time it needs to be timed.
21.

If OPTION_REG REGISTER is 0b00111000

a) PIC is configured as timer module with prescaler 2


b) PIC is configured as timer module with prescaler 1
c) PIC is configured as timer module with prescaler 4
d) Both a, b, c are incorrect

22.
If OPTION_REG REGISTER is 0b00011000

a) PIC is configured as timer module with prescaler 2


b) PIC is configured as timer module with prescaler 1
c) PIC is configured as timer module with prescaler 4
d) Both a, b, c are incorrect

23. If PR2= 0xEF, and timer 2 prescaler=4, Crystal =20MHz, the frequency of PWM signal is
(L.04)
a) 19.53 KHz
b) 4.88 KHz
c) 6.53 KHz
d) a, b, c are not correct

24. The clock frequency of the PIC 16F877 is 20MHz. Calculate the feed value for the 16bits
timer (preload value) to generate an 8mms interrupt (L.04)
a) 20000 b) 40000 c) 25536 d) 30000

25. If an ADC has a positive input reference voltage of 2.048V and is 8 bits converted. Specify
the resolution (mV/bit) and the resulting binary number if the converted input voltage is 0.896V
(L.03)
a) 8 mV/bit, 0111 11012
b) 10 mV/bit, 0111 01002
c) 8 mV/bit, 0111 00002
d) 8 mV/bit, 1111 11012

26. If PR2= 207, and timer 2 prescaler=4, Crystal =20MHz, the frequency of PWM signal is
(L.04)
a) 4 KHz
b) 5 KHz
c) 6 KHz
d) a, b, c are not correct

27. If PR2= 207, and timer 2 prescaler=4, Crystal =20MHz, the duty cycle is (L.04)
a) 30%
b) 20%
c) 35%
d) a, b, c are not correct
28. To display number 4 the output value of port b is (L.02)

a) 0x30 b) 0x27 c) 0x13 d) All are incorrect

29 To generate the speed 19200 BAUD RATE for the UART communication, IF BRGH=1,
crystal=20Mhz, the SPBRG value is

a) 60 b) 64 c) 55 d) 50

30. Working principle of timer0 of PIC16F877 (L.04)


a) The overflow flag is set to 1 when the count overflow occurs from FFh to 00h.
b) The overflow flag is set to 0 when the count overflow occurs from FFh to 00h.
c) The overflow flag is set to 1 when the timer reaches FFh.
d) The overflow flag is set to 0 when the timer counts up to FFh..

31. Which of the following statements is not true about external interrupts (L.04)
a) Interrupt occurs when there is a transition from high to low at the external interrupt pin
b) Interrupt occurs when there is a transition from low to high at the external interrupt pin
c) In PIC16F877, the external interrupt pin is RB0
d) external Interrupt occurs when the overflow flag of Timer 1 is set to 1

32. For the UART communication, IF BRGH=1, crystal=20Mhz, the SPBRG value is 64, the
speed for the communication is

a) 57600 Khz b) 19200 Khz c) 38400 Khz d) 115200Khz

33. If the setting of the UART is as following Figure and the setting speed is 1200bps. How
much time does it take to transmit 500 bytes. (L.04)
a) 4.5s b) 5s c) 5.5s d) all are not correct

34. if the wave form of the transmission is shown as following Figure. With the configuration:
one stop bit, no check parity, 8 databits. The number transmit is (L.04)

a) 170 b) 150 c) 120 d) all are not correct

35. What value should be loaded in the TRISB register if return lines (RB7:RB4) and RB3:RB0
are supposed to be inputs and outputs respectively after the PORT B initialization?. (L.01)

a) 11000100 b) 00001111 c) 11110001 d) 11110000

36. The microcontroller will be reset when (L.03)


a) When interrupt happen
b) Change the voltage from 5V to ground value at PIN 1
c) Change the voltage from ground to 5V at PIN 1
d) Both a and b are correct

37. For the I2C communication


If SSPCON = 0b00101000, to set the speed 100Khz, Crystal 20Mhz for I2c communication
the value of SSPADD is:

a) 55 b) 45 c) 49 d) all are not correct

38. To enable interrupts, which module on the 16F877A or 16F877 microcontroller can be used.
a) External interrupt
b) Timer 0
c) Timer 1
d) All are correct

39. The following statement is available: Timer2 interrupt has higher interrupt priority than
Timer1 interrupt. (L.04)
a) Right.
b) Wrong.
c) True if these 2 timers are used at the same time.

40. Which bit permits to enable (if set) or disable (if cleared) all the interrupts in an INTCON
register (L.03)
a) GIE b) ADIE c) RBIE d) TOIE

You might also like