0% found this document useful (0 votes)
15 views18 pages

593550225 Đề thi Vi điều khiển

The document consists of a series of exam questions related to the PIC16F887 microcontroller, covering topics such as pin functions, pull-up resistors, interrupts, timers, ADC, and communication protocols. Each question presents multiple-choice answers, testing knowledge on the microcontroller's features and functionalities. The questions are aimed at assessing understanding of both theoretical concepts and practical applications of the microcontroller.

Uploaded by

Nguyễn Huy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views18 pages

593550225 Đề thi Vi điều khiển

The document consists of a series of exam questions related to the PIC16F887 microcontroller, covering topics such as pin functions, pull-up resistors, interrupts, timers, ADC, and communication protocols. Each question presents multiple-choice answers, testing knowledge on the microcontroller's features and functionalities. The questions are aimed at assessing understanding of both theoretical concepts and practical applications of the microcontroller.

Uploaded by

Nguyễn Huy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Machine Translated by Google

Microcontroller exam (ME3007) HK211

Question 1. The pin labeled RE3/MCLR/VPP of the PIC16F887 microcontroller has the following functions:

a. Reset VDK operation b. Supply power


to the microcontroller c. Load program to
microcontroller d. All 3 statements are wrong

Question 2. Pull-up resistors have the following

characteristics: a. One end is connected to 5v source, the other end is


connected to ground b. One end connects to 5v power, the other end connects to a push button, and the second end of
push button connected to ground

c. One end is connected to ground, the other end is connected to a push button, and the second end of the button

The press is connected to a 5v source


d. All 3 statements are wrong

Question 3. A push button connected to a pull-up resistor is a push button type:

a. Active low level b. Positive


high level c. Active intermediary

d. All 3 statements are wrong

Question 4. The 7SEG-MPX1-CC component is a 7-segment LED type:

a. Common anode b.
Common cathode c.
Both Common Anode and Common Catode d. All 3
statements are wrong

Question 5. Common anode type 7-segment LED has the following

characteristics: a. Common pin connected to


5v source b. Common pin connected
to ground c. Common legs for floating
d. All 3 statements are wrong

Question 6. The reason why people call an LED a 7-segment LED is

because: a. It consists of 7 single LED segments connected together


b. It has 7 legs c. It
has 7 shapes of the number 7
Machine Translated by Google

d. All 3 statements are wrong

Question 7. Suppose we have a 7SEG-MPX6-CC component and a PIC16F887 VDk, which of the following
statements is correct:

a. Cannot use a PIC16F887 VDK to control 7SEG-MPX6- components


CC because VDK does not have enough pins to control
b. A PIC16F887 VDK can be used to control the 7SEG-MPX6-CC component through the LED scanning
algorithm.
c. Both sentences A and B are correct
d. Both structures A and B are incorrect

Question 8. Which of the following statements is most correct about interrupts:

a. Interrupts play an important role in the design and implementation of microcontroller applications

b. Interrupts allow the system to respond to an event in an asynchronous manner and handle it
while another program is executing
c. A system controlled by interrupts gives the illusion of doing a lot of work
concurrent work
d. All 3 statements are correct

Question 9. The PIC16F887 microcontroller does not have any of the following interrupts:

a. External interrupt
b. Disconnect PORT B
c. Interrupt due to EUSART serial transmission
d. Interrupt due to Timer 3

Question 10. To use an interrupt type in VDK PIC16F887, we must:

a. Enable the GIE global interrupt enable bit, which enables the type of interrupt we want to use

b. Enable bit enables the type of interrupt we want to use


c. Enable bit enables the use of external interrupts, enable bit enables the type of interrupt we want to use

d. All 3 statements are wrong

Question 11. The INTCON interrupt control register (Interrupt Control Register)
of the PIC16F887 has address 06h and the order of the bits is as follows: Global
Interrupt Enable bit (bit 7), Peripheral Interrupt Enable bit (bit 6), Timer0 Overflow
Interrupt Enable bit (bit 5), INT External Interrupt Enable bit (bit 4), PORTB Change Interrupt Enabl
Machine Translated by Google

(bit 3), INT External Interrupt Flag bit (bit 1), PORTB Change Interrupt Flag bit (bit 0). The statement
“INTCON=0b11111000” allows the use of which of the following types of interrupts: a. Disconnect

