Programação Flashcards

1
Q

Para limpar bits…

A

AND bit-a-bit.

P1OUT &= ~(BIT1 + BIT2 + … );

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Como inverter um bit de um registrador

A

Utilizando XOR bit-a-bit;

P1OUT ^= BIT1;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Para setar bits…

A

OR Bit-a-bit:

P1OUT |= BIT 1 + BIT 2 + … BIT 7;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Como ler bits em um registrador?

A

Operação AND bit-a-bit.

P1IN & BIT3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Variáveis de tamanho 8 bits

A

char, signed char (máximo 127)

SOMENTE VALORES POSITIVOS: unsigned char (máximo 255)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Variáveis de 16 bits

A

short, int (máximo 32764)

SOMENTE VALORES POSITIVOS: unsigned short, unsigned int (max 65535)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Variáveis de 32 bits

A

long, float, double. (max [2^32])

SOMENTE VALORES POSITIVOS: unsigned long (max 2^32)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Cabeçalho de uma RTI

A
#pragma vector = PORT1_VECTOR
\_\_interrupt void nomefuncao(void){

}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Configuração de uma função comum;

A

Protótipo: void nomefuncao(void);
No main: nomefuncao();

void nomefuncao(void) {

}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly