Port A is used to control 8 LEDs each one indicates the presence of a correspond
ID: 3863589 • Letter: P
Question
Port A is used to control 8 LEDs each one indicates the presence of a corresponding message. Port B connects to 8 switches which are used to choose the message to hear. Port C connects to 8 other switches which are used to erase the corresponding messages. If a new message exists, the corresponding LED blinks at a frequency of 10 Hz and a corresponding bit in the unsigned 8 hits variable "status" is set to 1. If your grandmother pushes the corresponding switch to listen to the message, the LED stops blinking and is illuminated continuously afterwards till she pushes the other switch to erase the message. When there is no message, the LED is off and the corresponding bit in status is 0. The controller runs at a frequency of 4 MHz. All the switches are read by the microcontroller as 1 when they are pushed and as 0 when they are not pushed. Further, assume that, the LEDs are lit when the corresponding pin of Port A outputs 1 and are turned off when the pin outputs 0. (Check the course notes to see how switches and LEDs are connected.) Write the necessary C code to choose the crystal frequency and configure the three ports. Assume that the code uint8_t status; status = get_status (); allows you to get the status while the function set_status (unit 8_t number); allows you to set the status to any uint8_t value you give. Add to your previous code a piece of C code to make the LED blink if the corresponding bit in status is 1. Change your code to include a variable "heard" to have a bit set to one when the switch to listen to the corresponding message i pushed then cause the corresponding LED to stay on and stop blinking. All this action occurs if the corresponding bit of status is set, i.e. if there is originally a message. Update your code to turn the LED off and clear the corresponding bit of status when the switch to erase the message is pushed.Explanation / Answer
The AVR architecture was conceived by two students at the Norwegian Institute of Technology (NTH),[1] Alf-Egil Bogen[2] and Vegard Wollan.[3]
The original AVR MCU was developed at a local ASIC house in Trondheim, Norway, called Nordic VLSI at the time, now Nordic Semiconductor, where Bogen and Wollan were working as students.[citation needed] It was known as a RISC (Micro RISC)[citation needed] and was available as silicon IP/building block from Nordic VLSI.[citation needed] When the technology was sold to Atmel from Nordic VLSI,[citation needed] the internal architecture was further developed by Bogen and Wollan at Atmel Norway, a subsidiary of Atmel. The designers worked closely with compiler writers at IAR Systems to ensure that the AVR instruction set provided efficient compilation of high-level languages.[4]
Atmel says that the name AVR is not an acronym and does not stand for anything in particular. The creators of the AVR give no definitive answer as to what the term "AVR" stands for.[3] However, it is commonly accepted that AVR stands for Alf and Vegard's RISC processor.[5] Note that the use of "AVR" in this article generally refers to the 8-bit RISC line of Atmel AVR Microcontrollers.
Among the first of the AVR line was the AT90S8515, which in a 40-pin DIP package has the same pinout as an 8051 microcontroller, including the external multiplexed address and data bus. The polarity of the RESET line was opposite (8051's having an active-high RESET, while the AVR has an active-low RESET), but other than that the pinout was identical.
The AVR 8-bit microcontroller architecture was introduced in 1997. By 2003, Atmel had shipped 500 million AVR flash microcontrollers.[6] The Arduino platform for simple electronics projects was released in 2005 and featured ATmega8 AVR microcontrollers.