ATmega8 (961722), страница 48
Текст из файла (страница 48)
See Table 97 for tWD_FLASH value.Data Polling EEPROMWhen a new byte has been written and is being programmed into EEPROM, reading theaddress location being programmed will give the value 0xFF. At the time the device isready for a new byte, the programmed value will read correctly. This is used to determine when the next byte can be written.
This will not work for the value 0xFF, but theuser should have the following in mind: As a chip-erased device contains 0xFF in alllocations, programming of addresses that are meant to contain 0xFF, can be skipped.This does not apply if the EEPROM is Re-programmed without chip-erasing the device.In this case, data polling cannot be used for the value 0xFF, and the user will have towait at least tWD_EEPROM before programming the next byte. See Table 97 for tWD_EEPROMvalue.Table 97. Minimum Wait Delay Before Writing the Next Flash or EEPROM LocationSymbolMinimum Wait DelaytWD_FUSE4.5 mstWD_FLASH4.5 mstWD_EEPROM9.0 mstWD_ERASE9.0 msFigure 113.
Serial Programming WaveformsSERIAL DATA INPUT(MOSI)MSBLSBSERIAL DATA OUTPUT(MISO)MSBLSBSERIAL CLOCK INPUT(SCK)SAMPLE236ATmega8(L)2486O–AVR–10/04ATmega8(L)Table 98. Serial Programming Instruction SetInstruction FormatInstructionByte 1Byte 2Byte 3Byte4Programming Enable1010 11000101 0011xxxx xxxxxxxx xxxxEnable Serial Programming afterRESET goes low.Chip Erase1010 1100100x xxxxxxxx xxxxxxxx xxxxChip Erase EEPROM and Flash.Read Program Memory0010 H0000000 aaaabbbb bbbboooo ooooRead H (high or low) data o fromProgram memory at word addressa:b.Load Program MemoryPage0100 H0000000 xxxxxxxb bbbbiiii iiiiWrite H (high or low) data i toProgram memory page at wordaddress b.
Data Low byte must beloaded before Data High byte isapplied within the same address.Write Program MemoryPage0100 11000000 aaaabbbx xxxxxxxx xxxxWrite Program memory Page ataddress a:b.Read EEPROM Memory1010 000000xx xxxabbbb bbbboooo ooooRead data o from EEPROMmemory at address a:b.Write EEPROM Memory1100 000000xx xxxabbbb bbbbiiii iiiiWrite data i to EEPROM memoryat address a:b.Read Lock Bits0101 10000000 0000xxxx xxxxxxoo ooooRead Lock Bits. “0” = programmed,“1” = unprogrammed.
See Table85 on page 219 for details.Write Lock Bits1010 1100111x xxxxxxxx xxxx11ii iiiiWrite Lock Bits. Set bits = “0” toprogram Lock Bits. See Table 85on page 219 for details.Read Signature Byte0011 000000xx xxxxxxxx xxbboooo ooooRead Signature Byte o at addressb.Write Fuse Bits1010 11001010 0000xxxx xxxxiiii iiiiSet bits = “0” to program, “1” tounprogram. See Table 88 onpage 221 for details.Write Fuse High Bits1010 11001010 1000xxxx xxxxiiii iiiiSet bits = “0” to program, “1” tounprogram.
See Table 87 onpage 220 for details.Read Fuse Bits0101 00000000 0000xxxx xxxxoooo ooooRead Fuse Bits. “0” = programmed,“1” = unprogrammed. See Table88 on page 221 for details.Read Fuse High Bits0101 10000000 1000xxxx xxxxoooo ooooRead Fuse high bits. “0” = programmed, “1” = unprogrammed.See Table 87 on page 220 fordetails.Read Calibration Byte0011 100000xx xxxx0000 00bboooo ooooRead Calibration ByteNote:Operationa = address high bitsb = address low bitsH = 0 – Low byte, 1 – High byteo = data outi = data inx = don’t care2372486O–AVR–10/04SPI Serial ProgrammingCharacteristics238For characteristics of the SPI module, see “SPI Timing Characteristics” on page 243.ATmega8(L)2486O–AVR–10/04ATmega8(L)Electrical CharacteristicsNote:Typical values contained in this datasheet are based on simulations and characterization of other AVR microcontrollers manufactured on the same process technology.
Min and Max values will be available after the device is characterized.Absolute Maximum Ratings*Operating Temperature.................................. -55°C to +125°C*NOTICE:Storage Temperature ..................................... -65°C to +150°CVoltage on any Pin except RESETwith respect to Ground ................................-0.5V to VCC+0.5VVoltage on RESET with respect to Ground......-0.5V to +13.0VStresses beyond those listed under “AbsoluteMaximum Ratings” may cause permanent damage to the device. This is a stress rating only andfunctional operation of the device at these orother conditions beyond those indicated in theoperational sections of this specification is notimplied. Exposure to absolute maximum ratingconditions for extended periods may affectdevice reliability.Maximum Operating Voltage ............................................ 6.0VDC Current per I/O Pin ...............................................
40.0 mADC Current VCC and GND Pins................................ 200.0 mADC CharacteristicsTA = -40°C to 85°C, VCC = 2.7V to 5.5V (unless otherwise noted)SymbolParameterConditionMinTypMaxUnitsVCC(1)VVILInput Low VoltageExcept XTAL1 pin-0.50.2VIL1Input Low VoltageXTAL1 and RESET pins, Ext. Clock Selected-0.50.1 VCC(1)VVIHInput High VoltageExcept XTAL1 and RESET pins0.6 VCC(2)VCC + 0.5V0.8VCC(2)VCC + 0.5V0.9VCC(2)VCC + 0.5V0.70.5VVVIH1Input High VoltageXTAL1 pin, External Clock SelectedVIH2Input High VoltageRESET pinVOLOutput Low Voltage(3)(Ports A,B,C,D)IOL = 20 mA, VCC = 5VIOL = 10 mA, VCC = 3VVOHOutput High Voltage(4)(Ports A,B,C,D)IOH = -20 mA, VCC = 5VIOH = -10 mA, VCC = 3VIILInput LeakageCurrent I/O PinVcc = 5.5V, pin low(absolute value)1µAIIHInput LeakageCurrent I/O PinVcc = 5.5V, pin high(absolute value)1µARRSTReset Pull-up Resistor3080kΩRpuI/O Pin Pull-up Resistor2050kΩ4.22.2VV2392486O–AVR–10/04TA = -40°C to 85°C, VCC = 2.7V to 5.5V (unless otherwise noted) (Continued)SymbolParameterConditionMinTypMaxUnitsActive 4 MHz, VCC = 3V(ATmega8L)5mAActive 8 MHz, VCC = 5V(ATmega8)15mAIdle 4 MHz, VCC = 3V(ATmega8L)2mAIdle 8 MHz, VCC = 5V(ATmega8)7mAWDT enabled, VCC = 3V28µAWDT disabled, VCC = 3V3µA20mV50nAPower Supply CurrentICCPower-down mode(5)VACIOAnalog ComparatorInput Offset VoltageVCC = 5VVin = VCC/2IACLKAnalog ComparatorInput Leakage CurrentVCC = 5VVin = VCC/2tACIDAnalog ComparatorPropagation DelayVCC = 2.7VVCC = 4.0VNotes:240-50750500ns1.
“Max” means the highest value where the pin is guaranteed to be read as low2. “Min” means the lowest value where the pin is guaranteed to be read as high3. Although each I/O port can sink more than the test conditions (20mA at Vcc = 5V, 10mA at Vcc = 3V) under steady stateconditions (non-transient), the following must be observed:PDIP Package:1] The sum of all IOL, for all ports, should not exceed 400 mA.2] The sum of all IOL, for ports C0 - C5 should not exceed 200 mA.3] The sum of all IOL, for ports B0 - B7, C6, D0 - D7 and XTAL2, should not exceed 100 mA.TQFP and MLF Package:1] The sum of all IOL, for all ports, should not exceed 400 mA.2] The sum of all IOL, for ports C0 - C5, should not exceed 200 mA.3] The sum of all IOL, for ports C6, D0 - D4, should not exceed 300 mA.4] The sum of all IOL, for ports B0 - B7, D5 - D7, should not exceed 300 mA.If IOL exceeds the test condition, VOL may exceed the related specification.
Pins are not guaranteed to sink current greaterthan the listed test condition.4. Although each I/O port can source more than the test conditions (20mA at Vcc = 5V, 10mA at Vcc = 3V) under steady stateconditions (non-transient), the following must be observed:PDIP Package:1] The sum of all IOH, for all ports, should not exceed 400 mA.2] The sum of all IOH, for port C0 - C5, should not exceed 100 mA.3] The sum of all IOH, for ports B0 - B7, C6, D0 - D7 and XTAL2, should not exceed 100 mA.TQFP and MLF Package:1] The sum of all IOH, for all ports, should not exceed 400 mA.2] The sum of all IOH, for ports C0 - C5, should not exceed 200 mA.3] The sum of all IOH, for ports C6, D0 - D4, should not exceed 300 mA.4] The sum of all IOH, for ports B0 - B7, D5 - D7, should not exceed 300 mA.If IOH exceeds the test condition, VOH may exceed the related specification.
Pins are not guaranteed to source currentgreater than the listed test condition.5. Minimum VCC for Power-down is 2.5V.ATmega8(L)2486O–AVR–10/04ATmega8(L)External Clock DriveWaveformsFigure 114. External Clock Drive WaveformsV IH1V IL1External Clock DriveTable 99. External Clock DriveVCC = 2.7V to 5.5VVCC = 4.5V to 5.5VMinMaxMinMaxUnits08016MHzSymbolParameter1/tCLCLOscillator FrequencytCLCLClock Period12562.5nstCHCXHigh Time5025nstCLCXLow Time5025nstCLCHRise Time1.60.5µstCHCLFall Time1.60.5µs∆tCLCLChange in period from oneclock cycle to the next22%Table 100. External RC Oscillator, Typical FrequenciesNotes:R [kΩ](1)C [pF]f(2)3322650 kHz10222.0 MHz1.