port B b. Interrupt
timer 0 c. External
interrupt d. All 3
types of interrupts above

Question 12. TQFP microcontroller PIC16F887 has the following characteristics:

a. has 44 pins b.
has 4 rows of legs c.
No need to drill holes when processing printed circuits
d. All 3 statements are correct

Question 13. For the PIC16F887 VDK, the statement “Ext_int_edge(H_to_L)” has the following

meanings: a. External interrupt occurs when there is a signal transition from high to low at pin
RB0 (external interrupt
pin) b. An external interrupt occurs when there is a signal transition from low to high at pin RB0 (pin
external
interrupt) c. External interrupt occurs when RB0 pin (external interrupt pin) is
high d. External interrupt occurs when RB0 pin (external interrupt pin) is low.

Question 14. Which of the following statements is not true about

interrupts: a. External interrupts and port B interrupts are


both external b interrupts. External interrupts and port B
interrupts operate the same way c. External interrupts and port B interrupts operate differently because
external interrupts occur when there is a state transition from high to low or from low to high, while
PORTB interrupts occur when there is a state change at the interrupt pin.
d. In VDK PIC 16F887, external interrupt and PORTB interrupt both use pins of
PORTB

Question 15. Which of the following statements is most correct about the timer?

a. A timer is a series of flip-flops with each flip-flop being a divider-by-2 circuit, which receives an input
signal as a clock source b. A timer is an alarm clock c. A timer is an
electrical circuit consisting of a real time IC d. All 3
statements are wrong

Question 16. The figure below describes the operating principle of a timer:
Machine Translated by Google

a. 2 bits
b. 1 bit
c. 4 bits
d. 5 bits

Question 18. State the difference between Timer1 and Timer2 of PIC16F887

a. Timer1 is a 16 bit timer, Timer2 is an 8 bit timer b.


Timer 1 only has pre-scale coefficients, Timer2 has pre-scale and post-scale
coefficients c. Timer1 is used for regular timing, Timer2 is specifically used to create pulses
motor control d.
All 3 statements are correct

Question 19. The ADC module in VDK PIC16F887 allows converting an analog input signal into a
digital representation:

a. 8 bits
b. 9 bits
c. 10 bits
d. Both A and C are correct

Question 20. To assign a negative reference voltage value to the ADC module from an external
voltage, we must:

a. Assign bit VCFG1=0 b.


Assign bit VCFG1=1 c.
Assign bit VCFG0=0 d.
Assign bit VCFG0=1
Machine Translated by Google

Question 22. Which of the following statements is not true about the synchronous serial communication module -
asynchronous (EUSART) of VDK PIC16F887:

a. Able to transmit and receive data asynchronously in full-duplex mode


b. Capable of transmitting and receiving data synchronously in half-duplex mode
c. The transmitted character length can be 8 bits or 9 bits
d. Unable to detect errors when transmitting and receiving

Question 23. One pin has the symbol RAS/AN4/SS/C2OUT of the microcontroller. Which of the
following statements is not correct?

a. This pin can be used in 4 different functions


b. This pin can use 4 functions at the same time c. This pin
can only use one function at a time
d. This pin can be used as a signal output function

Question 24. Choose the correct statement about comparing synchronous and asynchronous transmission and
reception of the EUSTART module of pic16f667

a. Synchronous data transfer is faster than asynchronous data transfer


b. Synchronous data transmission is faster than asynchronous
c. Synchronous data transmission has the same speed as asynchronous
d. Inapproachable

Question 25. Choose the correct statement about the full-duplex mode of Eustart's module
ic 16f887

a. The line is dedicated to transmitting or receiving data and not


used for both
b. The line can be used for transmitting or receiving data, but only one line can be used at a
time. Transmitting and
receiving operations can be carried out simultaneously on the same line d. All 3 statements
are wrong

Question 26. IC MAX232 is often used in EUSTART communication between pic16f887 and PC
computer for the purpose of

a. Increase data transmission speed


b. Increase data security c. Synchronize
voltage between VDK and computer d. All 3 statements
are wrong

Question 27. Module CCP1 and CCP2 of pic 16f887 can operate in

a. Capturre mode (determine the duration of an event)


Machine Translated by Google

b. Compare mode (allows the user to intercept an external event later


a time)
c. PWM mode (allows generation of a signal with adjustable frequency and duty cycle)

d. All 3

Question 28. Flash memory in 16f887 microcontroller is

a. Program memory b. Data


memory c. Both a
and b are correct d.
Both a and b are wrong

Question 35. Given the following statement, for 16f887, the timer2 interrupt has higher interrupt priority than the interrupt
timer1

a. Correct
b. Wrong

c. True if these 2 timers are used at the same time


d. True if timer 2 is activated before timer1 follows

Question 36. In CCS, the function "a=a<<1" has the meaning of shifting the bits of variable a one
unit to the left. Assuming initially a= 0xc1
, after 5 translations, we get the result:

a. a=0x08
b. a=0x0F
c. a=0x10
d. a= 0x20

Question 37. The PORTA register of VDK PIC16F887 has address 0Sh, assuming the pins of port
A are signal output pins. The statement "PORTA = S3" has meaning

a. pins RA0, RA2, RA4, RA6 have high voltage levels


b. pins RA1, RA3, RA5, RA7 have high voltage levels
c. pins RA1, RA2, RA3, RA4 have high voltage levels
d. All 3 statements are wrong

Question 38. The TRISA register of the VDK PIC16F887 determines whether a pin of port A is
reading or outputting a signal. After declaring the TRISA(8Sh) register address, the statement
“TRISA=1S” makes sense

a. RA0, RA1, RA2, RA3 pins are signal reading pins


b. Pins RA4, RA5, 5A6, RA7 are signal output pins
c. Both sentences a and b are correct
Machine Translated by Google

d. Both sentences a and b are incorrect

Question 39. PORTA AND TRISA are two registers that manage input and output signals at port A of
the VDK PIC16F887. The following command "#byte PORTA =0x05" has the

meaning of a. RA0 pin and RA2 pin of port A are signal read pins b.
assign a value of 5 to port A c. The
address of the PORTA register is 05h d. All 3
statements are wrong

Question 40. VDK PIC16F887 does not have any of the following modules

a. RS232
b. SPI
c. I2C
d. CAN

Question 41. The data set of VDK PIC16F887 includes

a. Special function registers b. Multi-


purpose registers c. Bit addressing
registers d. All 3 statements are correct

Question 42. If an ADC has a positive input reference voltage of 4.096V and is 10 bit conversion.
Determines the resolution (mV/bit) and the resulting binary number if the conversion input voltage is
1V

a. 4 mv/bit, 0011111010 b.
4mV/bit, 0011101100 c. 8mV/
bit, 0001111111 d. 8mV/bit,
0011111101

Question 43. The clock frequency of an MCU is 8 MHz. Calculate the preload value for the 16-
bit timer (preload value) to create a 10ms interrupt

a. 45536
b. 25536
c. 15536
d. 35536

Question 44. Suppose we want to control a motor that can rotate at a maximum of 3000vg/
min, the encoder disc mounted on the motor has 200 pulses. When the motor rotates at maximum
speed it can produce a pulse period of
Machine Translated by Google

a. 100us
b. 50us
c. 200us
d. 60us

Question 45. For the microcontroller used is PIC16F887, quartz frequency is 20MHz,
choose prescale value = 8. If you want timer0 to time a period of 240us, the initial
value to set for timer0 is
a. TIMER0=156
b. TIMER0=106
c. TIMER0=116
d. TIMER0=56

Question 46. Given the following circuit and code, the displayed result is

Void main()

Output_B(0b01101101);

a. 5
b. 2
C.
3 d. All is incorrect

Question 47. For the VDK PIC16F887, one machine cycle will be 4 times the oscillation
cycle of the quartz. If using 8MHz quartz, the machine cycle is
a. 250ns
Machine Translated by Google

b. 200ns
c. 500ns
d. 400ns

Question 48. Modules CCP1 AND CCP2 of VDK PIC16F887 can operate in

a. Capture mode (determines the duration of an event) b. Compare


mode (allows the user to intervene an external event after one
predetermined period)
c. PWM mode (allows generation of a signal with adjustable frequency and duty cycle) d.
All 3 statements
are correct

Why use pull-up resistors in circuits? Its role. When should/should not be used
(Recommended)
1. Configuration of PIC16F887 microcontroller
2. Types of memory that PIC16F887 microcontroller integrates
3. Names and functions of ports A, B, C, D, E

Question 1. How many ports does PIC16F887 have?

a. 3
b. 4
c. 5
d. 6

Question 2. Which port has 4 lines:

a. A
b. B
c. C
d. E

Question 3. How many bits does PIC16F887 integrate with ADC:

a. 8 bits
b. 9 bits
c. 10 bits
d. 12 bits

Question 4. How many channels does the PIC16F887 integrate with ADC?

a. 8
b. 14
Machine Translated by Google

c. ten
d. ten
e. twelfth

Question 5. The SPI data transmission signals of pic16f887 are named:

a. SDI, SCL b.
SCL, SDA c.
SDI, SDO d.
SDA, SDI

Question 6. The SPI data transmission signals of the PIC16F887 are named:

a. SDI, SCL, SDO, SS b.


SDI, SDO, SS c.
SDI, SCK, SDO, SS d. SDA,
SDI, SCK

Question 7. UART data transmission signals:

a. TX, RX, CK b.
TX, DT, CK c. TX,
RX d. DT, CK

Question 8. SART data transmission signals:

a. TX, RX, CK b.
TX, DT, CK c. TX,
RX d. DT, CK

Question 9. Which signals multiply the CK pulse for timer0?

a. T0SCK b.
TOSCL
c. TOCK1
d. TOCK

Question 10. Which signals set the reference voltage for the ADC:

a. CVREF & VREF+


b. CVREF & VREF-c.
VREF+ & VREF-
d. CVREF- & VREF-
Machine Translated by Google

Question 11. Which port of PIC16F887 has an internal pull-up resistor:

a. A b.
B c. C
d. D

Question 12. Which port has an interrupt input other than INT?

a. A b.
B c. C
d. D

Question 13. The TRISX register has a function

a. Orientation for ADC b. Store


data for ports c. Orientation for ports
d. Store the addresses of the ports
Question 14. Declaring the variable

"INT x" is the variable x

a. 1 bit b.
8 bits c.
16 bits d.
32 bits

Question 15. Declaring the variable "INT16 y", the variable y is:

a. 1 bit b.
8 bits c.
16 bits
d. 32 bits

Question 16. Declaring the boundary "unsigned nit y", the variable y is a positive integer: a.

Values from 0 to 255 b. Values


from 0 to 25 c. Values from -128
to 127 d. Values from -128 to 255
Question 17. Declaring the boundary

"signed nit y", the variable y is a positive integer: a. Values from 0 to 255 b. Values from 0

to 256
Machine Translated by Google

c. Values from -128 to 127 d.


Values from -128 to 255 Question

18. Which command configures port B?

a. Output_b(value) b.
Output_X(value) c.
Set_tris_b(value) d.
Input_X(value)

Question 19. Which command outputs an 8-bit value to portB?

a. Output_b(value) b.
Output_high(value) c.
Set_tris_b(value) d.
Input_b(value)

Question 20. Which command makes a port signal go low?

a. Output_low(pin) b.
Output_high(pin) c.
Output_toggle(pin) d.
Input_pull(pin)

Question 21. For PIC microcontroller, the

ports are: a. Access bit


b only. Retrieve bits and
bytes c. Retrieve
bytes d. 16-bit access

Question 22. In an 8-LED scanning circuit, the transistor has

function a. Current
amplification b. Voltage
amplification c. Amplifying current, voltage, LED

control Question 23. In a scanning circuit of 8 LEDs, at each moment there is:

a. 2 bright LEDs
b. 1 led tube
c. 3 bright LEDs
d. 8 bright LEDs

Question 24. In the 8 LED scanning circuit, if the program does not scan then:
Machine Translated by Google

a. 8 LEDs still light b.


8 dimly lit LEDs c. 8
LEDs off d. 1

bright LED

Question 25. If you expand the 8-LED scanning circuit to 16 LEDs, use a total of:

a. 16 I/O b.
32 I/O c. 8 I/
O
d. 24 I/Os

Question 26. In a scanning circuit of 8 LEDs, the time each LED lights up is:

a. 1/8 CK b.
7/8 CK c.
1/4CK d.
8/7CK

Question 27. In a scanning circuit of 8 LEDs, the time it takes for each LED to turn off is:

a. 1/8 CK b.
7/8 CK c.
1/4CK d.
8/7CK

Question 28. Code 7, segment 9 of the common anode LED is:

a. 0xF9 b.
0x90 c.
0x80 d.
0xF0

Question 29. The 7-segment hex F code of the common anode LED is:

