EMBEDDED APPLICATIONS MIDTERM STUDY

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/124

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 6:08 PM on 10/6/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

125 Terms

1
New cards

True or False: Microcontrollers are normally less expensive than microprocessors.

True

2
New cards

When comparing a system board based on microcontroller and a general-purpose microprocessor, which one is cheaper?

A microcontroller-based system

3
New cards

A microcontroller normally has which of the following devices on chip:

4
New cards

(A) RAM (B) ROM (C) I/O (D) ALL OF THE ABOVE

(D)

5
New cards

A general-purpose microprocessor normally needs which of the following devices attached to it?

6
New cards

(A) RAM (B) ROM (C) I/O (D) ALL OF THE ABOVE

(D)

7
New cards

An embedded system is also called a dedicated system. Why?

It is dedicated because it does only one type of job.

8
New cards

What does the term embedded system mean?

Embedded system means that the application and the processor are combined into a single system.

9
New cards

List some of the 8-bit microcontrollers

AVR, PIC, 8051, HCS08

10
New cards

Name three features of the AVR

64K of RAM space, 8M of on-chip ROM, a larger number of I/O pins, ADC, and different serial protocols such as SPI, USART, I2C, ect.

11
New cards

The AVR is a(n) -bit microprocessor

8

12
New cards

Name the different groups of the AVR chips

  • tiny
13
New cards
  • mega
14
New cards
  • xmega
15
New cards
  • classic
16
New cards
  • special purpose
17
New cards

Which group of AVR has smaller packages?

tiny

18
New cards

Give the size of RAM in each of the following:

19
New cards

(A) ATmega32 (A) ATtiny25

(A) 2K bytes (B) 128 bytes

20
New cards

Give the size of the on-chip program ROM in each of the following

21
New cards

(A) ATtiny84 (B) ATmega328 (C) ATtiny25

(A) 8K bytes (B) 32K bytes (C) 2K bytes

22
New cards

TRUE or FALSE: The I/O registers are used for storing data?

False

23
New cards

The GPRs together with I/O registers and SRAM are called ________.

Data memory

24
New cards

The I/O registers in the AVR are_______-bit

8

25
New cards

The data memory space in AVR is divided into _______ parts

3

26
New cards

The data memory space in the AVR can have a maximum of _____ bytes

64K

27
New cards

The standard I/O memory space in AVR is _______ bytes.

64

28
New cards

Write an instruction to copy the value 0x34 into the R29 register.

LDI R29, 0x34

29
New cards

Write an instruction to add the values 0x16 and 0xCD. Place the result in the R19 register.

LDI R18, 0x16

30
New cards

LDI R19, 0xCD

31
New cards

ADD R19, R18

32
New cards

True or False: No value can be moved directly into the GPRs.

False

33
New cards

What is the largest hex value that can be moved into an 8-bit register? What is the decimal equivalent of that hex value?

FF hex and 255 in decimal.

34
New cards

The vast majority of registers in the AVR are __ bit

8

35
New cards

True or False: No value can be loaded directly into internal SRAM.

True

36
New cards

Write instructions to load value 0x95 into the SPL I/O register.

LDI R20, 0x95

37
New cards

OUT SPL, R20

38
New cards

Write instructions to add 2 to the contents of R18.

LDI R19, 2

39
New cards

ADD R18, R19

40
New cards

Write instructions to add the values 0x16 and 0xCD. Place the results in location 0x400 of the data memory.

LDI R20, 0x16

41
New cards

LDI R21, 0xCD

42
New cards

ADD R20, R21

43
New cards

What is the largest hex value that can be moved onto a location in the data memory? What is the decimal equivalent of the hex value?

FF in hex or 255 in decimal

44
New cards

"ADD R16, R3" puts the result in _____

R16

45
New cards

What does "OUT OCR0A, R23" do?

It copies the contents of R23 into the OCR0A I/O register.

46
New cards

What is wrong with "STS OCR0A, R23"? What does it do?

The OCR0A presents the I/O address of the OCR0A register($27); but we should use the data memory address while using the STS instruction. The instruction copies the contents of R23 into the location with the data memory address of $27 (the DDRC I/O register).

47
New cards

The flag register in the AVR is called __________________.

SREG

48
New cards

What is the size of the flag register in the AVR

8 bits

49
New cards

FIND the C,Z, and H flag bits for the following code:

50
New cards
51
New cards

LDI R20, 0x9F

52
New cards

LDI R21, 0X61

53
New cards

ADD R20, R21

(C = 1), (H = 1), and (Z = 1)

54
New cards

FIND the C, Z, and H flag bits for the following code:

55
New cards

LDI R17, 0x82

56
New cards

LDI R23, 0x22

57
New cards

ADD R17, R23

(C = 0), (H = 0), and (Z = 0)

58
New cards

FIND the C, Z, and H flag bits for the following code:

59
New cards

LDI R20, 0x67

60
New cards

LDI R21, 0x99

61
New cards

ADD R20, R21

(C = 1), (H = 1), and (Z = 1)

62
New cards

What is the purpose of pseudo-instructions?

The real work is performed by instructions such as LDI and ADD. Pseudo-instructions, also called assembly directives, instruct the assembler in doing its job.

63
New cards

____ are translated by the assembler into machine code, whereas ______ are not

The instruction mnemonics, pseudo-instructions

64
New cards

True or False: Assembly language is a high level language.

False

65
New cards

Which of the following produces opcode? list all that do

66
New cards

(A) LDI R16,0x25

67
New cards

(B) ADD R23, R19

68
New cards

(C) .ORG 0x500

69
New cards

(D) JMP HERE

All except (C)

70
New cards

Pseudo-instructions are also called ________

Assembler directives

71
New cards

True or False: Assembler directives are not used by the CPU itself. They are simply a guide to the Assembler.

True

72
New cards

Which one of these is an assembler directive?

73
New cards

(A) LDI R16,0x25

74
New cards

(B) ADD R23, R19

75
New cards

(C) .ORG 0x500

76
New cards

(D) JMP HERE

(C)

77
New cards

Give two ways for hex data representation in the AVR assembler.

.EQU DATA1 = 0x9F

78
New cards

.EQU DATA2 = $9F

79
New cards

Show how to represent decimal 99 in formats: (A) hex, (B) decimal, and (C) binary in the AVR assembler.

.EQU DATA1 = 0x99

80
New cards

.EQU DATA2 =99

81
New cards

.EQU DATA3 = 0b10011001

82
New cards

What is the advantage in using the .EQU directive to define a constant value?

If the value is to be changed later, it can be done once in one place instead of at every occurrence.

83
New cards

Show the hex number value used by the following directives:

84
New cards

(A) .EQU ASC_DATA = '4'

85
New cards

(B) .EQU MY_DATA=0B0001111

(A) $34 (B) $1F

86
New cards

Give the value in R22 for the following:

87
New cards

.EQU MYCOUNT = 15

88
New cards

LDI R22, MYCOUNT

15 in decimal (0x0F in hex)

89
New cards

Give the value in data memory location 0x200 for the following:

90
New cards

.EQU MYCOUNT = 0x95

91
New cards

.EQU MYREG = 0x200

92
New cards

LDI R22, MYCOUNT

93
New cards

STS MYREG, R22

value of location 0x200 = (0x95)

94
New cards

Give the value in data memory location 0x63 for the following:

95
New cards
96
New cards

.EQU MYDATA = 12

97
New cards

.EQU MYREG = 0x63

98
New cards

.EQU FACTOR = 0x10

99
New cards
100
New cards

LDI R19, MYDATA