Download: AVR107: Interfacing AVR serial memories

AVR107: Interfacing AVR serial memories Features • Devices: AT25128A/256A, AT25F1024/2048/4096 • Full Serial Memory Functions Support • Memory Array Burst Read • Page Burst Write • Write Protection Detection • On Going Access Detection • Non-blocking Write Access • Access Status Information 1 Introduction Serial-interface memories are used in a broad spectrum of consumer, automotive, telecommunication, medical, industrial and PC related markets. Primarily used to store personal preference data and configuration/setup data, Serial memories are the most flexible type of non-volatile memory utili...
Author: Tucker Shared: 8/19/19
Downloads: 343 Views: 1078

Content

AVR107: Interfacing AVR serial memories Features

• Devices: AT25128A/256A, AT25F1024/2048/4096 • Full Serial Memory Functions Support • Memory Array Burst Read • Page Burst Write • Write Protection Detection • On Going Access Detection • Non-blocking Write Access • Access Status Information 1 Introduction Serial-interface memories are used in a broad spectrum of consumer, automotive, telecommunication, medical, industrial and PC related markets. Primarily used to store personal preference data and configuration/setup data, Serial memories are the most flexible type of non-volatile memory utilized today. Compared to other NVM solutions, serial memories devices offer a lower pin count, smaller packages, lower voltages, as well as lower power consumption. Most of the AVR provide a SPI interface which enables a connection with a serial memory like the AT25128A/256A and AT25F1024/2048/4096. To ease and accelerate the integration of SPI serial memories in customer’s AVR systems, basic drivers were developed to efficiently access them. This application note describes the functionality and the architecture of these drivers as well as the motivation of the selected solution. The exhaustive list and description of the provided functions are part of the Doxygen Automated Document. Figure 1-1. Hardware connections Serial memory AVR with SPI interface (AT25xxxx or AT25Fxxxx) SCK SCK MOSI SI MISO SO #SS #CS Vcc #HOLD Manual switch #WP 8-bit

Microcontrollers Application Note

Rev. 2595A-AVR-03/05, 2 Serial memories The following sections describe connecting the memory to an AVR processor, memory access types, block write protection bits and busy detection. For more information refer to the data sheets. 2.1 Serial Memory to AVR Hardware Connection The SPI interface is configured in the master mode. The SCK and MOSI ports are outputs and the MISO port is an input. Refer to Figure 1-1. Note that in this application note we use the slave select signal #SS to control the chip select pin #CS of the serial memory. This requires taking some precautions during the initialization of the SPI interface (see Initialization of the SPI Interface). Another port such as PB2 could be used to control the chip select line. The #HOLD signal can be held high in its inactive state because the SPI interface always halts the clock if the data not valid. The user can choose the configuration of the write protect signal #WP. Note: EEPROMs operating voltage range from 1,8V to 5,5V whereas Flashes operates from 2,7V to 3,6V. 2.2 SPI Serial Memory Access Types In order to understand the structure of the proposed drivers, it is worth to review the different accesses to the serial memories. All accesses follow this sequence: 1. The chip select line is driven low. 2. A number of serialized bytes are sent or received synchronously to the SCK clock on the data lines. 3. The chip select line is driven high. The number and value of the serialized byte depends on the access type. The SPI memory devices of this application note both support the SPI mode 0(0,0) and mode 3 (1,1). In the proposed driver the mode 0 is selected (See serial memory datasheets for details). 2.2.1 Single Byte Write Commands: WREN, WRDI, CHIP ERASE These accesses are one byte long. Only the instruction byte (later on called “op_code”) instruction is sent on the MOSI data line. 2 AVR107,

AVR107

Figure 2-1. Example WREN Timing 2.2.2 Read/ Write Status Register: RDSR/WRSR These accesses access are 2-byte long: The op_code byte is followed by the byte to be written (WRSR) or to be read (RDSR). Note: The Write Status Register operation must be preceded by WREN command. Figure 2-2. WRSR Timing, Figure 2-3. RDSR Timing 2.2.3 Sector Erase Command (only for AT25Fxxx Devices) This access consists of a one-byte op_code and 3 address bytes. Note: The Sector Erase operation must be preceded by WREN command. Figure 2-4. Sector Erase Timing 2.2.4 Data Write and Data Read Accesses These accesses consist of a one-byte op_code followed by an address phase (2-byte long for the AT25xxx devices, 3-byte long for the AT25Fxxx devices) and a data phase. The data phase length depends on the number of bytes to be written or read. In case of a full memory array read, the number of bytes is the capacity in bytes of the memory. Note: The WRITE and PROGRAM operations must be preceded by WREN command. 4 AVR107,

