Summer 2 Task 1 Embedded
Summer 2 Task 1 Embedded
Task 1
1-ALU: It’s a digital circuit that performs arithmetic and bitwise operations on integer binary
numbers. It is responsible for performing arithmetic operations such as addition, subtraction,
multiplication, and division.
2-Status and Control: It’s an eight-bit register that contains the arithmetic status of the ALU, the
reset status, and the bank select bits from the data memory.
3-Program Counter: It’s a 13-bit wide register that’s capable of addressing 8K*14 bit program
memory space. It executes stored commands one by one.
4-Flash Memory Program: It’s used to store programs that are written by the user. These devices
have 8K*14 bits of flash memory that can be electrically erasable.
5-Instruction Register: It holds the instruction being executed by the micro controller.
6-Instruction Decoder: It decodes the instruction held in the instruction register and generates
control signals to execute it.
C) Why is a led connected to RA4 for flashing purpose not working properly?
Because RA4 is an open drain output, unlike the other digital pins in the MC, so, when set at low,
the output is low, but when set at high, the output will be tristated (high impedance). The LED’s
configuration needs to be changed to turn on with an open drain.
D) ATMega328P VS PIC16F877A:
1-Memory Size: The ATMega328P has 32KB of flash memory, 1KB of EEPROM, and 2KB of
SRAM. The PIC16f877A has 14KB of flash memory, 256 bytes of EEPROM, and 368 bytes of SRAM.
2-Power Consumption: The ATMega328P has a lower power consumption than the PIC16f877A. It
has a power consumption of 0.2mA/MHz at 1.8V and 1MHz3. The PIC16f877A has a power
consumption of 5mA/MHz at 5V and 20MHz2
3-Pin Count: The ATMega328P has 28 pins, while the PIC16f877A has 40 pins.
Conclusion: the ATMega328P is a better choice for applications that require low power
consumption and small memory size.
Remote Sensors: Remote sensors require low power consumption to extend battery life.
The ATMega328P is a better choice than the PIC16f877A because it has lower power
consumption and smaller memory size.