Chapter 3: Further Microcontrollers Flashcards
What is the structure of the main program code
Label Command Operand ; comments
Give three examples of input devices
Microswitch
Temperature sensor
Microphone
Give three examples of output components
LED
Motor
Speakes
Describe the architecture of a microcontroller
Input port connected to the CPU from the left
Output port connected to the CPU from the right
Memory connected to the CPU from above
Clock connected to the CPU from the bottom
Name the two types of microcontroller memory
Program memory and Data memory
What do vectors do?
Tell the processor what to do in specific events
What is the reset vector address?
0000h
It contains a goto command followed by a label at the start of the program
What is the interrupt vector address?
0004h
It contains a goto command and a label at the start of the program
What is a subroutine?
They carry out operations that can be used many times.
They are short sections of program in an area of memory outside the main program.
How would you jump to a subroutine?
Using the call command
How would you jump back to the main program from a subroutine
Using the return command
How would you configure PortA
Using the TrisA command
How would you configure portB
Using the TrisB command
How would you configure a bit to be an input in portA?
Put a logic 1 in TrisA
How would you configure a bit to be an output in portA?
Put a logic 0 in TrisA