AVR107

Figure 2-5. WRITE command Timing (AT25xxxx) Figure 2-6. PROGRAM command Timing (AT25Fxxxx). 2.2.5 Access Type Summary The following table summarises the access types and their related lengths: Table 2-1. Access Type Summary Table Command Op_code Address Phase Length (bytes) Data Phase Length (bytes) AT25xxxx AT25Fxxxx MOSI line MISO line WREN 0000 X1100000WRDI 0000 X1000000RDSR 0000 X1010001WRSR 0000 X0010010READ 0000 X0112301to array size WRITE 0000 X010 2 N/A(1) 1 to page size 0 PROGRAM 0000 X010 N/A(1) 3 1 to page size 0 SECTOR ERASE 0101 X110 N/A(1) 300CHIP ERASE 0110 X110 N/A(1) 000RDID 0001 X101 N/A(1) 002Notes: 1. Command not applicable for this device., 2.3 SPI Peripheral Handling To perform the accesses to serial memory we use the SPI interface which enables, synchronously to the SCK, to shift out on the MOSI line the byte that has been written in the SPDR register and to shift in the byte on the MISO line into the SPDR. The SPI operates byte-wise. After a byte was sent or received, the flag SPIF is set in the SPSR register. We can envision two ways of operation to handle the SPI peripheral: 1. Polling the SPSR register to detect if the SPIF was set, and then perform the next SPI transfer. 2. Enable the SPI interrupt and manage the next SPI transfer in the SPI interrupt handler. 2.3.1 Polling Operation Mode The polling operation has the advantage to respond quickly to the end of a transfer and also to lead to a compact code size. The crucial drawback is that a polling operation is a blocking mechanism, since the code must wait for the end of the polling loop. We thus select the polling operation mode for short accesses: • WREN • WRDI • WRSR • RDSR • SECTOR ERASE • CHIP ERASE • RDID Since we assumed that the main routine waits for the read data to be received before going on with its code execution, we have also selected a polling operation for: • READ 2.3.2 Interrupt Operation Mode For the data burst write accesses, a polling operation mode is not well suited. Indeed the main routine does generally not need to wait for the end of the serial memory write cycle before going forward with its execution code. We thus select the interrupt mode of operation to handle the accesses: • WRITE • PROGRAM In this mode the SPI interrupt handler manages the next SPI transfer. This enables the main routine to execute its code between to SPI interrupts. To afford the interrupt routines to handle the next SPI transfer we must save the access context into global variables (see 3.3.2 The Global Variables Description). This consumes a few byte of the memory space. 6 AVR107,

AVR107

2.3.3 Interaction between both Operation Modes To avoid any conflict on the SPI interface between functions which uses polling operation mode and those which uses the interrupt mode, the following precaution must be taken: 1. Before any polling operation, it is checked (trough the global variable state) that the SPI peripheral is ready to send. Then the SPI interrupt is disabled. 2. At the end of an access using the polling operation mode, the SPI interrupt is enabled. 2.4 Write Protected Block Detection The serial memory devices provide a write protection function that also had to be considered when writing the code. The protected sectors depend on the setting of the BPx bits of the serial memory status register. Please refer to the serial memory datasheet for more details. Table 2-2. AT25F4096 memory protection options Table 2-3. AT25128A/ AT25256A memory protection options The proposed driver includes the function SetWriteProtectedArea that enables the user to define and active a write protected area. Note the function SetWriteProtectedArea will detect if the serial memory is hardware write protected (#WP line is low) by writing and reading back the status register. In case of a hardware write protection, nor the set up either the activation of a write protection configuration can be performed. By a data write access (WRITE/PROGAM command) the status register of the serial memory is read. According to the value of the BPx bits and the address location of, the last byte to be written, the write function detects if the destination address is located in a write-protected area. If yes, the returned access status code will be set to the DATA_WR_PROTECTED value and the access will be aborted. For AT25F devices, the write protection detection is active when performing a SECTOR ERASE or a CHIP ERASE operation. 2.5 Busy Detection The serial memory indicates its current state with the bit #RDY in its status register. If the bit is set to ‘1’ then all operations except the RDSR access are forbidden. Therefore each function will test if the #RDY bit is set. If yes the returned access status code will be set to the BUSY value and the access will be aborted. Note: since during a memory write cycle operation all bits of the status register are set to ‘1’, the memory must be ready prior to read and evaluate the status registers information bits. 3 Code implementation The following sections describe initialization of the SPI Interface, The Polling Mode Functions and the Interrupt Mode Functions. 3.1 Initialization of the SPI Interface 1. The SPI interface must be configured as a master. To ensure that the SPI does not switch to the slave mode through the slave select line, the SS port must be configured as an output with a high level. a. The SPI interface is first disabled to configure the PB2 port b. The PB2 port is configured as an output c. A high value is set on the port PB2 d. The MRST bit is set e. The SPI is enabled 2. The SPI mode 0 must be selected to ensure among others that the clock signal is low on a chip select rising edge. The most significant bit must be the first transmitted bit. The choice of the data rate is user-defined. 3. The other port directions must be configured as following: a. Outputs: PB5/SCK, PB3/MOSI b. Inputs: PB4/MISO. 4. The SPIF flag must be cleared by reading the SPSR and SPDR register. 5. The SPI interrupt is enabled 3.2 Polling Operation Mode Functions WREN, WRDI, WRSR, RDSR, SECTOR ERASE, CHIP ERASE, RDID and READ all call the elementary function spi_transfer. 8 AVR107,

AVR107

3.2.1 The SPI Transfer Elementary Function The function spi_transfer is the elementary function that handles the SPI interface in polling mode. It sends a byte and stores the received one. Note that this function does not control the level of the chip select line. Prototype: char spi_transfer(char data); Figure 3-1. spi_transfer flowchart Write Data to SPDR Read SPSR No SPIF flag set? Yes Return SPDR value 3.2.2 The Get Status Register Function This function performs a RDSR access. It returns the access status code. The value of the status register is place into the output parameter. It first checks that the SPI interface is not locked by a write process. (See the Data Write Accesses section) Prototype: char GetStatusRegister(char *data), Figure 3-2. GetStatusRegister flowchart No State = ready_to_send? Yes Disable SPI interrupt Pull down #SS wire Spi_transfer( RDSR op_code) Data = Spi_transfer(0xFF) Pull up the #SS wire Enable SPI interrupt Access status = Access status = TRANSFER_COMPLETE BUSY Return Access Status 3.2.3 The Single Byte Write Command The WREN and WRDI accesses are on byte long and can be performed by the function WriteCommand. The serial memory must be ready before performing the access. It returns the access status code. Prototype : char WriteCommand(char op_code) 10 AVR107,

AVR107

Figure 3-3. WriteCommand flowchart Get Status Register No Transfer completed? Yes #RDY bit Disable SPI interrupt Pull down #SS wire Spi_transfer with WREN or WRDI op_code Pull up the #SS wire Enable SPI interrupt Access status = Access status = TRANSFER_COMPLETED BUSY Return Access Status 3.2.4 The Write Status Register Function This function performs the RDSR access. It checks that the serial memory is ready to be written. It returns the same access status code as the WriteCommand function. Prototype : char WriteStatusReg(char sr), Figure 3-4. WriteStatusReg flowchart Get Status Register No Transfer completed? Yes #RDY bit Disable SPI interrupt Pull down #SS wire Send WRSR op_code Send the status register value Pull up the #SS wire Enable SPI interrupt Access status = Access status = TRANSFER_COMPLETE BUSY Return Access Status 3.2.5 The Get Character Array Function This function reads one or multiple bytes from the serial memory If the serial memory or the SPI interface is busy, the function returns immediately with the according access status code. Prototypes: For AT25 devices: char GetCharArray(int address, int nb_of_byte, char* destination); For AT25F devices : char GetCharArray(unsigned long address, int nb_of_byte, char* destination); 12 AVR107,

AVR107

Figure 3-5. GetCharArray flowchart Yes Adress out of range? No Get Status Register No Transfer completed? Yes #RDY bit Spi_transfer(READ) Spi_transfer(adress_byte) No Adress phase last byte? Yes *destination = Spi_transfer(0xFF) Increment byte counter and destination No Last byte? Yes Access status = Access status = Access status = BUSY TRANSFER_COMPLETE OUT_OF_RANGE Return Access Status 3.2.6 The Get Character Function To minimise the code size, the GetChar function calls the GetCharArray function with only one byte as parameter. Prototypes: For AT25 devices: char GetChar(int address, char *data); For AT25F devices: char GetChar(unsigned long address, char *data);, 3.3 Interrupt Mode Functions 3.3.1 Principle Like a read access, a write access to the serial MEMORY is composed of a SPI transfer sequence. But unlike to the read access, the end of a SPIF transfer will be determined by the SPI interrupt. In order to let the write access be fully performed in background vs. the main routine execution, the SPI interrupt handler must be able to prepare the next SPI transfer as well as to control the chip select wire. To enable such a mechanism, the interrupt handler must know the current context. This context is saved onto global variables. A state global variable contains the information about the current SPI transfer type (INSTRUCTION, ADDRESS, DATA). When a SPI interrupt is raised, meaning the end of a SPI transfer, the interrupt handler will determine which type of SPI transfer, if any, must be started. The interrupt handler acts as a finite state machine reacting on the SPI interrupt event. 3.3.2 The Global Variables Description The state global variable describes the phase of the write access (See the finite state machine diagram for more details): INSTRUCTION: The op_code is being transferred ADDRESS: The current address byte is being transferred DATA: The current data byte is being transferred The nb_byte global variable contains the total number of data byte to be written minus one. The byte_cnt global variable counts the number of address or data byte already written. The address global variable contains the address of the serial memory where the first byte must be written. The data_ptr global variable contains the address of the SRAM where the first byte is located. 3.3.3 The Put Character Array Function This function writes an array of bytes into the serial memory. The size of the array can be up to the page size of the serial memory. The parameter source is the pointer to this array. The function checks if the address is out of range or matches a write protected area. Additionally the function returns an access status providing a detection of a busy state of the serial. Note: If the read sequence crosses a page boundary, a page rollover will occur. Please refer to the Doxygen documentation for further details. Prototype: For AT25 devices: 14 AVR107,

AVR107

char PutCharArray(int address, char nb_of_byte, char* source); For AT25F devices: char PutCharArray(unsigned long address, char nb_of_byte, char* source); Note: • The parameter nb_of_byte is the number of byte decrement by one so that even if the page is 256-byte long, the global variable byte_cnt occupies only one byte. • For the AT25F devices, the concerned sector must have been erased prior to a PutCharArray operation. • The Chip and Sector Erase Function (only for AT25Fxxxx devices) have the same structure and access status code as the GetCharArray, except that the data phase does not exist. The function controls that the location to be erased is not write protected. Figure 3-6. PutCharArray flowchart Yes Adress out of range? Access status =OUT_OF_RANGE No Get Status Register No Transfer completed? Yes #RDY bit Access status =BUSY First byte location Yes Access status = write protected? DATA_WR_PROTECTED No Perform WREN instruction Set global variables according to adress, number of byte, source state=INSTRUCTION Pull down chip select line Write WRITE/PROGRAM op_code to SPDR Access status = TRANSFER_COMPLETE Return Access Status, 3.4 The Finite State Machine The following diagram describes the state global variable transitions during a write cycle. Each time the SPI interrupt handler is entered the state is evaluated and the next SPI transfer is performed. If the last bye was transferred, the state goes into the idle state called READY_TO_SEND: Figure 3-7. Finite State Machine

INSTRUCTION

PutCharArray() call Adress byte counter++ ADDRESS READY TO SEND Data byte counter++ Last byte was sent

DATA

Sequential transition SPI interrupt occurred 3.4.1 The Instruction State Entering the interrupt handler with the state variable set to INSTRUCTION means that the instruction code WRITE (or PROGRAM for AT25Fxxx Flashes) has been sent over the SPI interface. The next state becomes ADDRESS and the byte counter is initialized to 1. The first byte of the address is written to the SPDR register. 3.4.2 The Address State Entering the interrupt handler with the state variable set to ADDRESS means that one byte of the address has been sent over the SPI interface. 16 AVR107,

AVR107

Figure 3-8. Address State flowchart Last adress Yes byte sent? No Increment byte counter Reset byte counter Write next byte to Write first data byte SPDR register to SPDR register Return from interrupt State = DATA 3.4.3 The Data State Entering the interrupt handler with the state variable set to DATA means that a data byte has been sent over the SPI interface. Figure 3-9. Data State flowchart Increment data pointer Yes Last byte sent? No Increment byte counter Pull chip-select high Write pointed byte to SPRD State = register READY_TO_SEND Return from interrupt 3.4.4 The Ready-to-Send State This state cannot be active when entering the SPI interrupt handler. It signifies that there is no current data write access using the SPI interface. Therefore the state global variable can be tested in order to determine the end of a SPI write transfer. Note: The state value can be READY_TO_SEND while the serial memory is still in a busy state., 3.5 The PutChar Function (Only for the AT25128A/256A Devices) The serial EEPROM devices are not organized with sectors and do not require to contain a 0xFF pattern prior a write access. Therefore there is no need to perform a read-modify-write operation, and the PutChar function can be build upon a call to the PutCharArray function passing one byte as parameter. Note: For AT25F serial flashes a read-modify-write operation over a whole sector is needed to ensure the usual functionality of the PutChar function. Since such a operation is highly time and memory space consuming, we will not provide this function for the serial flashes. 18 AVR107,

AVR107

4 AT25128A/256A Devices: Example of Driver Use

This example shows to benefit from the non-blocking PutCharArray function:

main() { int start_address = 0x100; char* src = malloc(PAGE_SIZE* sizeof(char)); char* dest = malloc(PAGE_SIZE * sizeof(char)); char AccessStatus = BUSY; /////////////////////////////////////////////////////////////////////////////////////// //Init SPI peripheral /////////////////////////////////////////////////////////////////////////////////////// init_spi_master(); //Disable Software write protection do {AccessStatus = SetWriteProtectedArea(NONE);} while (AccessStatus == BUSY); if (AccessStatus == HW_PROTECTED) { // Handle here a hardware protection detection } // Write a page do {AccessStatus = PutCharArray(start_address, (PAGE_SIZE-1), src);} while (AccessStatus == BUSY); // OPTIONAL : handle errors if (AccessStatus == OUT_OF_RANGE) {} else if (AccessStatus == DATA_WR_PROTECTED) {} ////////////////////////////////////////////////////////////////////// // HERE USER CODE (Write Access is being performed in the SPI Interrupt Handler) ////////////////////////////////////////////////////////////////////// // OPTIONAL : Disable Write on the SPI memory (wait for the memory to be ready) while (WriteCommand(WRDI) != TRANSFER_COMPLETED){} //////////////////////////////////////////////////////////////// // HERE ADDITIONAL USER CODE //////////////////////////////////////////////////////////////// //Read a page while (GetCharArray(start_address, (PAGE_SIZE-1), dest) != TRANSFER_COMPLETED) {} //the page is available in the SRAM buffer pointed by dest }, 5 AT25F1024/2048/4096 Devices: Example of Driver Use

This example shows to benefit from the non-blocking PutCharArray function:

main() { int start_address = 0x100; char* src = malloc(PAGE_SIZE* sizeof(char)); char* dest = malloc(PAGE_SIZE * sizeof(char)); char AccessStatus = BUSY; /////////////////////////////////////////////////////////////////////////////////////// //Init SPI peripheral /////////////////////////////////////////////////////////////////////////////////////// init_spi_master(); //Disable Software write protection do {AccessStatus = SetWriteProtectedArea(NONE);} while (AccessStatus == BUSY); if (AccessStatus == HW_PROTECTED) { // Handle here a hardware protection detection } //Erase concerned sector do {AccessStatus = EraseSector(start_address);} while (AccessStatus == BUSY); // OPTIONAL : handle errors if (AccessStatus == OUT_OF_RANGE) {} else if (AccessStatus == DATA_WR_PROTECTED) {} else { // Write a page while (PutCharArray(start_address, (PAGE_SIZE-1), src)== BUSY){} } ////////////////////////////////////////////////////////////////////// // HERE USER CODE (Write Access is being performed in the SPI Interrupt Handler) ////////////////////////////////////////////////////////////////////// // OPTIONAL : Disable Write on the SPI memory (blocking operation) while (WriteCommand(WRDI) != TRANSFER_COMPLETED){} //////////////////////////////////////////////////////////////// // HERE ADDITIONAL USER CODE //////////////////////////////////////////////////////////////// //Read a page while (GetCharArray(start_address, (PAGE_SIZE-1), dest) != TRANSFER_COMPLETED) {} //the page is available in the SRAM buffer pointed by dest } 20 AVR107,

AVR107

6 Development Environment 6.1 Hardware • STK500 board with a 8-lead soldered PDIP socket on ports B • AVR Atmega168 • AT25256A in a PDIP package • AT25F4096 in a PDIP package • JTAGICE mkII - In-Circuit Emulator with debugWIRE 6.2 Software • IAR Embedded Workbench - EWAVR 3.20C • AVR Studio Version 4.10 7 Code Size The following figures are computation based on the map listing file. The code optimization option was set to high. The main routine code size are not included. Table 7-1. Code size. Target device Code size [bytes] AT25256A 752 (to be updated) AT25F4096 1086 (to be updated) 8 References Datasheets: • SPI Serial EEPROMS AT25128A and AT25256A • SPI Serial Memory AT25F4096 • AVR ATmega168V,

Disclaimer Atmel Corporation Atmel Operations

2325 Orchard Parkway Memory RF/Automotive San Jose, CA 95131, USA 2325 Orchard Parkway Theresienstrasse 2 Tel: 1(408) 441-0311 San Jose, CA 95131, USA Postfach 3535 Fax: 1(408) 487-2600 Tel: 1(408) 441-0311 74025 Heilbronn, Germany Fax: 1(408) 436-4314 Tel: (49) 71-31-67-0

Regional Headquarters Microcontrollers Fax: (49) 71-31-67-2340 Europe 2325 Orchard Parkway 1150 East Cheyenne Mtn. Blvd.

Atmel Sarl San Jose, CA 95131, USA Colorado Springs, CO 80906, USA Route des Arsenaux 41 Tel: 1(408) 441-0311 Tel: 1(719) 576-3300 Case Postale 80 Fax: 1(408) 436-4314 Fax: 1(719) 540-1759 CH-1705 Fribourg Switzerland La Chantrerie Biometrics/Imaging/Hi-Rel MPU/ Tel: (41) 26-426-5555 BP 70602 High Speed Converters/RF Datacom Fax: (41) 26-426-5500 44306 Nantes Cedex 3, France Avenue de Rochepleine Tel: (33) 2-40-18-18-18 BP 123

Asia Fax: (33) 2-40-18-19-60 38521 Saint-Egreve Cedex, France

Room 1219 Chinachem Golden Plaza ASIC/ASSP/Smart Cards Tel: (33) 4-76-58-30-00 Fax: (33) 4-76-58-34-80 77 Mody Road Tsimshatsui Zone Industrielle East Kowloon 13106 Rousset Cedex, France Hong Kong Tel: (33) 4-42-53-60-00 Tel: (852) 2721-9778 Fax: (33) 4-42-53-60-01 Fax: (852) 2722-1369 1150 East Cheyenne Mtn. Blvd.

Japan Colorado Springs, CO 80906, USA

9F, Tonetsu Shinkawa Bldg. Tel: 1(719) 576-3300 1-24-8 Shinkawa Fax: 1(719) 540-1759 Chuo-ku, Tokyo 104-0033 Japan Scottish Enterprise Technology Park Tel: (81) 3-3523-3551 Maxwell Building Fax: (81) 3-3523-7581 East Kilbride G75 0QR, Scotland Tel: (44) 1355-803-000 Fax: (44) 1355-242-743

Literature Requests

www.atmel.com/literature Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN ATMEL’S TERMS AND CONDITIONS OF SALE LOCATED ON ATMEL’S WEB SITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and product descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Atmel’s products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life. © Atmel Corporation 2005. All rights reserved. Atmel®, logo and combinations thereof, AVR®, and AVR Studio® are registered trademarks, and Everywhere You AreSM are the trademarks of Atmel Corporation or its subsidiaries. Other terms and product names may be trademarks of others.]
15

Similar documents

AVR120: Characterization and Calibration of the ADC on an AVR
AVR120: Characterization and Calibration of the ADC on an AVR Features • Understanding Analog to Digital Converter (ADC) characteristics • Measuring parameters describing ADC characteristics • Temperature, frequency and supply voltage dependencies • Compensating for offset and gain error Introductio
AVR001 Conditional Assembly and portability macros
AVR001 Conditional Assembly and portability macros Features • Increased portability • Easier Code Writing • Simplified I/O Register Access • Improved Assembly Status Feedback 1 Introduction This application note describes the Conditional Assembly feature present in the AVR Assembler version 1.74 and
8-bit Microcontroller Application Note
8-bit Microcontroller Application Note Rev. 2527A–AVR–9/02 AVR223: Digital Filters with AVR Features • Implementations of Simple Digital Filters • Coefficient and Data Scaling • Fast Implementation of 2nd Order FIR Filter • Compact Implementation Of 8th Order FIR Filter • Fast Implementation of 2nd
8-bit Microcontroller Application Note AVR040: EMC Design Considerations Scope
8-bit Microcontroller Application Note Rev. 1619C–AVR–01/04 AVR040: EMC Design Considerations Scope This application note covers the most common EMC problems designers encounter when using microcontrollers. It will briefly discuss the various phenomena. The refer- ence literature covers EMC design i
8-bit RISC Microcontroller Application Note
8-bit RISC Microcontroller Application Note Rev. 2508B–AVR–01/04 AVR182: Zero Cross Detector Features • Interrupt Driven • Modular C Source Code • Size Efficient Code • Accurate and Fast Detection • A Minimum of External Components Introduction One of the many issues with developing modern applicati
AVR242: 8-bit Microcontroller Multiplexing LED Drive anda4x4Keypad Multiplexing Features reduced to fifteen with a bit of ingenuity,
AVR242: 8-bit Microcontroller Multiplexing LED Drive anda4x4Keypad Multiplexing Features reduced to fifteen with a bit of ingenuity, allowing the smaller 20-pin AVR to be LED Drive and a • 16 Key Pushbutton Pad in4x4Matrix • 4 Digit Multiplexed LED Display with used. The circuit diagram is shown in
8-bit Microcontroller Application Note AVR180: External Brown-out Protection
8-bit Microcontroller Application Note Rev. 1051B–AVR–05/02 AVR180: External Brown-out Protection Features • Low-voltage Detector • Prevent Register and EEPROM Corruption • Two Discrete Solutions • Integrated IC Solution • Extreme Low-cost Solution • Extreme Low-power Solution • Formulas for Compone
8-bit Microcontroller Application Note
8-bit Microcontroller Application Note Rev. 1259D–AVR–04/05 AVR134: Real Time Clock (RTC) using the Asynchronous Timer Features • Real Time Clock with Very Low Power Consumption (4 µA @ 3.3V) • Very Low Cost Solution • Adjustable Prescaler to Adjust Precision • Counts Time, Date, Month, and Year wit
  Wiring Diagram
Wiring Diagram Samsung Electronics 6-1
8-bit Microcntroller Application Note
8-bit Microcntroller Application Note Rev. 2532A–AVR–01/03 AVR243: Matrix Keyboard Decoder Features • 64-key Push-button Keyboard in8x8Matrix • No External Components Required • Wakes Up from Sleep Mode on Keypress • Easily Implemented into Other Applications • Low Power Consumption • Software Conta
  Alignment and Adjustments
Alignment and Adjustments 1. Tuner FM THD Adjustment FMOutput Antenna GND SETSSG FREQ. 98 MHz Terminal Oscilloscope Adjustment FM S.S.G Input point FM DETECTOR COIL Speaker (FM DET) Terminal output Input Output 60 dB Distortion Meter Minumum Distortion (0.4% below) (Figure 1-1) Figure1-1 IF CENTER
8-bit Microcontroller Application Note
8-bit Microcontroller Application Note Rev. 2540A–AVR–07/03 AVR104: Buffered Interrupt Controlled EEPROM Writes Features • Flexible Multi-byte EEPROM Buffer • Power Efficient EEPROM Access • Access Control on Buffers • EEPROM Buffer Rewrite Introduction Many applications use the built-in EEPROM of t
  Schematic Diagram - This Document can not be used without Samsung’s authorization -
Schematic Diagram - This Document can not be used without Samsung’s authorization - 7-1 MAIN 7-1 Samsung Electronics 7-2 FRONT - This Document can not be used without Samsung’s authorization - Samsung Electronics 7-2 7-3 DSP - This Document can not be used without Samsung’s authorization - 7-3 Sam
  TroubleShooting
TroubleShooting 9-1 Main 9-1 Samsung Electronics Samsung Electronics 9-2 9-3 Samsung Electronics Samsung Electronics 9-4 9-2 DVD Servo parts 9-5 Samsung Electronics Samsung Electronics 9-6 9-7 Samsung Electronics Samsung Electronics 9-8 9-9 Samsung Electronics Samsung Electronics 9-10 9-11 Samsung
AVR054: Run-time calibration of the internal RC oscillator
AVR054: Run-time calibration of the internal RC oscillator Features • Calibration of internal RC oscillator via UART • LIN 2.0 compatible synchronization/calibration to within +/-2% of target frequency • Alternate run-time synchronization/calibration to within +/-1% of target frequency • Support for
SERVICE Manual
DVD RECEIVER AMP HT-DB120 SERVICE Manual DVD RECEIVER AMP SYSTEM CONTENTS 1. Alignment and Adjustments 2. Exploded Views and Parts List 3. Electrical Parts List 4. Block Diagrams 5. PCB Diagrams 6. Wiring Diagram 7. Schematic Diagrams 8. IC block Diagrams 9.Troubleshooting - Confidential - ELECTRONI
8-bit Microcontroller Application Note AVR131: Using the AVR’s High-speed PWM
8-bit Microcontroller Application Note Rev. 2542A–AVR–09/03 AVR131: Using the AVR’s High-speed PWM Features • Analog Waveform Generation using PWM • High-speed Prescalable PWM Clock Introduction This application note is an introduction to the use of the high-speed Pulse Width Mod- ulator (PWM) avail
8-bit RISC Microcontroller Application Note AVR042: AVR® Hardware Design Considerations
8-bit RISC Microcontroller Application Note Rev. 2521B–AVR–01/04 AVR042: AVR® Hardware Design Considerations Features • Providing Robust Supply Voltage, Digital and Analog • Connecting the RESET Line • SPI Interface for In-System Programming • Using External Crystal or Ceramic Resonator Oscillators
8-bit Microcontroller Application Note AVR240: 4x4Keypad – Wake-up on Keypress Features Introduction
8-bit Microcontroller Application Note AVR240: 4x4Keypad – Wake-up on Keypress Features • 16 Key Pushbutton Pad in4x4Matrix • Very Low Power Consumption • AVR in Sleep Mode and Wakes Up on Keypress • Minimum External Components • ESD Protection Included if Necessary • Efficient Code • Complete Progr
Microcontrollers for Fluorescent and High Intensity Discharge Lamp Ballasts SMARTER, MORE FLEXIBLE LIGHTING SOLUTIONS
LIGHTINGMICROCONTROLLERSMicrocontrollers for Fluorescent and High Intensity Discharge Lamp Ballasts SMARTER, MORE FLEXIBLE LIGHTING SOLUTIONS Developed together with the industry leading lamp ballast manufac- turers, Atmel® microcontrollers are optimized for Linear and Dimmable Fluorescent tubes, as
AVR121: Enhancing ADC resolution by oversampling
AVR121: Enhancing ADC resolution by oversampling Features • Increasing the resolution by oversampling • Averaging and decimation • Noise reduction by averaging samples 1 Introduction Atmel’s AVR controller offers an Analog to Digital Converter with 10-bit resolution. In most cases 10-bit resolution
  IC Block Diagrams 8-1 Main
IC Block Diagrams 8-1 Main 8-1-1. FAN8082D 8-1 Samsung Electronics 8-1-2. LC87F66C8A Samsung Electronics 8-2 8-3 Samsung Electronics Samsung Electronics 8-4 8-5 Samsung Electronics 8-1-3. M62446AFP Samsung Electronics 8-6 8-7 Samsung Electronics 8-1-4. M66010FP 8-1-5. SI-8050SE 8-1-6. SI-8090JFE S
AVR053: Calibration of the internal RC oscillator Features Introduction
AVR053: Calibration of the internal RC oscillator Features • Calibration using STK500, AVRISP, JTAGICE or JTAGICE mkII • Calibration using 3rd party programmers • Adjustable RC frequency with +/-1% accuracy • Tune RC oscillator at any operating voltage and temperature • Tune RC oscillator to any fre
8-bit Microcontroller Application Note AVR230: DES Bootloader Features
8-bit Microcontroller Application Note Rev. 2541D–AVR–04/05 AVR230: DES Bootloader Features • Fits All AVR Microcontrollers with Bootloader Capabilities • Enables Secure Transfer of Compiled Software or Sensitive Data to Any AVR with Bootloader Capabilities • Includes Easy To Use, Configurable Examp
AVR106: C functions for reading and writing to Flash memory
AVR106: C functions for reading and writing to Flash memory Features • C functions for accessing Flash memory - Byte read - Page read - Byte write - Page write • Optional recovery on power failure • Functions can be used with any device having Self programming Program memory • Example project for us
8-bit Microcontroller Application Note AVR201: Using the AVR® Hardware Multiplier
8-bit Microcontroller Application Note Rev. 1631C–AVR–06/02 AVR201: Using the AVR® Hardware Multiplier Features • 8- and 16-bit Implementations • Signed and Unsigned Routines • Fractional Signed and Unsigned Multiply • Executable Example Programs Introduction The megaAVR is a series of new devices i
  Printed Circuit Board Diagram
Printed Circuit Board Diagram 5-1 MAIN 5-1 Samsung Electronics 5-2 FRONT Samsung Electronics 5-2 5-3 DSP 5-3 Samsung Electronics 5-4 JACK * RCA JACK * SCART JACK Samsung Electronics 5-4 5-5 DVD PACK * TOP VIEW * BOTTOM VIEW 5-5 Samsung Electronics
8-bit Microcontroller Application Note AVR105: Power Efficient High Endurance Parameter Storage in Flash Memory
8-bit Microcontroller Application Note Rev. 2546A–AVR–09/03 AVR105: Power Efficient High Endurance Parameter Storage in Flash Memory Features • Fast Storage of Parameters • High Endurance Flash Storage – 350K Write Cycles • Power Efficient Parameter Storage • Arbitrary Size of Parameters • Semi-redu
8-bit RISC Microcontoller Application Note AVR130: Setup and Use the AVR® Timers Features
8-bit RISC Microcontoller Application Note Rev. 2505A–AVR–02/02 AVR130: Setup and Use the AVR® Timers Features • Description of Timer/Counter Events • Timer/Counter Event Notification • Clock Options • Example Code for Timer0 – Overflow Interrupt • Example Code for Timer1 – Input Capture Interrupt •
8-bit RISC Microcontroller Application Note AVR151: Setup And Use of The SPI Features Introduction
8-bit RISC Microcontroller Application Note Rev. 2585A–AVR–11/04 AVR151: Setup And Use of The SPI Features • SPI Pin Functionality • Multi Slave Systems • SPI Timing • SPI Transmission Conflicts • Emulating the SPI • Code examples for Polled operation • Code examples for Interrupt Controlled operati