Revision Lecture Flashcards
How do you create binary numbers?
0b
0B
B
How do you create Hexadecimal numbers?
0x
0X
For the DDRx, what is an input and what is an output?
0 = Input
1 = Output
How can I make all pins on port A into input pins?
DDRA = 0b00000000
How can I make the 4 lower bits of port B an output and the 4 higher bits into inputs?
DDRB = 0b00001111
DDRA = 0x00; //Set port A as input x = PINA;
What does the second line do?
//Read contents of port A
What can PORTx - Port x Data Register do?
- Output data
- Activate / Deactive Pull Up Resistors
How can I output 0xFF on Port B?
DDRB = 0b11111111; //Set all pins of port B as outputs PORTB = 0xFF; //Write data on port
How can I output data in variable x on port A?
DDRA = 0xFF; //Make port A an output PORTA = x; //Output variable on port
What is Aliasing?
Two or more signals have the same sampled representation
What is the ADC resolution of an analog signal with a maximum value of 3.3V with a 10-bit ADC?
2^10 = 1024
3.3/1024 = 3.22mV
What is the ADC frequency formula?
Frequency of CPU / Prescaler value
What are the available ADC Prescaler Values?
2, 4, 8, 16, 32, 64, 128
If I have a CPU frequency of 16MHz and use a prescaler of 64, what is the effective frequency?
16MHz / 64 = 250kHz
What is the global interrupt bit?
sei()
cli()