a. 0x8E b.
0xE8 c.
0xF8 d.
0xFE

Question 30. How many timers does VDK have?

a. 3
b. 4
c. 5
Machine Translated by Google

d. 6

Question 31. How many Counters does VDK have?

a. 3
b. 4c.
2 d. 5

Question 32. Timer0 is:

a. 10 bits
b. 12 bits c.
16 bits d. 8
bits

Question 33. Timer1 is:

a. 10 bits
b. 12 bits c.
16 bits d. 8
bits

Question 34. Which timer has a pre-divider and a post-divider:

a. T0, T1, T2 b.
T2 c.
T0, T1 d.
T0, T2

Question 35. Which timer has a pre-divider?

a. T0, T1, T2 b.
T2 c.
T0, T1 d.
T0, T2

Question 36. Timer0 generates an interrupt request

when: a. Count value from FFH to 00H b.


Count value from FFFH to 0000H c. Count
value from 00H to FFH d. The timer value
is equal to the PR2 value. Question 37. Timer1

generates an interrupt request when:


Machine Translated by Google

a. Count value from FFH to 00H b.


Count value from FFFH to 0000H c. Count
value from 00H to FFH d. The timer
value is equal to the PR2 value Question

38. Timer2 generates an interrupt request when:

a. Count value from FFH to 00H b.


Count value from FFFH to 0000H c. Count
value from 00H to FFH d. The timer
value is equal to the PR2 value. Question

39. Which timer allows counting external pulses?

a. T0, T1, T2 b.
T2 c.
T0, T1 d.
T0, T2

Question 40. Which timer has On/off operating mode?

a. T0, T1, T2 b.
T2, T1 c.
T0, T1 d.
T1

Question 41. Timer0 has the prescaler assigned to timer0 or watchdog timer

a. PSA
b. PS<2:0> c.
T0SE d.
T0SE

Question 42. Which bit of Timer0 selects the internal or external pulse?

a. PSA
b. PS<2:0> c.
T0SE d.
T0SE

2.1 The memory capacity of the pic16f887 program is:

a. 8KxBytes

b. 8Kx14Bytes
Machine Translated by Google

c. 8Kx16Bytes

d. 8Kx368Bytes

2.2 The data memory of pic16f887 has a capacity of

a.256Bytes

b. 8Kx16bit

c. 8Kx14bit

d. 368Bytes

2.3 The EEPROM data memory of 16f887 has a capacity of

a.8KxWord

b.8Kx14bit

c.256Bytes

d. 368Bytes

2.4 The memory stack of PIC 16f887 has a capacity of

a. 8Bytes

b. 8x14bit

c. 256Bytes

d. 8x13bit

2.5 Program memory 16f887 divided into

a. 2 pages

b. 4 pages

c. 2 banks

d. 4 banks

2.6 16f887 data memory divided into

a. 2 pages

b. 4 pages

c. 2 banks

d. 4 banks
Machine Translated by Google

2.7 Each program memory page of pic 16f887 has a capacity of

a. 256bytes

b. 1024 words

c. 2048 words

d. 368 bytes

2.8 Each data memory bank of the 16f887 has a capacity of

a.256 bytes

b.128 bytes

c.2048 bytes

d.368 bytes

2.9 Which memory page does 1234H belong to?

a. Page 0

b. Page 1

c. 2nd page

d. 3rd page

2.10 The PC register of 16f887 has a length of

a.12 bits

b.13bit

c.14bit

d.15bit

2.11 Dividing memory by page has advantages a.

Make the microcontroller run fast b.

Increase the number of codes

c. Decreases memory addresses

d. Reduces the amount of code

2.12 Pic's nested subroutines depend on capacity

a. Program memory
Machine Translated by Google

b. Data memory

c. Stack memory

d. EEPROM memory

2.13 Direct access to data memory of 16f887 then

a. Allow all 4 banks to be arbitrary

b. Allow 2 banks

c. 1 bank allowed

d. Allow 3 banks

2.14 To indirectly retrieve the data set of Pic 16f887 then

a. Allow arbitrarily all 4 banks

b. Allow 2 banks

c. 1 bank allowed

d. Allow 3 banks

2.15 Bit allows changing banks in direct access to PIC data memory
16f887 is

a. IRP1,IRP2

b.RP1, RP0

c.RP1,RP2

d.RP,IRP

You might also like