Electronic Components Datasheet Search
  English  ▼

X  

ATtiny48 Datasheet(PDF) 19 Page - ATMEL Corporation

Part # ATtiny48
Description  8-bit Microcontroller with 4/8K Bytes In-System Programmable Flash
PDF  266 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  ATMEL [ATMEL Corporation]
Direct Link  http://www.atmel.com
Logo ATMEL - ATMEL Corporation

ATtiny48 Datasheet(HTML) 19 Page - ATMEL Corporation

Back Button ATtiny48 Datasheet HTML 15Page - ATMEL Corporation ATtiny48 Datasheet HTML 16Page - ATMEL Corporation ATtiny48 Datasheet HTML 17Page - ATMEL Corporation ATtiny48 Datasheet HTML 18Page - ATMEL Corporation ATtiny48 Datasheet HTML 19Page - ATMEL Corporation ATtiny48 Datasheet HTML 20Page - ATMEL Corporation ATtiny48 Datasheet HTML 21Page - ATMEL Corporation ATtiny48 Datasheet HTML 22Page - ATMEL Corporation ATtiny48 Datasheet HTML 23Page - ATMEL Corporation Next Button
Zoom Inzoom in Zoom Outzoom out
 19 / 266 page
background image
19
8008C–AVR–03/09
ATtiny48/88
If the EEPMn bits are zero, writing EEPE (within four cycles after EEMPE is written) will trigger
the erase/write operation. Both the erase and write cycle are done in one operation and the total
programming time is given in Figure 5-1 on page 23. The EEPE bit remains set until the erase
and write operations are completed. While the device is busy with programming, it is not possi-
ble to do any other EEPROM operations.
5.3.3
Split Byte Programming
It is possible to split the erase/write cycle in two different operations. This may be useful if the
system requires short access time for some limited period of time (typically if the power supply
voltage falls). In order to take advantage of this method, it is required that the locations to be
written have been erased before the write operation.
5.3.4
Erase
To erase a byte, the address must be written to EEAR. If the EEPMn bits are 0b01, writing the
EEPE (within four cycles after EEMPE is written) will trigger the erase operation only (program-
ming time is given in Figure 5-1 on page 23). The EEPE bit remains set until the erase operation
completes. While the device is busy programming, it is not possible to do any other EEPROM
operations.
5.3.5
Write
To write a location, the user must write the address into EEAR and the data into EEDR. If the
EEPMn bits are 0b10, writing the EEPE (within four cycles after EEMPE is written) will trigger
the write operation only (programming time is given in Figure 5-1 on page 23). The EEPE bit
remains set until the write operation completes. If the location to be written has not been erased
before write, the data that is stored must be considered as lost. While the device is busy with
programming, it is not possible to do any other EEPROM operations.
The calibrated oscillator is used to time the EEPROM accesses. Make sure the oscillator fre-
quency is within the requirements described in “OSCCAL – Oscillator Calibration Register” on
page 31.
The following code examples show one assembly and one C function for erase, write, or atomic
write of the EEPROM. The examples assume that interrupts are controlled (e.g., by disabling
interrupts globally) so that no interrupts will occur during execution of these functions.
Assembly Code Example
EEPROM_write:
; Wait for completion of previous write
sbic
EECR,EEPE
rjmp
EEPROM_write
; Set up address (r17) in address register
out
EEARL, r17
; Write data (r19) to Data Register
out
EEDR,r19
; Write logical one to EEMPE
sbi
EECR,EEMPE
; Start eeprom write by setting EEPE
sbi
EECR,EEPE
ret



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com