Question

Given porta is configured as all inputs and portb as all outputs while ‘count’ is a...

  1. Given porta is configured as all inputs and portb as all outputs while ‘count’ is a variable of type unsigned char, draw a flowchart that describes the design of the following C code listing;

if (porta.0)

{

            count++;

portb = count;

}

else

{

            if (count != 0)

                        count = count-1;

            portb = count;

            }

delay_ms(200);

            portb = 0x00;

delay_ms(200);

0 0
Add a comment Improve this question Transcribed image text
Know the answer?
Add Answer to:
Given porta is configured as all inputs and portb as all outputs while ‘count’ is a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Given porta is configured as all inputs. Explain the purpose of the following line of code...

    Given porta is configured as all inputs. Explain the purpose of the following line of code and give one alternative way of writing this line of code. while(!porta);

  • Given the following code and keypad layout, what will the function GetKey() return when it is...

    Given the following code and keypad layout, what will the function GetKey() return when it is run while keys 2, 3, 7, B, E, and F are pressed? DDRH = 0x0F; RDRH = 0x00; PERH = 0x00; PIEH = 0x00; PTH = 0x0F; unsigned char GetKey(void) { unsigned char KeyMask[16] = { 0xEE, 0xDE, 0xBE, 0x7E, 0XED, 0xDD, 0xBD, 0x7D, 0xEB, 0xDB, 0xBB, 0x7B, 0xE7, 0xD7, 0xB7, 0x77 }; int i; char Key; for (Key=0, i=0; i<16; i++) { PTH...

  • 1) The inputs and outputs of the problem are determined in which of the following steps...

    1) The inputs and outputs of the problem are determined in which of the following steps in program development? a) Understand the problem b) Plan and design the logic c) Develop the logical solution d) Desk-check the solution 2)  When defining a problem, the _____ in a problem description can help you determine the processing steps a) verbs b) nouns c) adjectives d) All of the above 3) What symbol is used for both input and output in a flowchart? a)...

  • 3) (30 points) Given three 8-bit unsigned inputs A, B, C, design a circuit that outputs...

    3) (30 points) Given three 8-bit unsigned inputs A, B, C, design a circuit that outputs 1 if the smallest absolute distance between any pair of values is less than 15 or greater than 50. Note: your circuit must work for any 8-bit unsigned numbers given in A, B, C. 18 18 18 - Assume that you have the following Datapath components available (unsigned only) - decoders, encoders, muxes, parallel load registers, adders, A B C subtractors, magnitude comparators, array...

  • C++ Programming - Design Process I need to create a flow chart based on the program...

    C++ Programming - Design Process I need to create a flow chart based on the program I have created. I am very inexperienced with creating this design and your help will be much appreciated. My program takes a string of random letters and puts them them order. Our teacher gave us specific functions to use. Here is the code: //list of all the header files #include <iomanip> #include <iostream> #include <algorithm> #include <string> using namespace std; //Here are the Function...

  • Image proccessing in PROGRAMING C NO MAIN FUNCTION NEEDED! Color-Filter an image: 1. All pixels in...

    Image proccessing in PROGRAMING C NO MAIN FUNCTION NEEDED! Color-Filter an image: 1. All pixels in the picture with color in the chosen range will be replaced with new color. The following shows the pseudo code for the color filter. if (R in the range of [target_r - threshold, target_r + threshold]) and (G in the range of [target_g - threshold, target_g + threshold]) and (B in the range of [target_b - threshold, target_b + threshold]) R = replace_r ;...

  • Given the following pseudo-code, please show what the outputs will be at LINE A, B, C...

    Given the following pseudo-code, please show what the outputs will be at LINE A, B, C and D. please put down “inconclusive” if you think the CPU process scheduling could potentially result in multiple values for integer i. You will receive partial credit if you draw the process tree. int i = 0; int main(){                         if (fork() == 0) {                         i++;                         if (fork() == 0){                                     if (fork() == 0){                                                 i++;                                                 print value...

  • Question 1: Pointers You are given the following C code and memory diagram. The “contents” column...

    Question 1: Pointers You are given the following C code and memory diagram. The “contents” column of the memory diagram shows the value of the variable. Update the “contents” column of the memory diagram for each assignment in main(). long *pt; long data;    long buffer[4]; void main(void){   pt = &buffer[1];   *pt = 1234;   data = *pt; } address      contents   variable 0x20000000 0x00000000    pt 0x20000004 0x00000000    data 0x20000008 0x00000000    buffer[0] 0x2000000C 0x00000000    buffer[1] 0x20000010 0x00000000    buffer[2] 0x20000014 0x00000000    buffer[3]...

  • Given the following function: int fun1(int count){ int Num ; for (i = 0; i <...

    Given the following function: int fun1(int count){ int Num ; for (i = 0; i < count; ++i) { cin >> Value; if (i == 0) Num = Value; else if (Value > Num) Num = Value; } return Num ; } What is the output of the following C++ code segment if the following list is entered? (Input list:  5 -15 -90 -2 -60 -30) int Num = 0 , Value, numValues; cin >> numValues; if (numValues > 0) cout...

  • all witworDFFs, FFI and FFo, two 4xI multiplexers, four 2-bit registers (Ro, RI, R2, and R3; all I with p arallel outputs) and no additional logic gates, design a circuit to support the following...

    all witworDFFs, FFI and FFo, two 4xI multiplexers, four 2-bit registers (Ro, RI, R2, and R3; all I with p arallel outputs) and no additional logic gates, design a circuit to support the following operations based on 2-bit inputs M1 and MO M1 MO values Operation (at the rising edge of the clock) RO FF1 FFO (bits of RO stored in FF1&FFO IFF1 FFO (bits of R1 stored in FF1&FFO R2 FF1 FFO (bits of R2 stored in FFI &FFO...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT