DINFO Dipartimento di Ingegneria dell’Informazione Department of Information Engineering 07/06/2016 Eugenio Marino Merlo - Lab. USCND 1 Introduction to Microcontrollers Tutorial: battery discharge monitoring PhD E. Marino Merlo Ultrasound and Non Destructive Testing Laboratory http:// www.uscndlab.dinfo.unifi.it/mdswitch.html
28
Embed
Introduction to Microcontrollers - UniFI · DINFO Dipartimento di Ingegneria dell’Informazione Department of Information Engineering 07/06/2016 Eugenio Marino Merlo - Lab. USCND
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
07062016 Eugenio Marino Merlo - Lab USCND 1
Introduction to MicrocontrollersTutorial battery discharge monitoring
PhD E Marino Merlo
Ultrasound and Non Destructive Testing Laboratoryhttpwwwuscndlabdinfounifiitmdswitchhtml
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
A battery is an energy storage device that uses a chemical reaction to dowork on charge and produce a voltage between its output terminals Abattery is composed of one or more basic elements known as electrolyticcells (or electrochemical cells) and makes use of an oxidation-reductionreaction These cells are enclosed in a container and electricallyinterconnected in an appropriate seriesparallel arrangement to provide therequired operating voltage and current levels
History
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
The lead-acid battery was invented in 1859 by French phisicist Gaston Plantegrave and is oldest type of recheargeable battery An electrochemical battery that uses lead and lead oxide for electrodes and sulfuric acid for the electrolyteLow energy-to-weight ratioLow energy-to-volume ratioLarge power to weigth ratioSpecific energy 33ndash42 WhkgEnergy density 60ndash110 WhL Specific power 180 WkgCycle durability 500ndash800 cycles Nominal cell voltage 20 V
Shallow cycle batteries like the type used as starting batteries in automobiles are designed to supply a large amount of current for a short time and stand mild overcharge without losing electrolyte Unfortunately they cannot tolerate being deeply discharged If they are repeatedly discharged more than 20 percent their life will be very short These batteries are not a good choice for a PV system
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
Microcontroller featuresLow-power Atmelreg AVRreg XMEGAreg 816-bit MicrocontrollerNon volatile program and data memories64K - 128KBytes of in-system self-programmable flash4K - 8KBytes boot section2 KBytes EEPROM4 KB - 8 KBytes internal SRAMEight 16-bit timercountersFour timercounters with 4 output compare or input capture channelsEight USARTs with IrDA support for one USARTFour two-wire interfaces with dual address match (I2C and SMBus compatible)16-bit real time counter (RTC) with separate oscillatorTwo sixteen channel 12-bit 2msps Analog to Digital ConvertersTwo two-channel 12-bit 1msps Digital to Analog ConvertersFour Analog Comparators (ACs) with window compare function and current sources
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
bull External interrupts on all general purpose IO pinsbull Programmable watchdog timer with separate on-chip ultra low powerbull QTouchreg library supportbull Internal and external clock options with PLL and prescalerbull Programmable multilevel interrupt controller bull Executing instructions in a single clock cyclebull 32 general purpose working registers directly connected to the arithmetic logic unit
(ALU)bull Two independent registers to be accessed in a single Instructionbull 78 general purpose IO linesbull 16-bit real-time counter (RTC) bull Eight flexible 16-bit timercounters with compare and PWM channelsbull Two 16-channel 12-bit ADCs with programmable gain
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
A battery is an energy storage device that uses a chemical reaction to dowork on charge and produce a voltage between its output terminals Abattery is composed of one or more basic elements known as electrolyticcells (or electrochemical cells) and makes use of an oxidation-reductionreaction These cells are enclosed in a container and electricallyinterconnected in an appropriate seriesparallel arrangement to provide therequired operating voltage and current levels
History
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
The lead-acid battery was invented in 1859 by French phisicist Gaston Plantegrave and is oldest type of recheargeable battery An electrochemical battery that uses lead and lead oxide for electrodes and sulfuric acid for the electrolyteLow energy-to-weight ratioLow energy-to-volume ratioLarge power to weigth ratioSpecific energy 33ndash42 WhkgEnergy density 60ndash110 WhL Specific power 180 WkgCycle durability 500ndash800 cycles Nominal cell voltage 20 V
Shallow cycle batteries like the type used as starting batteries in automobiles are designed to supply a large amount of current for a short time and stand mild overcharge without losing electrolyte Unfortunately they cannot tolerate being deeply discharged If they are repeatedly discharged more than 20 percent their life will be very short These batteries are not a good choice for a PV system
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
Microcontroller featuresLow-power Atmelreg AVRreg XMEGAreg 816-bit MicrocontrollerNon volatile program and data memories64K - 128KBytes of in-system self-programmable flash4K - 8KBytes boot section2 KBytes EEPROM4 KB - 8 KBytes internal SRAMEight 16-bit timercountersFour timercounters with 4 output compare or input capture channelsEight USARTs with IrDA support for one USARTFour two-wire interfaces with dual address match (I2C and SMBus compatible)16-bit real time counter (RTC) with separate oscillatorTwo sixteen channel 12-bit 2msps Analog to Digital ConvertersTwo two-channel 12-bit 1msps Digital to Analog ConvertersFour Analog Comparators (ACs) with window compare function and current sources
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
bull External interrupts on all general purpose IO pinsbull Programmable watchdog timer with separate on-chip ultra low powerbull QTouchreg library supportbull Internal and external clock options with PLL and prescalerbull Programmable multilevel interrupt controller bull Executing instructions in a single clock cyclebull 32 general purpose working registers directly connected to the arithmetic logic unit
(ALU)bull Two independent registers to be accessed in a single Instructionbull 78 general purpose IO linesbull 16-bit real-time counter (RTC) bull Eight flexible 16-bit timercounters with compare and PWM channelsbull Two 16-channel 12-bit ADCs with programmable gain
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
A battery is an energy storage device that uses a chemical reaction to dowork on charge and produce a voltage between its output terminals Abattery is composed of one or more basic elements known as electrolyticcells (or electrochemical cells) and makes use of an oxidation-reductionreaction These cells are enclosed in a container and electricallyinterconnected in an appropriate seriesparallel arrangement to provide therequired operating voltage and current levels
History
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
The lead-acid battery was invented in 1859 by French phisicist Gaston Plantegrave and is oldest type of recheargeable battery An electrochemical battery that uses lead and lead oxide for electrodes and sulfuric acid for the electrolyteLow energy-to-weight ratioLow energy-to-volume ratioLarge power to weigth ratioSpecific energy 33ndash42 WhkgEnergy density 60ndash110 WhL Specific power 180 WkgCycle durability 500ndash800 cycles Nominal cell voltage 20 V
Shallow cycle batteries like the type used as starting batteries in automobiles are designed to supply a large amount of current for a short time and stand mild overcharge without losing electrolyte Unfortunately they cannot tolerate being deeply discharged If they are repeatedly discharged more than 20 percent their life will be very short These batteries are not a good choice for a PV system
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
Microcontroller featuresLow-power Atmelreg AVRreg XMEGAreg 816-bit MicrocontrollerNon volatile program and data memories64K - 128KBytes of in-system self-programmable flash4K - 8KBytes boot section2 KBytes EEPROM4 KB - 8 KBytes internal SRAMEight 16-bit timercountersFour timercounters with 4 output compare or input capture channelsEight USARTs with IrDA support for one USARTFour two-wire interfaces with dual address match (I2C and SMBus compatible)16-bit real time counter (RTC) with separate oscillatorTwo sixteen channel 12-bit 2msps Analog to Digital ConvertersTwo two-channel 12-bit 1msps Digital to Analog ConvertersFour Analog Comparators (ACs) with window compare function and current sources
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
bull External interrupts on all general purpose IO pinsbull Programmable watchdog timer with separate on-chip ultra low powerbull QTouchreg library supportbull Internal and external clock options with PLL and prescalerbull Programmable multilevel interrupt controller bull Executing instructions in a single clock cyclebull 32 general purpose working registers directly connected to the arithmetic logic unit
(ALU)bull Two independent registers to be accessed in a single Instructionbull 78 general purpose IO linesbull 16-bit real-time counter (RTC) bull Eight flexible 16-bit timercounters with compare and PWM channelsbull Two 16-channel 12-bit ADCs with programmable gain
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
A battery is an energy storage device that uses a chemical reaction to dowork on charge and produce a voltage between its output terminals Abattery is composed of one or more basic elements known as electrolyticcells (or electrochemical cells) and makes use of an oxidation-reductionreaction These cells are enclosed in a container and electricallyinterconnected in an appropriate seriesparallel arrangement to provide therequired operating voltage and current levels
History
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
The lead-acid battery was invented in 1859 by French phisicist Gaston Plantegrave and is oldest type of recheargeable battery An electrochemical battery that uses lead and lead oxide for electrodes and sulfuric acid for the electrolyteLow energy-to-weight ratioLow energy-to-volume ratioLarge power to weigth ratioSpecific energy 33ndash42 WhkgEnergy density 60ndash110 WhL Specific power 180 WkgCycle durability 500ndash800 cycles Nominal cell voltage 20 V
Shallow cycle batteries like the type used as starting batteries in automobiles are designed to supply a large amount of current for a short time and stand mild overcharge without losing electrolyte Unfortunately they cannot tolerate being deeply discharged If they are repeatedly discharged more than 20 percent their life will be very short These batteries are not a good choice for a PV system
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
Microcontroller featuresLow-power Atmelreg AVRreg XMEGAreg 816-bit MicrocontrollerNon volatile program and data memories64K - 128KBytes of in-system self-programmable flash4K - 8KBytes boot section2 KBytes EEPROM4 KB - 8 KBytes internal SRAMEight 16-bit timercountersFour timercounters with 4 output compare or input capture channelsEight USARTs with IrDA support for one USARTFour two-wire interfaces with dual address match (I2C and SMBus compatible)16-bit real time counter (RTC) with separate oscillatorTwo sixteen channel 12-bit 2msps Analog to Digital ConvertersTwo two-channel 12-bit 1msps Digital to Analog ConvertersFour Analog Comparators (ACs) with window compare function and current sources
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
bull External interrupts on all general purpose IO pinsbull Programmable watchdog timer with separate on-chip ultra low powerbull QTouchreg library supportbull Internal and external clock options with PLL and prescalerbull Programmable multilevel interrupt controller bull Executing instructions in a single clock cyclebull 32 general purpose working registers directly connected to the arithmetic logic unit
(ALU)bull Two independent registers to be accessed in a single Instructionbull 78 general purpose IO linesbull 16-bit real-time counter (RTC) bull Eight flexible 16-bit timercounters with compare and PWM channelsbull Two 16-channel 12-bit ADCs with programmable gain
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
A battery is an energy storage device that uses a chemical reaction to dowork on charge and produce a voltage between its output terminals Abattery is composed of one or more basic elements known as electrolyticcells (or electrochemical cells) and makes use of an oxidation-reductionreaction These cells are enclosed in a container and electricallyinterconnected in an appropriate seriesparallel arrangement to provide therequired operating voltage and current levels
History
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
The lead-acid battery was invented in 1859 by French phisicist Gaston Plantegrave and is oldest type of recheargeable battery An electrochemical battery that uses lead and lead oxide for electrodes and sulfuric acid for the electrolyteLow energy-to-weight ratioLow energy-to-volume ratioLarge power to weigth ratioSpecific energy 33ndash42 WhkgEnergy density 60ndash110 WhL Specific power 180 WkgCycle durability 500ndash800 cycles Nominal cell voltage 20 V
Shallow cycle batteries like the type used as starting batteries in automobiles are designed to supply a large amount of current for a short time and stand mild overcharge without losing electrolyte Unfortunately they cannot tolerate being deeply discharged If they are repeatedly discharged more than 20 percent their life will be very short These batteries are not a good choice for a PV system
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
Microcontroller featuresLow-power Atmelreg AVRreg XMEGAreg 816-bit MicrocontrollerNon volatile program and data memories64K - 128KBytes of in-system self-programmable flash4K - 8KBytes boot section2 KBytes EEPROM4 KB - 8 KBytes internal SRAMEight 16-bit timercountersFour timercounters with 4 output compare or input capture channelsEight USARTs with IrDA support for one USARTFour two-wire interfaces with dual address match (I2C and SMBus compatible)16-bit real time counter (RTC) with separate oscillatorTwo sixteen channel 12-bit 2msps Analog to Digital ConvertersTwo two-channel 12-bit 1msps Digital to Analog ConvertersFour Analog Comparators (ACs) with window compare function and current sources
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
bull External interrupts on all general purpose IO pinsbull Programmable watchdog timer with separate on-chip ultra low powerbull QTouchreg library supportbull Internal and external clock options with PLL and prescalerbull Programmable multilevel interrupt controller bull Executing instructions in a single clock cyclebull 32 general purpose working registers directly connected to the arithmetic logic unit
(ALU)bull Two independent registers to be accessed in a single Instructionbull 78 general purpose IO linesbull 16-bit real-time counter (RTC) bull Eight flexible 16-bit timercounters with compare and PWM channelsbull Two 16-channel 12-bit ADCs with programmable gain
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
A battery is an energy storage device that uses a chemical reaction to dowork on charge and produce a voltage between its output terminals Abattery is composed of one or more basic elements known as electrolyticcells (or electrochemical cells) and makes use of an oxidation-reductionreaction These cells are enclosed in a container and electricallyinterconnected in an appropriate seriesparallel arrangement to provide therequired operating voltage and current levels
History
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
The lead-acid battery was invented in 1859 by French phisicist Gaston Plantegrave and is oldest type of recheargeable battery An electrochemical battery that uses lead and lead oxide for electrodes and sulfuric acid for the electrolyteLow energy-to-weight ratioLow energy-to-volume ratioLarge power to weigth ratioSpecific energy 33ndash42 WhkgEnergy density 60ndash110 WhL Specific power 180 WkgCycle durability 500ndash800 cycles Nominal cell voltage 20 V
Shallow cycle batteries like the type used as starting batteries in automobiles are designed to supply a large amount of current for a short time and stand mild overcharge without losing electrolyte Unfortunately they cannot tolerate being deeply discharged If they are repeatedly discharged more than 20 percent their life will be very short These batteries are not a good choice for a PV system
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
Microcontroller featuresLow-power Atmelreg AVRreg XMEGAreg 816-bit MicrocontrollerNon volatile program and data memories64K - 128KBytes of in-system self-programmable flash4K - 8KBytes boot section2 KBytes EEPROM4 KB - 8 KBytes internal SRAMEight 16-bit timercountersFour timercounters with 4 output compare or input capture channelsEight USARTs with IrDA support for one USARTFour two-wire interfaces with dual address match (I2C and SMBus compatible)16-bit real time counter (RTC) with separate oscillatorTwo sixteen channel 12-bit 2msps Analog to Digital ConvertersTwo two-channel 12-bit 1msps Digital to Analog ConvertersFour Analog Comparators (ACs) with window compare function and current sources
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
bull External interrupts on all general purpose IO pinsbull Programmable watchdog timer with separate on-chip ultra low powerbull QTouchreg library supportbull Internal and external clock options with PLL and prescalerbull Programmable multilevel interrupt controller bull Executing instructions in a single clock cyclebull 32 general purpose working registers directly connected to the arithmetic logic unit
(ALU)bull Two independent registers to be accessed in a single Instructionbull 78 general purpose IO linesbull 16-bit real-time counter (RTC) bull Eight flexible 16-bit timercounters with compare and PWM channelsbull Two 16-channel 12-bit ADCs with programmable gain
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
A battery is an energy storage device that uses a chemical reaction to dowork on charge and produce a voltage between its output terminals Abattery is composed of one or more basic elements known as electrolyticcells (or electrochemical cells) and makes use of an oxidation-reductionreaction These cells are enclosed in a container and electricallyinterconnected in an appropriate seriesparallel arrangement to provide therequired operating voltage and current levels
History
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
The lead-acid battery was invented in 1859 by French phisicist Gaston Plantegrave and is oldest type of recheargeable battery An electrochemical battery that uses lead and lead oxide for electrodes and sulfuric acid for the electrolyteLow energy-to-weight ratioLow energy-to-volume ratioLarge power to weigth ratioSpecific energy 33ndash42 WhkgEnergy density 60ndash110 WhL Specific power 180 WkgCycle durability 500ndash800 cycles Nominal cell voltage 20 V
Shallow cycle batteries like the type used as starting batteries in automobiles are designed to supply a large amount of current for a short time and stand mild overcharge without losing electrolyte Unfortunately they cannot tolerate being deeply discharged If they are repeatedly discharged more than 20 percent their life will be very short These batteries are not a good choice for a PV system
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
Microcontroller featuresLow-power Atmelreg AVRreg XMEGAreg 816-bit MicrocontrollerNon volatile program and data memories64K - 128KBytes of in-system self-programmable flash4K - 8KBytes boot section2 KBytes EEPROM4 KB - 8 KBytes internal SRAMEight 16-bit timercountersFour timercounters with 4 output compare or input capture channelsEight USARTs with IrDA support for one USARTFour two-wire interfaces with dual address match (I2C and SMBus compatible)16-bit real time counter (RTC) with separate oscillatorTwo sixteen channel 12-bit 2msps Analog to Digital ConvertersTwo two-channel 12-bit 1msps Digital to Analog ConvertersFour Analog Comparators (ACs) with window compare function and current sources
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
bull External interrupts on all general purpose IO pinsbull Programmable watchdog timer with separate on-chip ultra low powerbull QTouchreg library supportbull Internal and external clock options with PLL and prescalerbull Programmable multilevel interrupt controller bull Executing instructions in a single clock cyclebull 32 general purpose working registers directly connected to the arithmetic logic unit
(ALU)bull Two independent registers to be accessed in a single Instructionbull 78 general purpose IO linesbull 16-bit real-time counter (RTC) bull Eight flexible 16-bit timercounters with compare and PWM channelsbull Two 16-channel 12-bit ADCs with programmable gain
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
A battery is an energy storage device that uses a chemical reaction to dowork on charge and produce a voltage between its output terminals Abattery is composed of one or more basic elements known as electrolyticcells (or electrochemical cells) and makes use of an oxidation-reductionreaction These cells are enclosed in a container and electricallyinterconnected in an appropriate seriesparallel arrangement to provide therequired operating voltage and current levels
History
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
The lead-acid battery was invented in 1859 by French phisicist Gaston Plantegrave and is oldest type of recheargeable battery An electrochemical battery that uses lead and lead oxide for electrodes and sulfuric acid for the electrolyteLow energy-to-weight ratioLow energy-to-volume ratioLarge power to weigth ratioSpecific energy 33ndash42 WhkgEnergy density 60ndash110 WhL Specific power 180 WkgCycle durability 500ndash800 cycles Nominal cell voltage 20 V
Shallow cycle batteries like the type used as starting batteries in automobiles are designed to supply a large amount of current for a short time and stand mild overcharge without losing electrolyte Unfortunately they cannot tolerate being deeply discharged If they are repeatedly discharged more than 20 percent their life will be very short These batteries are not a good choice for a PV system
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
Microcontroller featuresLow-power Atmelreg AVRreg XMEGAreg 816-bit MicrocontrollerNon volatile program and data memories64K - 128KBytes of in-system self-programmable flash4K - 8KBytes boot section2 KBytes EEPROM4 KB - 8 KBytes internal SRAMEight 16-bit timercountersFour timercounters with 4 output compare or input capture channelsEight USARTs with IrDA support for one USARTFour two-wire interfaces with dual address match (I2C and SMBus compatible)16-bit real time counter (RTC) with separate oscillatorTwo sixteen channel 12-bit 2msps Analog to Digital ConvertersTwo two-channel 12-bit 1msps Digital to Analog ConvertersFour Analog Comparators (ACs) with window compare function and current sources
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
bull External interrupts on all general purpose IO pinsbull Programmable watchdog timer with separate on-chip ultra low powerbull QTouchreg library supportbull Internal and external clock options with PLL and prescalerbull Programmable multilevel interrupt controller bull Executing instructions in a single clock cyclebull 32 general purpose working registers directly connected to the arithmetic logic unit
(ALU)bull Two independent registers to be accessed in a single Instructionbull 78 general purpose IO linesbull 16-bit real-time counter (RTC) bull Eight flexible 16-bit timercounters with compare and PWM channelsbull Two 16-channel 12-bit ADCs with programmable gain
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
The lead-acid battery was invented in 1859 by French phisicist Gaston Plantegrave and is oldest type of recheargeable battery An electrochemical battery that uses lead and lead oxide for electrodes and sulfuric acid for the electrolyteLow energy-to-weight ratioLow energy-to-volume ratioLarge power to weigth ratioSpecific energy 33ndash42 WhkgEnergy density 60ndash110 WhL Specific power 180 WkgCycle durability 500ndash800 cycles Nominal cell voltage 20 V
Shallow cycle batteries like the type used as starting batteries in automobiles are designed to supply a large amount of current for a short time and stand mild overcharge without losing electrolyte Unfortunately they cannot tolerate being deeply discharged If they are repeatedly discharged more than 20 percent their life will be very short These batteries are not a good choice for a PV system
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
Microcontroller featuresLow-power Atmelreg AVRreg XMEGAreg 816-bit MicrocontrollerNon volatile program and data memories64K - 128KBytes of in-system self-programmable flash4K - 8KBytes boot section2 KBytes EEPROM4 KB - 8 KBytes internal SRAMEight 16-bit timercountersFour timercounters with 4 output compare or input capture channelsEight USARTs with IrDA support for one USARTFour two-wire interfaces with dual address match (I2C and SMBus compatible)16-bit real time counter (RTC) with separate oscillatorTwo sixteen channel 12-bit 2msps Analog to Digital ConvertersTwo two-channel 12-bit 1msps Digital to Analog ConvertersFour Analog Comparators (ACs) with window compare function and current sources
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
bull External interrupts on all general purpose IO pinsbull Programmable watchdog timer with separate on-chip ultra low powerbull QTouchreg library supportbull Internal and external clock options with PLL and prescalerbull Programmable multilevel interrupt controller bull Executing instructions in a single clock cyclebull 32 general purpose working registers directly connected to the arithmetic logic unit
(ALU)bull Two independent registers to be accessed in a single Instructionbull 78 general purpose IO linesbull 16-bit real-time counter (RTC) bull Eight flexible 16-bit timercounters with compare and PWM channelsbull Two 16-channel 12-bit ADCs with programmable gain
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
The lead-acid battery was invented in 1859 by French phisicist Gaston Plantegrave and is oldest type of recheargeable battery An electrochemical battery that uses lead and lead oxide for electrodes and sulfuric acid for the electrolyteLow energy-to-weight ratioLow energy-to-volume ratioLarge power to weigth ratioSpecific energy 33ndash42 WhkgEnergy density 60ndash110 WhL Specific power 180 WkgCycle durability 500ndash800 cycles Nominal cell voltage 20 V
Shallow cycle batteries like the type used as starting batteries in automobiles are designed to supply a large amount of current for a short time and stand mild overcharge without losing electrolyte Unfortunately they cannot tolerate being deeply discharged If they are repeatedly discharged more than 20 percent their life will be very short These batteries are not a good choice for a PV system
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
Microcontroller featuresLow-power Atmelreg AVRreg XMEGAreg 816-bit MicrocontrollerNon volatile program and data memories64K - 128KBytes of in-system self-programmable flash4K - 8KBytes boot section2 KBytes EEPROM4 KB - 8 KBytes internal SRAMEight 16-bit timercountersFour timercounters with 4 output compare or input capture channelsEight USARTs with IrDA support for one USARTFour two-wire interfaces with dual address match (I2C and SMBus compatible)16-bit real time counter (RTC) with separate oscillatorTwo sixteen channel 12-bit 2msps Analog to Digital ConvertersTwo two-channel 12-bit 1msps Digital to Analog ConvertersFour Analog Comparators (ACs) with window compare function and current sources
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
bull External interrupts on all general purpose IO pinsbull Programmable watchdog timer with separate on-chip ultra low powerbull QTouchreg library supportbull Internal and external clock options with PLL and prescalerbull Programmable multilevel interrupt controller bull Executing instructions in a single clock cyclebull 32 general purpose working registers directly connected to the arithmetic logic unit
(ALU)bull Two independent registers to be accessed in a single Instructionbull 78 general purpose IO linesbull 16-bit real-time counter (RTC) bull Eight flexible 16-bit timercounters with compare and PWM channelsbull Two 16-channel 12-bit ADCs with programmable gain
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
Microcontroller featuresLow-power Atmelreg AVRreg XMEGAreg 816-bit MicrocontrollerNon volatile program and data memories64K - 128KBytes of in-system self-programmable flash4K - 8KBytes boot section2 KBytes EEPROM4 KB - 8 KBytes internal SRAMEight 16-bit timercountersFour timercounters with 4 output compare or input capture channelsEight USARTs with IrDA support for one USARTFour two-wire interfaces with dual address match (I2C and SMBus compatible)16-bit real time counter (RTC) with separate oscillatorTwo sixteen channel 12-bit 2msps Analog to Digital ConvertersTwo two-channel 12-bit 1msps Digital to Analog ConvertersFour Analog Comparators (ACs) with window compare function and current sources
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
bull External interrupts on all general purpose IO pinsbull Programmable watchdog timer with separate on-chip ultra low powerbull QTouchreg library supportbull Internal and external clock options with PLL and prescalerbull Programmable multilevel interrupt controller bull Executing instructions in a single clock cyclebull 32 general purpose working registers directly connected to the arithmetic logic unit
(ALU)bull Two independent registers to be accessed in a single Instructionbull 78 general purpose IO linesbull 16-bit real-time counter (RTC) bull Eight flexible 16-bit timercounters with compare and PWM channelsbull Two 16-channel 12-bit ADCs with programmable gain
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
Microcontroller featuresLow-power Atmelreg AVRreg XMEGAreg 816-bit MicrocontrollerNon volatile program and data memories64K - 128KBytes of in-system self-programmable flash4K - 8KBytes boot section2 KBytes EEPROM4 KB - 8 KBytes internal SRAMEight 16-bit timercountersFour timercounters with 4 output compare or input capture channelsEight USARTs with IrDA support for one USARTFour two-wire interfaces with dual address match (I2C and SMBus compatible)16-bit real time counter (RTC) with separate oscillatorTwo sixteen channel 12-bit 2msps Analog to Digital ConvertersTwo two-channel 12-bit 1msps Digital to Analog ConvertersFour Analog Comparators (ACs) with window compare function and current sources
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
bull External interrupts on all general purpose IO pinsbull Programmable watchdog timer with separate on-chip ultra low powerbull QTouchreg library supportbull Internal and external clock options with PLL and prescalerbull Programmable multilevel interrupt controller bull Executing instructions in a single clock cyclebull 32 general purpose working registers directly connected to the arithmetic logic unit
(ALU)bull Two independent registers to be accessed in a single Instructionbull 78 general purpose IO linesbull 16-bit real-time counter (RTC) bull Eight flexible 16-bit timercounters with compare and PWM channelsbull Two 16-channel 12-bit ADCs with programmable gain
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
Microcontroller featuresLow-power Atmelreg AVRreg XMEGAreg 816-bit MicrocontrollerNon volatile program and data memories64K - 128KBytes of in-system self-programmable flash4K - 8KBytes boot section2 KBytes EEPROM4 KB - 8 KBytes internal SRAMEight 16-bit timercountersFour timercounters with 4 output compare or input capture channelsEight USARTs with IrDA support for one USARTFour two-wire interfaces with dual address match (I2C and SMBus compatible)16-bit real time counter (RTC) with separate oscillatorTwo sixteen channel 12-bit 2msps Analog to Digital ConvertersTwo two-channel 12-bit 1msps Digital to Analog ConvertersFour Analog Comparators (ACs) with window compare function and current sources
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
bull External interrupts on all general purpose IO pinsbull Programmable watchdog timer with separate on-chip ultra low powerbull QTouchreg library supportbull Internal and external clock options with PLL and prescalerbull Programmable multilevel interrupt controller bull Executing instructions in a single clock cyclebull 32 general purpose working registers directly connected to the arithmetic logic unit
(ALU)bull Two independent registers to be accessed in a single Instructionbull 78 general purpose IO linesbull 16-bit real-time counter (RTC) bull Eight flexible 16-bit timercounters with compare and PWM channelsbull Two 16-channel 12-bit ADCs with programmable gain
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
Microcontroller featuresLow-power Atmelreg AVRreg XMEGAreg 816-bit MicrocontrollerNon volatile program and data memories64K - 128KBytes of in-system self-programmable flash4K - 8KBytes boot section2 KBytes EEPROM4 KB - 8 KBytes internal SRAMEight 16-bit timercountersFour timercounters with 4 output compare or input capture channelsEight USARTs with IrDA support for one USARTFour two-wire interfaces with dual address match (I2C and SMBus compatible)16-bit real time counter (RTC) with separate oscillatorTwo sixteen channel 12-bit 2msps Analog to Digital ConvertersTwo two-channel 12-bit 1msps Digital to Analog ConvertersFour Analog Comparators (ACs) with window compare function and current sources
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
bull External interrupts on all general purpose IO pinsbull Programmable watchdog timer with separate on-chip ultra low powerbull QTouchreg library supportbull Internal and external clock options with PLL and prescalerbull Programmable multilevel interrupt controller bull Executing instructions in a single clock cyclebull 32 general purpose working registers directly connected to the arithmetic logic unit
(ALU)bull Two independent registers to be accessed in a single Instructionbull 78 general purpose IO linesbull 16-bit real-time counter (RTC) bull Eight flexible 16-bit timercounters with compare and PWM channelsbull Two 16-channel 12-bit ADCs with programmable gain
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
Microcontroller featuresLow-power Atmelreg AVRreg XMEGAreg 816-bit MicrocontrollerNon volatile program and data memories64K - 128KBytes of in-system self-programmable flash4K - 8KBytes boot section2 KBytes EEPROM4 KB - 8 KBytes internal SRAMEight 16-bit timercountersFour timercounters with 4 output compare or input capture channelsEight USARTs with IrDA support for one USARTFour two-wire interfaces with dual address match (I2C and SMBus compatible)16-bit real time counter (RTC) with separate oscillatorTwo sixteen channel 12-bit 2msps Analog to Digital ConvertersTwo two-channel 12-bit 1msps Digital to Analog ConvertersFour Analog Comparators (ACs) with window compare function and current sources
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
bull External interrupts on all general purpose IO pinsbull Programmable watchdog timer with separate on-chip ultra low powerbull QTouchreg library supportbull Internal and external clock options with PLL and prescalerbull Programmable multilevel interrupt controller bull Executing instructions in a single clock cyclebull 32 general purpose working registers directly connected to the arithmetic logic unit
(ALU)bull Two independent registers to be accessed in a single Instructionbull 78 general purpose IO linesbull 16-bit real-time counter (RTC) bull Eight flexible 16-bit timercounters with compare and PWM channelsbull Two 16-channel 12-bit ADCs with programmable gain
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
Microcontroller featuresLow-power Atmelreg AVRreg XMEGAreg 816-bit MicrocontrollerNon volatile program and data memories64K - 128KBytes of in-system self-programmable flash4K - 8KBytes boot section2 KBytes EEPROM4 KB - 8 KBytes internal SRAMEight 16-bit timercountersFour timercounters with 4 output compare or input capture channelsEight USARTs with IrDA support for one USARTFour two-wire interfaces with dual address match (I2C and SMBus compatible)16-bit real time counter (RTC) with separate oscillatorTwo sixteen channel 12-bit 2msps Analog to Digital ConvertersTwo two-channel 12-bit 1msps Digital to Analog ConvertersFour Analog Comparators (ACs) with window compare function and current sources
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
bull External interrupts on all general purpose IO pinsbull Programmable watchdog timer with separate on-chip ultra low powerbull QTouchreg library supportbull Internal and external clock options with PLL and prescalerbull Programmable multilevel interrupt controller bull Executing instructions in a single clock cyclebull 32 general purpose working registers directly connected to the arithmetic logic unit
(ALU)bull Two independent registers to be accessed in a single Instructionbull 78 general purpose IO linesbull 16-bit real-time counter (RTC) bull Eight flexible 16-bit timercounters with compare and PWM channelsbull Two 16-channel 12-bit ADCs with programmable gain
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
Microcontroller featuresLow-power Atmelreg AVRreg XMEGAreg 816-bit MicrocontrollerNon volatile program and data memories64K - 128KBytes of in-system self-programmable flash4K - 8KBytes boot section2 KBytes EEPROM4 KB - 8 KBytes internal SRAMEight 16-bit timercountersFour timercounters with 4 output compare or input capture channelsEight USARTs with IrDA support for one USARTFour two-wire interfaces with dual address match (I2C and SMBus compatible)16-bit real time counter (RTC) with separate oscillatorTwo sixteen channel 12-bit 2msps Analog to Digital ConvertersTwo two-channel 12-bit 1msps Digital to Analog ConvertersFour Analog Comparators (ACs) with window compare function and current sources
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
bull External interrupts on all general purpose IO pinsbull Programmable watchdog timer with separate on-chip ultra low powerbull QTouchreg library supportbull Internal and external clock options with PLL and prescalerbull Programmable multilevel interrupt controller bull Executing instructions in a single clock cyclebull 32 general purpose working registers directly connected to the arithmetic logic unit
(ALU)bull Two independent registers to be accessed in a single Instructionbull 78 general purpose IO linesbull 16-bit real-time counter (RTC) bull Eight flexible 16-bit timercounters with compare and PWM channelsbull Two 16-channel 12-bit ADCs with programmable gain
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
Microcontroller featuresLow-power Atmelreg AVRreg XMEGAreg 816-bit MicrocontrollerNon volatile program and data memories64K - 128KBytes of in-system self-programmable flash4K - 8KBytes boot section2 KBytes EEPROM4 KB - 8 KBytes internal SRAMEight 16-bit timercountersFour timercounters with 4 output compare or input capture channelsEight USARTs with IrDA support for one USARTFour two-wire interfaces with dual address match (I2C and SMBus compatible)16-bit real time counter (RTC) with separate oscillatorTwo sixteen channel 12-bit 2msps Analog to Digital ConvertersTwo two-channel 12-bit 1msps Digital to Analog ConvertersFour Analog Comparators (ACs) with window compare function and current sources
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
bull External interrupts on all general purpose IO pinsbull Programmable watchdog timer with separate on-chip ultra low powerbull QTouchreg library supportbull Internal and external clock options with PLL and prescalerbull Programmable multilevel interrupt controller bull Executing instructions in a single clock cyclebull 32 general purpose working registers directly connected to the arithmetic logic unit
(ALU)bull Two independent registers to be accessed in a single Instructionbull 78 general purpose IO linesbull 16-bit real-time counter (RTC) bull Eight flexible 16-bit timercounters with compare and PWM channelsbull Two 16-channel 12-bit ADCs with programmable gain
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
Microcontroller featuresLow-power Atmelreg AVRreg XMEGAreg 816-bit MicrocontrollerNon volatile program and data memories64K - 128KBytes of in-system self-programmable flash4K - 8KBytes boot section2 KBytes EEPROM4 KB - 8 KBytes internal SRAMEight 16-bit timercountersFour timercounters with 4 output compare or input capture channelsEight USARTs with IrDA support for one USARTFour two-wire interfaces with dual address match (I2C and SMBus compatible)16-bit real time counter (RTC) with separate oscillatorTwo sixteen channel 12-bit 2msps Analog to Digital ConvertersTwo two-channel 12-bit 1msps Digital to Analog ConvertersFour Analog Comparators (ACs) with window compare function and current sources
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
bull External interrupts on all general purpose IO pinsbull Programmable watchdog timer with separate on-chip ultra low powerbull QTouchreg library supportbull Internal and external clock options with PLL and prescalerbull Programmable multilevel interrupt controller bull Executing instructions in a single clock cyclebull 32 general purpose working registers directly connected to the arithmetic logic unit
(ALU)bull Two independent registers to be accessed in a single Instructionbull 78 general purpose IO linesbull 16-bit real-time counter (RTC) bull Eight flexible 16-bit timercounters with compare and PWM channelsbull Two 16-channel 12-bit ADCs with programmable gain
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
Microcontroller featuresLow-power Atmelreg AVRreg XMEGAreg 816-bit MicrocontrollerNon volatile program and data memories64K - 128KBytes of in-system self-programmable flash4K - 8KBytes boot section2 KBytes EEPROM4 KB - 8 KBytes internal SRAMEight 16-bit timercountersFour timercounters with 4 output compare or input capture channelsEight USARTs with IrDA support for one USARTFour two-wire interfaces with dual address match (I2C and SMBus compatible)16-bit real time counter (RTC) with separate oscillatorTwo sixteen channel 12-bit 2msps Analog to Digital ConvertersTwo two-channel 12-bit 1msps Digital to Analog ConvertersFour Analog Comparators (ACs) with window compare function and current sources
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
bull External interrupts on all general purpose IO pinsbull Programmable watchdog timer with separate on-chip ultra low powerbull QTouchreg library supportbull Internal and external clock options with PLL and prescalerbull Programmable multilevel interrupt controller bull Executing instructions in a single clock cyclebull 32 general purpose working registers directly connected to the arithmetic logic unit
(ALU)bull Two independent registers to be accessed in a single Instructionbull 78 general purpose IO linesbull 16-bit real-time counter (RTC) bull Eight flexible 16-bit timercounters with compare and PWM channelsbull Two 16-channel 12-bit ADCs with programmable gain
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
Microcontroller featuresLow-power Atmelreg AVRreg XMEGAreg 816-bit MicrocontrollerNon volatile program and data memories64K - 128KBytes of in-system self-programmable flash4K - 8KBytes boot section2 KBytes EEPROM4 KB - 8 KBytes internal SRAMEight 16-bit timercountersFour timercounters with 4 output compare or input capture channelsEight USARTs with IrDA support for one USARTFour two-wire interfaces with dual address match (I2C and SMBus compatible)16-bit real time counter (RTC) with separate oscillatorTwo sixteen channel 12-bit 2msps Analog to Digital ConvertersTwo two-channel 12-bit 1msps Digital to Analog ConvertersFour Analog Comparators (ACs) with window compare function and current sources
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
bull External interrupts on all general purpose IO pinsbull Programmable watchdog timer with separate on-chip ultra low powerbull QTouchreg library supportbull Internal and external clock options with PLL and prescalerbull Programmable multilevel interrupt controller bull Executing instructions in a single clock cyclebull 32 general purpose working registers directly connected to the arithmetic logic unit
(ALU)bull Two independent registers to be accessed in a single Instructionbull 78 general purpose IO linesbull 16-bit real-time counter (RTC) bull Eight flexible 16-bit timercounters with compare and PWM channelsbull Two 16-channel 12-bit ADCs with programmable gain
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
Microcontroller featuresLow-power Atmelreg AVRreg XMEGAreg 816-bit MicrocontrollerNon volatile program and data memories64K - 128KBytes of in-system self-programmable flash4K - 8KBytes boot section2 KBytes EEPROM4 KB - 8 KBytes internal SRAMEight 16-bit timercountersFour timercounters with 4 output compare or input capture channelsEight USARTs with IrDA support for one USARTFour two-wire interfaces with dual address match (I2C and SMBus compatible)16-bit real time counter (RTC) with separate oscillatorTwo sixteen channel 12-bit 2msps Analog to Digital ConvertersTwo two-channel 12-bit 1msps Digital to Analog ConvertersFour Analog Comparators (ACs) with window compare function and current sources
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
bull External interrupts on all general purpose IO pinsbull Programmable watchdog timer with separate on-chip ultra low powerbull QTouchreg library supportbull Internal and external clock options with PLL and prescalerbull Programmable multilevel interrupt controller bull Executing instructions in a single clock cyclebull 32 general purpose working registers directly connected to the arithmetic logic unit
(ALU)bull Two independent registers to be accessed in a single Instructionbull 78 general purpose IO linesbull 16-bit real-time counter (RTC) bull Eight flexible 16-bit timercounters with compare and PWM channelsbull Two 16-channel 12-bit ADCs with programmable gain
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering
bull External interrupts on all general purpose IO pinsbull Programmable watchdog timer with separate on-chip ultra low powerbull QTouchreg library supportbull Internal and external clock options with PLL and prescalerbull Programmable multilevel interrupt controller bull Executing instructions in a single clock cyclebull 32 general purpose working registers directly connected to the arithmetic logic unit
(ALU)bull Two independent registers to be accessed in a single Instructionbull 78 general purpose IO linesbull 16-bit real-time counter (RTC) bull Eight flexible 16-bit timercounters with compare and PWM channelsbull Two 16-channel 12-bit ADCs with programmable gain
DINFODipartimento di Ingegneria dellrsquoInformazione Department of Information Engineering