GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Quiz

Embedded software

Tim Baker 58 Fragen Aktualisiert am 22 Sep 2019

Quiz starten

Fragen in diesem Quiz (58)

  1. 1The declaration of a global variable with scope restricted to the file in which it is
    declared is accomplished with the keyword:
    1. Astatic
    2. Bconst
    3. Cautomatic
  2. 2When considering the issue of critical sections, I/O ports are categorized as:
    1. Alocal variables
    2. Bglobal variables
    3. Cvolatile variables
  3. 3void __attribute__ ((interrupt)) LPT_ISR(void)
    {
    LPTMR0_CSR |= LPTMR_CSR_TCF_MASK;
    y += 65;
    }
    void main(void)
    {
    ...
    y -= 1000;
    ..
    }

    An ISR and a main
    program share access to
    global variable y. A
    critical section occurs
    in:
    1. ARTI_ISR and Main
    2. BRTI_ISR only
    3. CMain only
  4. 4The declaration int* const p = &total; can be interpreted as:
    1. Ap is a modifiable pointer that points to a read-only int
    2. Bp is a read-only pointer that points to a modifiable int
    3. C) p is a read-only pointer that points to a read-only int
  5. 5An internal register like FTM0_CNT is defined as volatile because:
    1. Ait is 16-bits wide
    2. Bit needs to be permanently allocated
    3. Cthe software is not allowed to change its value
    4. DNone
  6. 6To store your version-controlled software to a remote Git repository, you would
    use the command:
    1. APull
    2. BFetch
    3. CPush
  7. 7The binary value of an uint8_t variable is
    11000001 2
    . The decimal value is:
    1. A0xC1
    2. B193
    3. C-63
  8. 8Assume PTA5 is an output and the other PORTA bits are inputs.
    C code that sets PTA5 high only if PTA1 is low and PTA2 is high is:
    1. Aif ((GPIOA_PDIR & 0x06) == 0x04)
      GPIOA_PSOR = 0x20;
    2. Bif (((GPIOA_PDIR & 0x02) == 0) && ((GPIOA_PDIR & 0x04) == 1))
      GPIOA_PSOR = 0x20;
    3. Cif (((GPIOA_PDIR | 0x02) == 0) && ((GPIOA_PDIR | 0x04) == 1))
      GPIOA_PCOR = 0x20;
  9. 9The initial value of an unsigned char “x” is
    01111010 2
    . The value of x after
    executing the line of code “x ^= (1 << 5);” is:
    1. A11111010
    2. B01001111
    3. C00111010
    4. D01011010
  10. 10void __attribute__
    ((interrupt))
    LPT_ISR(void)
    {
    LPTMR0_CSR |= 0x80;
    GPIOA_PSOR = 0x01;
    if (GPIOA_PDIR & 0x04)
    GPIOA_PCOR = 0x04;
    GPIOA_PCOR = 0x01;
    }
    void main(void)
    {
    LPT_Init();
    for (;;)
    {
    if (!(GPIOA_PDIR & 0x04))
    GPIOA_PSOR = 0x04;
    GPIOA_PTOR = 0x02;
    }
    }
    LPT_Init() sets up
    the low-power timer
    and sets Port A to
    output. The waveform
    seen at Port A could
    be:
    1. ABild zu Antwort A
    2. BBild zu Antwort B
    3. CBild zu Antwort C

Informationen

Beschreibung
Engineering Quiz am Embedded software, erstellt von Tim Baker am 22/09/2019.
Sprache
English
Aufrufe
20
Verlauf
Erstellt am 22 Sep 2019 · aktualisiert am 22 Sep 2019
Schlagwörter
engineering
Bewertung
Noch keine Bewertungen
Bewerte dieses Quiz
Bewerte dieses Quiz

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck