Based in the attached code, which Morse letter does letter(); produce? What word does the Morse code spell out?

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter8: Advanced Method Concepts
Section: Chapter Questions
Problem 7RQ
icon
Related questions
Question

Based in the attached code, which Morse letter does letter(); produce? What word does the Morse code spell out?

#define F_CPU 3200000UL
#include <avr/io.h>
#include <util/delay.h>
#define woah 175
void thing (void)
{
PORTC_OUT = 0b09999999;
_delay_ms (woah);
PORTC_OUT = 0b00000001;
_delay_ms (woah);
void other thing (void)
PORTC_OUT = 0b99999990;
_delay_ms (3*woah);
PORTC_OUT = 0b09090001;
_delay_ms (woah);
}
void letter (void)
{
thing();
other_thing();
other_thing();
}
thing();
_delay_ms (2*woah);
void other_letter (void)
{
thing();
thing();
other_thing();
_delay_ms (2*woah);
void setup (void)
}
int main (void)
{
// setup microcontroller
PORTA_DIR= 0b11111111; // set up all of port A as outputs
PORTA_OUT= 0b11000000; // this enables the six individual LEDS
PORTC_DIR=0b00000001; // this makes PCO an output (controls Q5))|
setup();
while (1)
{
other_letter();
letter();
_delay_ms (4*woah);
Code 3
}
return (0);
Highlights and Notes
Transcribed Image Text:#define F_CPU 3200000UL #include <avr/io.h> #include <util/delay.h> #define woah 175 void thing (void) { PORTC_OUT = 0b09999999; _delay_ms (woah); PORTC_OUT = 0b00000001; _delay_ms (woah); void other thing (void) PORTC_OUT = 0b99999990; _delay_ms (3*woah); PORTC_OUT = 0b09090001; _delay_ms (woah); } void letter (void) { thing(); other_thing(); other_thing(); } thing(); _delay_ms (2*woah); void other_letter (void) { thing(); thing(); other_thing(); _delay_ms (2*woah); void setup (void) } int main (void) { // setup microcontroller PORTA_DIR= 0b11111111; // set up all of port A as outputs PORTA_OUT= 0b11000000; // this enables the six individual LEDS PORTC_DIR=0b00000001; // this makes PCO an output (controls Q5))| setup(); while (1) { other_letter(); letter(); _delay_ms (4*woah); Code 3 } return (0); Highlights and Notes
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Counting Problems
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning