1.- How could we define a microcontroller?
a) It is the set of sequential digital systems (those that have
memory) that allow for the distribution of the signal logic.
b) It is the arithmetic logic unit that consists of a digital circuit that
allows performing arithmetic and logical operations between two numbers.
It is a single-chip or integrated circuit computer, that is,
the circuit has a CPU, RAM and ROM memory, and input and output ports.
exit, etc.
They are the means of communication that use different components to
exchange information between each other, which will eventually be reflected
on the pins of the processor package.
2.- How could you explain the difference that exists when comparing
onemicroprocessorwith a microcontroller?
a) The microcontroller includes the microprocessor, memories, and ports, but
the microprocessor does not include them.
b) The device used for it is called a microcontroller
government of one or several processes and the microprocessor that contains a
CPU.
c) The microcontroller is software that allows the equipment to communicate
with the hardware, the microprocessor is a computer program that
allows interaction with peripherals.
d) The microcontroller is a program that links a peripheral device
The operating system and the microprocessor contain a CPU
3.- How many microcontrollers are there in the electronic market and
What brands?
a) There are two in the market: AMD or Intel.
b) There are four brands (Cortex-M3, Cortex-M0, ARM7, ARM9)
c) There are two brands (SPI or I2C)
d) There are many microcontrollers from various brands, and each brand has
different models, the most popular companies are: MICROCHIP, MOTOROLA,
ATMEL, TEXAS INSTRUMENT, etc.
4.- What household appliances or other devices are manufactured based on
microcontroller, with which one can appreciate the reach that currently
is having?
a) Printers, reduction micromotors, screens for laptops.
b) USBs, hard drives, Bluetooth adapters, Wi-Fi adapter.
c) Theprintersthe cell phones, the mice, thecomputersfromcars
some washing machines, refrigerators, air conditioners, etc.
d) Wifi adapter, printers, reducer micromotors.
5.- Which microcontroller will we use in this course, and what brand is it?
a) Brand: Microchip and microcontroller is called PIC16F84A, PIC16F628,
PIC16F877.
b) Brand: Atmel and the MCU is called MEGA 169V, STM32L4, STM32F429.
c) Brand: Intel and Amd SAB-C115, P8051, AMD29000.
d) Brand: Altera and Amcc EPM-7064S, PIC16F84A.
6.- What elements are required to record aprograminside a
microcontroller?
a) Hardware.
Software.
c) Hardware and Software.
d) PC
7.- What is machine language?
a) Hexadecimal language used in computers and microcontrollers for
human-Machine interaction.
b) It is the decimal language 1-10 that computers and microchips use.
programming.
c) It is the binary language used for microprogrammable circuits
analog
It is the language of 1s and 0s that microcontrollers operate with, that is to say the
bits. Any instruction or code that is executed must first
become 1 and 0.
8.- What has been created to manage machine language more easily?
a) The binary language (language of 1 and 0) has been created because it is easier.
to understand and resembles human language.
b) The assembly language has been created (Assembling packages of 1s and 0s)
because it is difficult for humans to handle large amounts of 1s and 0s.
c) The ASCII language was created.
A high-level language has been created, as it consumes fewer resources than
the assembly language.
9.- What does assembly language consist of?
a) It is a language formed by acronyms, which are groups of
caracteres alfanuméricos que simbolizan las ordenes o tareas a realizar
for each function, the acronyms correspond to the initials of the
name of the instruction in English, in such a way that they 'remind' us of the
operation that will carry out the instruction which facilitates memorization,
por ejemplo: MOV--> Para mover, ADD-->Para sumar, SUB--> Para restar.
b) It is a language that is formed by mnemonics, which are groups of
alphanumeric characters that symbolize the orders or tasks to be performed
for each function, the mnemonics correspond to the initials of the
name of the instruction in English, in such a way that they 'remind' us of the
operation that the instruction will carry out which facilitates memorization,
por ejemplo: MOV--> Para mover, ADD-->Para sumar, SUB--> Para restar.
c) The assembly language is the programming language used for
write high-level computer programs, and constitutes the
more direct representation of the machine code specific to each
computer architecture readable by a programmer.
d) Assembly language is easily portable, that is, a code
written for a Microprocessor, does not need to be modified many times
as a whole to be used on a different machine.
10.- Menciona un ejemplo de una suma con mnemónico y su correspondiente
binary expression. Which way of expressing is easier?
a) Add 49 to a quantity and store it in register w. '1111000101101'
b) Add 58 to a quantity and keep it inrecord1111100111010
c) Add 64 to a quantity and store it in register w. "0001111010111"
d) Add 2 to a quantity and store it in register w. "000000000011"
11.- How are we going to convert theinformationfrom assembly language to the language
machine?
a) With thesoftwareMPLAB
b) With PROTEUS software
c) With the mikrobasic software
d) With the NIPLE SOFT software
12.- What characteristics should the name have?fileassembler
(theprogramsWhat are we going to prepare?
a) 8 [Link]
b) 16 [Link]
c) 4 [Link]
d) 8 characters, asm
13.- What is the name of the file for each program in which we will write the
Instructions for the PIC (with mnemonics)?
a) .cof file
b) Hexadecimal file
c) lst file
d) Source file
14.- What will happen every time we compile a source file through a
software?
a) Several files are generated with different names and the extension is changed.
b) Several are generatedfileswith the same name as the source file but
they will change the extension.
Several files are generated with the same name and the same extension.
d) Two files are generated with the same name as the source file, but
they will change the extension.
15.- Express how the source file we will create is structured.
a) It will be written in 4 columns, using the tab key, according to
the following columns.
b) It will be written in 3 columns, using the tab key, according to
the following columns.
c) It will be written in 5 rows, using the tab key, according to
the following rows.
d) It will be written in 4 rows, using the tab key, according to
the following rows.
16.- Describe theconceptofalgorithm.
It is a prescribed set of well-defined instructions or rules.
ordered and infinite that allow for carrying out a process through
successive steps.
b) which follows a series of its own conventions. The symbols represent a
concept, arelationshipaoperationor amathematical formula according to
certain rules. These symbols should not be considered abbreviations, but rather
entities with their own autonomous value.
c) It consists of a series of steps in a certain order, which serve to
solve a problem or achieve aobjective;for example the steps to
change a car tire, the steps to assist in theschoolthe
steps to prepare a recipe, etc.
d) It is the formal symbolic language that follows its own conventions. The
symbols allow the representation of concepts, operations, and all kinds of
mathematical entities.
17.- What is aflowchart?
a) Graphic representation of the relationships that the elements have or the
parts of a set.
b) It is a graphic way of expressing aprocesso algoritmo, se manejan
varioussymbols:(DRAW THEM).
c) It is a graph that represents the existing links between the
different components of the system or a set.
It is a way of graphically representing a set of data or values.
either horizontally or vertically.
18.- What does PIC mean?
ATMEGA 2560 controller.
b) Generation of Timers, Pulses, and Oscillations.
c) Peripheral interface controller.
d) Programmable logic controller.
19.- Describe the internal capacity of ROMflashWhat does the PIC16F84A have?
It has 1 Kilobyte of memory, that is, 14 bits.
It has 1 kilobyte ofmemorythat is 1024 rows or spaces.
It has 68 records at 8 bits.
It has 10 kilobytes of memory.
20.- How do you have it organized?the memoryofdatathe
PIC16F84A?
a) Organized in twobanksBank 0 and Bank 1.
b) Organized into four banks Bank 0, Bank 1, Bank 2, Bank 3.
c) Organized in a single Bank.
d) Organized into 3 Banks
21.- Describe what an ALU is, and how many bits it is in the PIC16F84A.
It is the arithmetic [Link] is an auxiliary part of the CPU, that
is in charge of carrying out theoperationsmathematicsand logical operations
(AND, OR, NAND, etc.) In this PIC it is 16 bits.
b) It is the arithmetic unitlogicit is an auxiliary part of the CPU, that is
in charge of carrying out theoperationsmathematicsand the logical operations
(AND, OR, NAND, etc.) In this PIC it is 20 bits.
c) It is the arithmetic unitlogicit is an auxiliary part of the CPU, which is
in charge of carrying out theoperationsmathematicsand the logical operations
(AND, OR, NAND, etc.) In this PIC it is 4 bits.
d) It is the arithmetic unitlogicit is an auxiliary part of the CPU, which
is responsible for carrying out theoperationsmathematicsand the logical operations
(AND, OR, NAND, etc.) In this PIC it is 8 bits.
22.- Describe how the ports are constituted in the PIC16F84A.
a) It has 2 ports for information to enter and exit, depending on how it is
Prepare. One port is 5 bits and the other is 8 bits.
It has 4 ports for information to come in and out, depending on how it is.
prepare. One port is 5 bits, another is 8 bits, another port is 8
bits and 8bits.
c) It has 5 ports for information to enter and exit, depending on how it is
prepare. One port is 5 bits, the other is 8 bits, 8 bits, 8 bits, and 3.
bits.
It has 3 ports for information to come in and out, depending on how it is
prepare. One port is 5 bits, the other is 8 bits and 4 bits.
It has 2 ports for information to enter and exit, depending on how they are set up.
One port is 5 bits and the other is 8 bits.
Each panel will lead to a pin.
23.- What is the program counter?
a) It is a record where the programs and data about what can be
perform operations.
It is a record that always keeps storing theaddressby memory where it
find the next instruction or data to process.
c) It is a read-only memory that stores instructions and data of
permanent form.
It can be electrically programmed, erased, and reprogrammed.
24.- Describe how the 3 memory blocks are organized within the
PIC16F84A.
R: Three memory blocks are distinguished:
A) Program memory: It is used to store the instructions or codes.
execute, it has 1024 memory positions.
B) RAM memory: (Random Access Memory) It is volatile; that is to say, it is erased when
to energize oneself.
C) EEPROM Memory: It is a read-only memory that can be programmed and
erase electrically.
25.- Observe the drawing of the internal architecture of the PIC16F84A and indicate the
components according to the position.
["1. EEPROM MEMORY,","2. FLASH"] PROGRAM MEMORY, 3. PROGRAM COUNTER, 4. ALU,
WORK REGISTER
["b. 1. ALU, WORK REGISTER, 2. EEPROM MEMORY, 3. FLASH MEMORY PROGRAM MEMORY"]
4. PROGRAM COUNTER
c. 1. FLASH PROGRAM MEMORY, 2. MEMORIA EEPROM, 3. PROGRAM COUNTER, 4. ALU,
WORK REGISTER
d. 1. MEMORIA EEPROM, [Link] COUNTER, 3. ALU, REGISTRO DE TRABAJO,4 FLASH
PROGRAM MEMORY.
26.- What is a record?
a. Indicate the status of the last arithmetic or logical operation performed.
b. Memoria auxiliar no volátil con capacidad de 128 posiciones en 8 bits cada
one.
c. Es una unidad de memoria para grabar información, está compuesto de varios
bits.
d. Contains all the necessary components to control the operation of
a determined task.
27.- What is the W (Work) register of the PIC16F84A?
It is a work log in which user information is interpreted.
to perform sent actions.
b. It is an internal record used to direct the instruction of
control program that stores in the program memory.
c. It is an external register used to store the instruction of
program of the control that controls in the memory of the program.
d. It is a work record in which user information is recorded for
perform operations or send information to the ports and vice versa.
28.- Which of these options belongs to the classification of records of the
PIC16F84A?
a. Special Function Registers (SFR)
b. General Purpose Records (GPR)
c. Low Byte Program Counter Register (PCL)
d. Configuration log (CW)
29.- What are memory banks?
a. They are areas where the PCL and the GPR are recorded, there are two banks BANK 0,
BANK 1.
b. They are areas where the SFR and GPR are recorded, there are two banks BANK 0,
BANK 1.
c. They are areas where the SFR and the CW are recorded, there are two banks BANK 0,
BANK 1.
d. They are areas where the SFR and PCL are recorded, there are two banks BANK 0,
BANK 1.
30.- What is the STATUS register?
It is an internal record used to direct the instruction of
program of the control that stores in the program memory.
b. Non-volatile auxiliary memory with a capacity of 128 positions, each 8 bits
one.
c. It is the record that indicates the general state of what is happening
inside the microcontroller.
It is a work log in which user information is interpreted.
to carry out sent actions.
31.- Why are the bits in the STATUS register called flags?
a. Because they indicate something that has occurred within the microcontroller.
b. Because they indicate something that has occurred within the microprocessor.
c. Because they indicate something that has occurred within the RAM.
d. Because they indicate something that has occurred within the EEPROM.
32.- What does bit 0 (C) of the STATUS register indicate?
a. It indicates that a CARRY occurred
b. It indicates that a ZERO occurred
c. It indicates to us that a ZERO FLAGS occurred.
d. Indicates that a FLAGS CARRY 4bits occurred.
33.- What does bit 1 (DC) of the STATUS register indicate?
a. It indicates to us that a Carry occurred between bit 2 and bit 3.
b. It indicates that a Carry occurred between bit 3 and bit 4.
c. It indicates to us that a Carry occurred between bit 1 and bit 2.
d. It indicates that a Carry occurred between bit 0 and bit 1.
34.- What does bit 2 (Z) of the STATUS register indicate?
a. The result of the last operation gives us zero
b. they indicate something that has occurred within the EEPROM.
c. General state of what is happening inside the microcontroller.
d. It is used to detect a low power mode
35.- What is the purpose of bit 5 (RP0) of the STATUS register?
a. It is used to indicate the end of the Watchdog timer
b. It is used to select one of the 4 memory banks.
c. It is used to select 2 of the 4 memory banks
d. It is used to select one of the 2 memory banks.
36.- Express the procedure to configure port A (PORT A) as input.
a. To switch from bank 2 to bank 3, we assign 1 to bit 5 (RP0) of the register.
STATUS, In TRISB at address 85h, we must write 5 ones (1) so that the
PORT A behaves like inputs (PORT A only has 5 bits) We go back to
bank 0, assigning a 0 to bit 5 (RP0) of the STATUS register.
b. Switching from bank 0 to bank 1, we assign a 1 to bit 5 (RP0) of the register
STATUS, In TRISA of address 85h, we must write 5 ones (1), so that the
PORT A behaves like inputs (PORT A only has 5 bits) We go back to
bank 0, assigning a 0 to bit 5 (RP0) of the STATUS register.
c. Switch from bank 3 to bank 0 by assigning 1 to bit 5 (RP0) of the register
STATUS in TRISA at address 85h, we must write 5 ones (1) so that the
PORT A behaves like inputs (PORT A only has 5 bits) We go back to
bank 0, assigning a 0 to bit 5 (RP0) of the STATUS register.
d. To switch from bank 1 to bank 2, we assign 1 to bit 5 (RP0) of the register.
STATUS in TRISA at address 85h, we need to write 5 ones (1), so that the
PORT A behaves like inputs (PORT A only has 5 bits) We go back to
bank 0, assigning a 0 to bit 5 (RP0) of the STATUS register.
37.- Express the procedure to program port B (PORT B) as output.
a) To switch from bank 0 to bank 1, we assign a 1 to bit 5 (RP0) of the register.
STATUS.
b) We return to bank 0, assigning a 0 to bit 5 (RP0) of the register
STATUS.
c) In TRIS B at address 86h, we must write 8 zeros (0), to
prepare PORT B as output. (PORT B has 8 bits)
Options:
1.- 1a,2b,3c
2.- 1c, 3b, 3a
3.- 1a,2c,3b.
4.- 1c,2a,3b
38.- Is it possible to program the PORTA as output? Describe the procedure.
a) Being in TRIS A of address 85h, we must write 5 zeros (0), to
that PORT A behaves as outputs (PORT A only has 5 bits)
b) We return to bank 0, assigning a 0 to bit 5 (RP0) of the register
STATUS.
c) To switch from bank 0 to bank 1, we assign a 1 to bit 5 (RP0) of the register.
STATUS.
{"text":"Options:"}
1.- 1a, 2b, 3c
2.- 1c, 2b, 3a
3.- 1a,2c,3b
4.- 1c, 2a, 3b.
39.- Is it possible to configure PORTB as input? Describe the procedure.
a) In TRIS B at address 86h, we must write 8 ones (1) to prepare
PORT B as inputs. (PORT B has 8 bits)
b) To switch from bank 0 to bank 1, we assign a 1 to bit 5 (RP0) of the register
STATUS.
We return to bank 0, assigning a 0 to bit 5 (RP0) of the register.
STATUS.
Options:
1.- 1a,2b,3c
2.- 1b,2a,3c.
3.- 1a,2c,3b
4.- 1c, 2a, 3b
40.- What is the watchdog timer of the microcontroller (Watch Dog Timer = WDT)?
1.- Its purpose is to produce a reset of the PIC microcontroller periodically.
time period with which the execution of the program is restarted, to avoid
that the device enters an infinite loop.
It can be programmed, erased, and reprogrammed electrically.
3.- They are the memory records in which the ...
conditions that were present in the last operation performed
It is the device that retains, memorizes, or stores computer data.
for some period of time
41.- What are computing ports?
1.- It is the device that retains, memorizes, or stores computer data.
for some period of time
2.- It causes the program control to execute the instructions that
are indicated on the label "ETIQ"
3.- It refers to the inputs and outputs that a computer has for the
transfer of information and its relation to the outside world.
4.- Move information from register W to destination register F, which in this
if the destination register is PORT B
42.- How would you prepare port A (composed of 5 bits) as input?
a) We return to bank 0, assigning a 0 to bit 5 (RP0) of the register.
STATUS.
b) In TRIS A at address 85h, we must write 5 ones (1), so that the
PORT A behaves like inputs (PORT A only has 5 bits)
c) To switch from bank 0 to bank 1, we assign a 1 to bit 5 (RP0) of the register
STATUS.
Options:
1.- 1a,2b,3c
2.- 1b, 2a, 3c
3.- 1c, 2b, 3a.
4.- 1c,2a,3b
43.- How would you prepare the PORTB (composed of 8 bits) to function as
exit?
a) To switch from bank 0 to bank 1, we assign a 1 to bit 5 (RP0) of the register.
STATUS.
b) In TRIS B at address 86h, we must write 8 zeros (0), to
prepare PORT B as output. (PORT B has 8 bits)
c) We return to bank 0, assigning a 0 to bit 5 (RP0) of the register
STATUS.
Options:
1.- 1a,2b,3c.
2.- 1b, 2a, 3c
3.- 1c,2b,3a
4.- 1c, 2a, 3b
44.- What connections would you make to PORTB so that it can display the data?
outgoing?
Options:
1.- Connect LEDs to the PORTA output
2.- Connect LEDs to the output of the oscillator
3.- Connect LEDs to reset
4.- Set the PORTB output to LEDs.
45.- Develop an ALGORITHM for the PIC16F84A to permanently read 5 bits
through PORTA and transfer that captured information to PORTB and to its
once, it is deployed with LEDs.
a) Start
b) Prepare PORT B as output.
c) Prepare PORT A as input.
d) Read the PORT A and loadthe readingin record W (Work).
e) Go to step 4.
f) Transfer the content of W to PORT B.
g) END.
Options:
1.- 1a,2c,3b,4d,5f,6e,7g.
2.- 1a, 2b, 3c, 4d, 5e, 6f, 7g
3.- 1a,2c,3d,4f,5e,6b,7g
4.- 1a, 2c, 3b, 4d, 5e, 6f, 7g
46.- Make adiagramof flow corresponding to the problem of point 1.
(DRAWING)
a) PORTAa=W, PORTB=W
b) PORTB=OUT and PORTA=IN
c) START
d) PORTB
FIN
Options:
a) 1c,2b,3a,4d,5e.
b) 1b,2a,3c,4d,5e
c) 1b,2c,3a,4d,5e
d) 1a,2b,3c,4d,5e
47.- Write the code regarding the preparation of the ports and the registration.
STATUS
a)__CONFIG__WDT__OFF ;Disables the watchdog.
f)
c)
e)
d)
b)
Options:
a) 1a, 2b, 3c, 4d, 5f, 6e
b) 1a, 2b, 3c, 4d, e5, 6f
c) 1a,2f,3c,4e,5d,6b.
d) 1a,2b,3c,4d,5e,6f
48.- Make some notes that explain each of the lines of code from the point.
3.
a) Ports A and B are related to TRIS A and TRIS B, they are neighbors.
from the bank right away.
We turned off the watchdog so that it allows us to work with our
program.
c) We are indicating that the STATUS is located at memory address 3.
The word or code EQU means equal.
Options:
1.- 1a,2c,3b,4d
2.- 1c, 2d, 3a, 4b
3.- 1a, 2c, 3d, 4b
4.- 1b, 2a, 3d, 4c.
49.- Write the code related to preparing the ports (PORTA as input and
PORTB as output).
a)
b)
c)
d)
e)
f)
g)
h)
i)
j)
Options:
a) 1a,2b,3c,4d,5f,6e,7j,8i,9h,10g
b) 1g,2b,3c,4d,e5,6f,7h,8j,9i,10a
c) 1a,2i,3c,4j,5d,6b,7f,8g,9e,10h
d) 1a,2b,3c,4d,5e,6f,7g,8h,9i,10j.
50.- Make some notes explaining each of the lines of code from the point
5.
1.- ORG a.- Sets bit zero in the STATUS
2.- BSF b.- Move what is in Wa the
3.- CLRF TRISA registration
4.- MOVLW c.- Move load, load in W
5.- MOVWF d.- Delete, assign zeros
6.- BCF e.- Bit Seg Flag to the STATUS register
f.- refers to the origin 00
a) 1f,2e,3d,4c,5b,6a.
b) 1a,2c,3e,4b,5f,6d
c) 1a,2d,3b,4f,5c,6e
d) 1c,2b,3d,4a,5e,6f
51.- Write the code for the main body of the program
a)
c)
d)
b)
Options:
e) 1a,2b,3c,4d
f) 1a,2c,3d,4b.
g) 1b, 2d, 3c, 4a
h) 1b,2c,3d,4a
52.- Select the correct option that explains each of the instructions of the
main body of the program.
1.- ETIQ a.- it is a label, it is a reference point in the program,
2.- MOVF it's not an instruction.
3.- PORTA, W b.- Move information from a PORT A register to W.
4.- Move W to PORTB c.- The information from PORT A is transferred to W.
5.- GOTO LABEL d.- Moves information from register W to a destination register
6.- END F, that in this case the destination register is PORT B,
It causes the program control to be executed.
instructions indicated on the label 'LABEL'
f.- It is the end of the program.
Options:
a) 1a,2b,3c,4d,5e,6f.
b) 1e,2c,3d,4f,5a,6b
c) 1b,2d,3c,4a,5f,6e
d) 1b,2f,3e,4a,5c,6d
53.- Consider that the PIC16F628 microcontroller has comparators of
entries that need to be disabled if not required.
a) cmcon equ 1FH ; in the program section the following are disabled
way
b) movlw b"00000111" ; comparators off
c) movwf cmcon ; allows the pins to be inputs/outputs
Options:
["1a","2c","3b"]
b) 1b, 2a, 3c
c) 1b,2c,3a
d) 1a,2b,3c.
The final address of a memory map that starts at zero is 7FFF. What is the capacity of it?
memory of that sector?
16k x8
8k x8
32 k x8
64k x8
Which of the following records is considered a work record?
A
Status
FSR
W
Option
What is the final address of a 1k X8 bits memory?
1FF
3FF
7FF
1024
The status register is located in memory.
SRAM
FLASH
EEPROM
CACHE
VIRTUAL
Move A, B
Assign variable A to B
Assign Variable B to A
Sum A + B
Move 2 bits from A to B
What instruction allows configuring a port of the microcontroller
PORT
MOV
TRIS
OPTION
clear B,0
In basic architecture, microcontrollers have the following memories
SD Memory
Flash Memory
SRAM Memory
ROM memory
A microcontroller typically has its operating frequency
4 KHz
8 MHz
16 Ghz
4 Hz
Typically, the current range delivered or consumed at the pin of a port of the
microcontroller is
1mA-5mA
10 mA-25 mA
100 mA-500 mA
1000 mA-5000 mA