Final Exam Data Sheet
Final Exam Data Sheet
EECR (EEPROM Control Register) - - EEPM1 EEPM0 EERIE EEMPE EEPE EERE
EERE (EEPROM Read Enable): 1 = Read from EEPROM EERIE (EEPROM Ready Interrupt Enable)
EEPE (EEPROM Program Enable): 1 = Write to EEPROM, SET EEMPE bit first EEMPM1:0 (EEPROM Programming Mode Bits): 0 0 = Erase and Write
EEMPE (EEPROM Master Program Enable): 1 = Master Write to EEPROM, 0 1 = Erase Only 1 0 = Write Only 1 1 = (Reserved)
Page 1 of 4
SREG (Status Register) I T H S V N Z C
Global Interrupt Bit Copy Overflow Negative
Description Half Carry Sign Flag Zero Flag Carry Flag
Enable Storage Flag Flag
PCMSK2 (Pin Change Mask Register 2) PCINT 23 PCINT 22 PCINT 21 PCINT 20 PCINT 19 PCINT 18 PCINT 17 PCINT 16
Port D PD7 PD6 PD5 PD4 PD3 PD2 PD1 PD0
Arduino Pins 7 6 5 4 3 2 1 0
PCMSK1 (Pin Change Mask Register 1) - PCINT 14 PCINT 13 PCINT 12 PCINT 11 PCINT 10 PCINT 9 PCINT 8
Port C - PC6 PC5 PC4 PC3 PC2 PC1 PC0
Arduino Pins - - A5 A4 A3 A2 A1 A0
PCMSK0 (Pin Change Mask Register 0) PCINT 7 PCINT 6 PCINT 5 PCINT 4 PCINT 3 PCINT 2 PCINT 1 PCINT 8
Port B PB7 PB6 PB5 PB4 PB3 PB2 PB1 PB0
Arduino Pins - - 13 12 11 10 9 8
UCSR0A(USART Control and Status Register A) RXC0 TXC0 UDRE0 FE0 DOR0 UPE0 U2X0 MPCM0
RXC0 (USART Receive Complete): 1 = There is new data in receive buffer DOR0 (Data Over Run): 1 = Data Over Run condition is detected
TXC0 (USART Receive Complete): 1 = data has been transmitted. UPE0 (USART Parity Error): 1 = Received byte had a Parity Error.
UDRE0 (USART Data Register Empty): 1 = transmit buffer is empty. U2X0(Double the USART Transmission Speed): 1 = double baud rate
0 = transmit buffer contains data to be transmitted. MPCM0 (Multi-processor Communication Mode): 1= Enable Multi-processor
FE0 (Frame Error): 1 = There is frame Error Communication.
UCSR0B (USART Control and Status Register B) RXCIE0 TXCIE0 UDRIE0 RXEN0 TXEN0 UCSZ02 RXB80 TXB80
RXCIE0 (RX Complete Interrupt Enable): TXEN0 (Transmitter Enable): 1 = Enables the USART Transmitter
1 = enables interrupt on the RXC0 Flag. UCSZ02 (Character Size): UCSZ02 bit combined with the UCSZ01:0 bits in UCSR0C sets the
TXCIE (TX Complete Interrupt Enable): number of data bits (Character Size) in a frame the Receiver and Transmitter.
1 = enables interrupt on the TXC0 Flag. RXB80 (Receive Data Bit 8): RXB80 is the ninth data bit of the received character when
UDRIE0 (USART Data Register Empty Interrupt Enable): operating with serial frames with nine data bits
Page 2 of 4
1 = enables interrupt on the UDRE0 Flag TXB80 (Transmit Data Bit 8): TXB80 is the ninth data bit in the character to be transmitted
RXE0 (Receiver Enable): 1 = Enables the USART Receiver when operating with serial frames with nine data bits.
UMSEL0
UMSEL01 UPM01 UPM00 USBS0 UCSZ01 UCSZ00 UCPOL0
UCSR0C (USART Control and Status Register C) 0
UMSEL0[1:0] Mode UPM0[1:0] Parity Mode USBS0 (Stop Bit Select): 0 = 1 Stop Bit, 1 = 2 Stop Bits
00 Asynchronous USART 00 Disabled UCSZ0 [1:0] (Character Size): For UCSZ02=1 in UCSR0A
01 Synchronous USART 01 Reserved 0 0 = 5 bit Character Size 0 1 = 6 bit Character Size
10 (Reserved) 10 Enabled, Even Parity 1 0 = 7 bit Character Size 1 1 = 8 bit Character Size
11 Master SPI (MSPIM) 11 Enabled, Odd Parity UCPOL0 (Clock Polarity): This bit is used for synchronous mode only.
ADMUX ( ADC Multiplexer Register ) REFS1 REFS0 ADLAR - MUX3 MUX2 MUX1 MUX0
REFS1 REFS0 Reference Voltage Selection Bits MUX3…0 Pin Select MUX3…0 Pin Select MUX3…0 Pin Select
0 0 VREF = A REF Pin Set externally 0000 ADC0 0101 ADC5 1010 (Reserved)
0 1 VREF = AVCC Pin Same as VCC 0001 ADC1 0110 ADC6 1100 (Reserved)
1 0 Reserved 0010 ADC2 0111 ADC7 1101 (Reserved)
1 1 V REF = Internal 1.1v 0011 ADC3 1000 ADC8 Temp. 1110 1.1 V (VBG)
ADLAR 0 = Right Adjust ADC value, 1 = Left Adjust 0100 ADC4 1001 (Reserved) 1111 0V (GND)
ADCSRA ( ADC Control and Status Register A ) ADEN ADSC ADATE ADIF ADIE ADPS2 ADPS1 ADPS0
ADEN 1 = Enable the ADC, 0 = Disable ADC. ADPS2…0 CLK Division ADPS2…0 CLK Division
ADSC 1 = start conversion process. 000 2 100 16
ADATE 1 = Auto triggering of the ADC is enabled 001 2 101 32
ADIF 1 = ADC has completed its conversion, 0 = busy in conversion 010 4 110 64
ADIE 1 = Enables the ADC conversion complete interrupt. 011 8 111 128
LM35 Temperature Sensor Series Selection Guide LM34 Temperature Sensor Series Selection Guide
Part Temp. Range Accuracy Output Scale Part Temp. Range Accuracy Output Scale
LM35A -55 C to+150 C +1.0 C 10 mV/C LM34A -50 F to +300 F +2.0 F 10 mV/F
LM35 -55 C to +150 C +1.5 C 10 mV/C LM34 -50 F to +300 F +3.0 F 10 mV/F
LM35CA -40 C to +110 C +1.0 C 10 mV/C LM34CA -40 F to +230 F +2.0 F 10 mV/F
LM35C -40 C to +110 C +1.5 C 10 mV/C LM34C -40 F to +230 F +3.0 F 10 mV/F
LM35D 0 C to +100C +2.0 C 10 mV/C LM34D -32 F to +212 F +4.0 F 10 mV/F
SPCR ( SPI Control Register ) SPIE SPE DORD MSTR CPOL CPHA SPR1 SPRO
(Bit 7) SPIE : SPI Interrupt Enable : 1 = enable the SPI interrupt. (Bit 3) CPOL: Clock Polarity : This bit set the base value of clock when it is
(Bit 6) SPE: SPI Enable : 1 = enable the SPI. 0 = disable the SPI. idle. At CPOL = 0 the base value of the clock is zero while at CPOL = 1 the
(Bit 5) DORD : Data Order : 1 = The LSB is transmitted first base value of the clock is one.
0 = The MSB is transmitted first. (Bit 2) CPHA : Clock Phase : CPHA = 0 means sample on the leading (first)
(Bit 4) MSTR : Master/Slave Select : 1 = work in master mode clock edge, while CPHA = 1 means sample on the trailing (second) clock.
0 = work in slave mode. Notice that if the SS pin is configured as an input and (Bit 1) SPR1 : SPI Clock Rate Select 1 (Bit 0) SPRO: SPI Clock Rate Select 0
is driven low while MSTR is 1, MSTR will be cleared, and SPIF will become set. (Bit 1,2) control the SCK rate of the device in master mode. See Table below
SPI2X SPR1 SPRO SCK Frequency SPI2X SPR1 SPRO SCK Frequency
0 0 0 Fosc/4 1 0 0 Fosc/2 (Not recommended)
0 0 1 Fosc/16 1 0 1 Fosc/8
0 1 0 Fosc/64 1 1 0 Fosc/32
0 1 1 Fosc/128 1 1 1 Fosc/64
TWBR ( TWI Bit Rate Register ) TBR7 TBR6 TBR5 TBR4 TBR3 TBR2 TBR1 TBR0
TWSR ( TWI Status Register ) TWS7 TWS6 TWS5 TWS4 TWS3 - TWPS1 TWPS0
(Bit 7… 3) TWS7…3 : TWI Status : These Five Bits show the status of the TWI
control and Bus XTAL
(Bit 1… 0) TWPS1…0 : TWI Prescaler Bits : These bits control the bit rate
frequency=
prescaler
16+ 2×TWBR×4 TWPS
TWCR ( TWI Control Register ) TWINT TWEA TWSTA TWSTO TWWC TWEN - TWIE
(Bit 7) TWINT: TWI Interrupt : This bit is set by hardware when the TWI (Bit 4) TWSTO: TWI STOP condition bit : In master mode, making this
module has finished its current job. If the TWI and general interrupt are bit HIGH causes the TWI to generate a STOP condition. This bit is cleared
enabled, changing TWINT to one will cause the MCU to jump to the TWI by hardware when the STOP condition is transmitted.
interrupt vector. Clearing this flag starts the operation of the TWI. TWINT (Bit 3) TWWC: TWI Write Collision Flag : This bit is set HIGH when we
must be cleared by software. attempt to access the TWI Data Register when TWINT is low. This flag is
(Bit 6) TWEA: TWI Enable Acknowledge : Making this bit HIGH will enable cleared by writing to the TWDR register when TWINT is high.
the generation of ACK when needed in slave or receiver mode. (Bit 2) TWEN: TWI Enable : Making this bit HIGH enables the TWI
(Bit 5) TWSTA: TWI START condition Bit : Making this bit HIGH will module.
generate a START condition if the bus is free; otherwise, the TWI module (Bit 0) TWIE: TWI Interrupt Enable : Making this bit HIGH enables the
waits for the bus to become free and then generates a START condition TWI interrupt if the general interrupt is enabled.
Page 4 of 4