Download: 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 using the complete Application Flash section for parameter storage. Introduction Recent AVRs have a feature called Self programming Program memory. This feature makes it possible for an AVR to reprogram the Flash memory during program run and is suitable for applications that need to self-update firmw...
Author: Walway Shared: 8/19/19
Downloads: 137 Views: 487

Content

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 using the complete Application Flash section for parameter storage.

Introduction

Recent AVRs have a feature called Self programming Program memory. This feature makes it possible for an AVR to reprogram the Flash memory during program run and is suitable for applications that need to self-update firmware or store parameters in Flash. This application note provides C functions for accessing the Flash memory. Figure 1. Example of an application using the complete Application Flash section for parameter storage. Microcontroller 8kB program memory Relization ATmega128 120kB dataflash for parameter storage 8-bit

Microcontrollers Application Note

Rev. 2575A-AVR-08/04,

Theory of operation

This section contains some basic theory around using the Self programming Program memory feature in AVR. For a better understanding of all features concerning Self programming, please refer to the device datasheet or application note “AVR109 Self Programming Flash”.

Using SPM The Flash memory may be programmed using the Store Program Memory (SPM)

instruction. On devices containing the Self Programming feature the program memory is divided into two main sections: Application Flash Section and Boot Flash Section. On devices with boot block, the SPM instruction has the ability to write to the entire Flash memory, but can only be executed from the Boot section. Executing SPM from the Application section will have no effect. On the smaller devices that don’ have a boot block, the SPM instruction can be executed from the entire memory. During Flash write to the Boot section the CPU is always halted. However, most devices may execute code (read) from the Boot section while writing to the Application section. It is important that the code executed while writing to the Application section do not attempt to read from the Application section. If this happens the entire program execution may be corrupted. The size and location of these two memory sections are depending upon device and fuse settings. Some devices have the ability to execute the SPM instruction from the entire Flash memory space.

Write procedure The Flash memory is written in a page-by-page fashion. The write is carried out by

storing data for an entire page into a temporary page buffer prior to writing the Flash. Which Flash address to write to is decided by the content of the Z-register and RAMPZ-register. A Flash page has to be erased before it can be programmed with the data stored in the temporary buffer. The functions contained in this application note use the following procedure when writing a Flash page: • Fill temporary page buffer • Erase Flash page • Write Flash page As one can see of this sequence there is a possibility for loss of data if a reset or power failure should occur immediately after a page erase. Loss of data can be avoided by taking necessary precautions in software, involving buffering in non- volatile memory. The write functions contained in this application note provide optional buffering when writing. These functions are further described in the firmware section. For devices having the read-while-write feature, allowing the boot loader code to be executed while writing, the write functions will not return until the write has completed. 2 AVR106,

AVR106 Addressing The Flash memory in AVR is divided into 16-bit words. This means that each Flash

address location can store two bytes of data. For an ATmega128 it is possible to address up to 65k words or 128k bytes of Flash data. In some cases the Flash memory is referred to by using word addressing and in other cases by using byte addressing, which can be confusing. All functions contained in this application note use byte addressing. The relation between byte address and word address is as follows: • Byte address = word address • 2 A Flash page is addressed by using the byte address for the first byte in the page. The relation between page number (ranging 0, 1, 2…) and byte address for the page is as follows: • Byte address = page number • page size (in bytes) Example on byte addressing: A Flash page in an ATmega128 is 256 bytes long. Byte address 0x200 (512) will point to: • Flash byte 0x200 (512), equal to byte 0 on page 2 • Flash page 2 When addressing a page in ATmega128 the lower byte of the address is always zero. When addressing a word the LSB of the address is always zero.

Implementation

The firmware is made for the IAR compiler. The functions may be ported to other compilers, but this may require some work since several intrinsic functions from the IAR compiler are used. Implementation is done by including the file Self_programming.h in the main C file and adding the file Self_programming.c to the project. When using Self-programming it is essential that the functions for writing are located inside the Boot section of the Flash memory. This can be controlled by the usage of memory segment definitions in the compiler linker file (*.xcl). All other necessary configurations concerning the firmware are done inside the file Self_programming.h

Page size The constant PAGESIZE must be defined to be equal to the Flash page size (in

bytes) of the device being used.

Enabling Flash recovery Defining the constant _FLASH_RECOVER enables the Flash recovery option for

avoiding data loss in case of power failure. When Flash recovery is enabled, one Flash page will serve as a recovery buffer. The value of _FLASH_RECOVER will determine the address to the Flash page used for this purpose. This address must be a byte address pointing to the beginning of a Flash page and the write functions will not be able to write to this page. Flash recovery is carried out by calling the function RecoverFLASH() at program startup.

Defining Flash memory The memory range in which the functions are allowed to write is defined by the

for writing constants ADR_LIMIT_LOW and ADR_LIMIT_HIGH. The write functions can write to addresses higher or equal to ADR_LIMIT_LOW and lower than ADR_LIMIT_HIGH.,

Placing entire code It is necessary to redefine a range of segments defined inside the default *.xcl file in

inside Boot section order to place the entire application code in the Boot section of Flash. The location and size of the Boot section varies with the device being used and fuse settings. Programming the BOOTRST fuse will move the reset vector to the beginning of the Boot section. It is also possible to move all the interrupt vectors to the Boot section. Refer to the interrupt section in the device datasheet for instructions on how to do this. The segment definitions that have to be redefined in order to place the entire program code into the Boot section is as follows: TINY_F, NEAR_F, SWITCH, DIFUNCT, CODE, FAR_F, HUGE_F, INITTAB, TINY_ID, NEAR_ID and CHECKSUM. The file lnkm128s.xcl provided with this application note will place the entire code into the 8kB Flash section of an Atmega128. This file can easily be modified to be used with other devices and provides instructions on how to do this.

Placing selected Alternatively it is possible to place only selected functions into defined segments of

functions inside Boot the Flash memory. In fact it is only the functions for writing that need to be located section inside the Boot section. This can be done by defining a new Flash segment equivalent to the Boot memory space and use the @ operator to place the desired functions into this segment. The @ operator does not apply to functions called inside the function it is used on. Definition of Boot segment in *.xcl file for an ATmega128 with 8kB Boot size: 1. Make a new define for Boot size. -D_..X_BOOTSEC_SIZE=2000 /* 4096 words */ 2. Define a new segment for the entire Boot section based on the definition in step 1. -Z(FARCODE)BOOT_SECTION=(_..X_FLASH_END-_..X_BOOTSEC_SIZE-1)- _..X_FLASH_END PlacingaCfunction into the defined segment: void ExampleFunction() @ BOOT_SEGMENT { - } The C-code above will place the function ExampleFunction() into the defined memory segment “BOOT_SEGMENT”. 4 AVR106,

AVR106 Firmware description

The firmware consists of five C functions and one example project for IAR v 2.28a / 3.10c using an ATmega128. The example project is configured to have the entire program code located in the Boot section of Flash and can be used as a starting point for the application sketched in Figure 1.

Description of C

functions Table 1. C functions for accessing Flash memory. Function Arguments Return ReadFlashByte( ) MyAddressType flashAdr unsigned char MyAddressType flashStartAdr, unsigned char ReadFlashPage() *dataPage unsigned char WriteFlashByte( ) MyAddressType flashAddr, unsigned char data unsigned char MyAddressType flashStartAdr, unsigned char WriteFlashPage() *dataPage unsigned char RecoverFlash() Void unsigned char The datatype MyAddressType is defined in Self_programming.h. The size of this datatype is depending upon the device that is being used. It will be defined as an long int when using devices with more than 64kB of Flash memory, and as a int (16 bit) using devices with 64kB or less of Flash memory. The datatypes are actually used as _flash or _farflash pointers (consequently 16 and 24 bit). The reason why a new datatype is defined is that integer types allow a much more flexible usage than pointer types. ReadFlashByte() returns one byte located on Flash address given by the input argument. ReadFlashPage() reads one Flash page from address ucFlashStartAdr and stores data in array pucDataPage[]. The number of bytes stored is depending upon the Flash page size. The function returns FALSE if the input address is not a Flash page address, else TRUE. WriteFlashByte() writes byte ucData to Flash address ucFlashAddr. The function returns FALSE if the input address is not a valid Flash byte address for writing, else TRUE. WriteFlashPage() writes data from array pucDataPage[] to Flash page address ucFlashStartAdr. The number of bytes written is depending upon the Flash page size. The function returns FALSE if the input address is not a valid Flash page address for writing, else TRUE. RecoverFlash() reads the status variable in EEPROM and restores Flash page if necessary. The function must be called at program startup if the Flash recovery option is enabled. The function Returns TRUE if Flash recovery has taken place, else FALSE.,

Flash recovery When the Flash recovery option is enabled a page write will involve pre-storing of

data into a dedicated recovery page in Flash, before the actual write to a given Flash page takes place. The address for the page to be written to is stored in EEPROM together with a status byte indicating that the Flash recovery page contains data. This status byte will be cleared when the actual write to a given Flash page is completed successfully. The variables in EEPROM and the Flash recovery buffer are used by the Flash recovery function RecoverFlash() to recover data when necessary. The writing of one byte to EEPROM takes about the same time as writing an entire page to Flash. Thus, when enabling the Flash recovery option the total write time will increase considerably. EEPROM is used instead of Flash because reserving a few bytes in Flash will exclude flexible usage of the entire Flash page containing these bytes.

Flowcharts Figure 2. Flowchart for function ReadFlashByte().

ReadFlashByte() Read byte from Flash address given by input argument Return byte Figure 3. Flowchart for function ReadFlashPage(). ReadFlashPage() Is input address a No valid page address? Yes Read byte from Flash and store in data array given by input argument Loop PAGESIZE number of times Return TRUE Return FALSE 6 AVR106,

AVR106 Figure 4. Flowchart for function WriteFlashByte().

WriteFlashByte() Input address valid No write address? Yes Store EEPROM interrupt mask and disable EEPROM interrupt. Wait for EEPROM to complete. No Flash recovery option enabled? Yes Clear Flash recovery status variable in EEPROM Read Flash page, replace one byte, fill Flash temporary buffer Erase & Write new data to Flash recovery page Store Flash page address in EEPROM Write "BUFFER FULL ID" to Flash recovery status variable in EEPROM Read Flash page, replace one byte, fill FLASH temporary buffer Erase & Write new data to Flash page Clear Flash recovery status Yes Flash recovery variable in EEPROM option enabled? No Restore EEPROM interrupt mask Return TRUE Return FALSE,

Figure 5. Flowchart for function WriteFlashPage().

WriteFlashPage() Input address valid No write address? Yes Store EEPROM interrupt mask and disable EEPROM interrupt. Wait for EEPROM to complete. No Flash recovery option enabled? Yes Clear Flash recovery status variable in EEPROM Fill Flash temporary buffer Erase & Write new data to Flash recovery buffer Store Flash page address in EEPROM Write "BUFFER FULL ID" to Flash recovery status variable in EEPROM Fill Flash temporary buffer Erase & Write new data to Flash page Clear Flash recovery status Yes Flash recovery variable in EEPROM option enabled? No Restore EEPROM interrupt mask Return TRUE Return FALSE 8 AVR106,

AVR106 Figure 6. Flowchart for function RecoverFlash().

RecoverFlash() Status variable == No "BUFFER FULL ID"? Yes Write Flash recovery buffer to Flash temporary buffer Erase & Write new data to Flash page given by address variable in

EEPROM

Clear Flash recovery status variable in EEPROM Return TRUE Return FALSE,

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 Tel: (33) 4-76-58-30-00 Chinachem Golden Plaza ASIC/ASSP/Smart Cards 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: Atmel Corporation makes no warranty for the use of its products, other than those expressly contained in the Company’s standard warranty which is detailed in Atmel’s Terms and Conditions located on the Company’s web site. The Company assumes no responsibility for any errors which may appear in this document, reserves the right to change devices or specifications detailed herein at any time without notice, and does not make any commitment to update the information contained herein. No licenses to patents or other intellectual property of Atmel are granted by the Company in connection with the sale of Atmel products, expressly or by implication. Atmel’s products are not authorized for use as critical components in life support devices or systems. © Atmel Corporation 2004. All rights reserved. Atmel® and combinations thereof, AVR® , and AVR Studio® are the registered trademarks of Atmel Corporation or its subsidiaries. Microsoft® , Windows® , Windows NT® , and Windows XP® are the registered trademarks of Microsoft Corporation. Other terms and product names may be the trademarks of others]
15

Similar documents

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
AVR241: Direct driving of LCD display using general IO
AVR241: Direct driving of LCD display using general IO Features • Software driver for displays with one common line • Suitable for parts without on-chip hardware for LCD driving • Control up to 15 segments using 16 IO lines • Fully interrupt driven operation Introduction As a low power alternative t
8-bit Microcontroller Application Note
8-bit Microcontroller Application Note Rev. 0938B–AVR–01/03 AVR204: BCD Arithmetics Features • Conversion 16 Bits ↔ 5 Digits, 8 Bits ↔ 2 Digits • 2-digit Addition and Subtraction • Superb Speed and Code Density • Runable Example Program Introduction This application note lists routines for BCD arith
8-bit Microcontroller Application Note
8-bit Microcontroller Application Note Rev. 2530B–AVR–01/04 AVR065: LCD Driver for the STK502 and AVR Butterfly Features • Software Driver for Alphanumeric Characters • Liquid Crystal Display (LCD) Contrast Control • Interrupt Controlled Updating • Conversion of ASCII to LCD Segment Control Codes (S
8-bit Instruction Set Instruction Set Nomenclature
8-bit Instruction Set Rev. 0856D–AVR–08/02 Instruction Set Nomenclature Status Register (SREG) SREG: Status Register C: Carry Flag Z: Zero Flag N: Negative Flag V: Two’s complement overflow indicator S: N ⊕ V, For signed tests H: Half Carry Flag T: Transfer bit used by BLD and BST instructions I: Gl
8-bit Microcontroller Application Note
8-bit Microcontroller Application Note Rev. 0933B–AVR–05/02 AVR102: Block Copy Routines Features • Program Memory (Flash) to SRAM Copy Routine • SRAM to SRAM Copy Routine • Extremely Code Efficient Routines Flash → SRAM: 6 Words, SRAM → SRAM: 5 Words • Runable Test/Example Program Introduction This
Novice’s Guide to AVR Development intended for
Novice’s Guide to AVR Development Preparing your PC for AVR Development Basic AVR Knowledge An Introduction Let's make an easy start, and download the files that we will need later on. The AVR Microcontroller family is a modern architecture, with all the bells andFirst you should download the files
AVR079: STK600 Communication Protocol
AVR079: STK600 Communication Protocol Features 8-bit • Supported Commands and Command options • Command and Answer package formats Microcontrollers 1 Introduction Application Note This document describes the STK®600 protocol. The firmware is distributed with AVR Studio® 4.14 or later. The definition
8-bit Instruction Set Instruction Set Nomenclature
8-bit Instruction Set Rev. 0856G–AVR–07/08 Instruction Set Nomenclature Status Register (SREG) SREG: Status Register C: Carry Flag Z: Zero Flag N: Negative Flag V: Two’s complement overflow indicator S: N ⊕ V, For signed tests H: Half Carry Flag T: Transfer bit used by BLD and BST instructions I: Gl
Designer’s Designing for Efficient Production Corner with In-System Re-programmable Flash µCs
Designer’s Designing for Efficient Production Corner with In-System Re-programmable Flash µCs By: OJ Svendlsi always the component where the majority of the engi- neering hours are spent. Thus, making sure the micro- For products where time-to-market and efficient pro- controller has what it takes t
AVR069: AVRISP mkII Communication Protocol
AVR069: AVRISP mkII Communication Protocol Features • General commands • ISP commands • Return values • Parameters 1 Introduction This document describes the AVRISP mkII protocol. The firmware is distributed with AVR Studio 4.12 or later. Download the latest AVR Studio from the Atmel web site, http:
Studio® Integrated Development A COMPLETE SOFTWARE ENVIRONMENT TO Environment DEVELOP AVR® APPLICATIONS. IT’S FREE!
MICROCONTROLLERSStudio® Integrated Development A COMPLETE SOFTWARE ENVIRONMENT TO Environment DEVELOP AVR® APPLICATIONS. IT’S FREE! AVR Studio® is an Integrated Development Environment for writing and debugging AVR applications in Windows® 98/XP/ME/2000 and Windows NT® environments. AVR Studio provi
Hexadecimal Object File Format Specification
Hexadecimal Object File Format Specification Revision A January 6, 1988 This specification is provided "as is" with no warranties whatsoever, including any warranty of merchantability, noninfringement, fitness for any particular purpose, or any warranty otherwise arising out of any proposal, specifi
AVR914: CAN & UART based Bootloader for AT90CAN32, AT90CAN64, & AT90CAN128 1. Features
AVR914: CAN & UART based Bootloader for AT90CAN32, AT90CAN64, & AT90CAN128 1. Features • UART Protocol 8-bit – UART used as Physical Layer – Based on the Intel Hex-type records Microcontrollers – Auto-baud • CAN Protocol – CAN used as Physical Layer Application Note – 7 re-programmable ISP CAN ident
AVR Microcontrollers Application Note
AVR Microcontrollers Application Note AVR495: AC Induction Motor Control Using the Constant V/f Principle and a Space-vector PWM Algorithm 1. Features • Cost-effective and energy efficient 3-phase induction motor drive • Interrupt driven • Low memory and computing requirements 2. Introduction In a p
AVR Microcontrollers Application Note AVR494: AC Induction Motor Control Using the constant V/f Principle and a Natural PWM Algorithm
AVR Microcontrollers Application Note AVR494: AC Induction Motor Control Using the constant V/f Principle and a Natural PWM Algorithm 1. Features • Cost-effective and flexible 3-phase induction motor drive • Interrupt driven • Low memory and computing requirements 2. Introduction Electrical power ha
AVR465: Single-Phase Power/Energy Meter with Tamper Detection
AVR465: Single-Phase Power/Energy Meter with Tamper Detection Features • Cost-Effective and Flexible Single-Phase Energy Meter • Fulfills IEC 61036 Accuracy Requirements for Class 1 Meters • Detects, Signals and Continues to Measure Accurately Under At Least 20 Different Tamper Conditions • Design E
AVR453: Smart Battery Reference Design
AVR453: Smart Battery Reference Design Features • Support for up to 4 Li-Ion series-connected battery cells • Battery protection by dedicated Hardware - Deep under voltage protection - Over-current protection during charging - Over-current protection during discharging - Short circuit protection • C
8-bit Microcontroller Application Note AVR450: Battery Charger for SLA, NiCd, NiMH and Li-Ion Batteries Features
8-bit Microcontroller Application Note Rev. 1659B–AVR–11/02 AVR450: Battery Charger for SLA, NiCd, NiMH and Li-Ion Batteries Features • Complete Battery Charger Design • Modular “C” Source Code and Extremely Compact Assembly Code • Low Cost • Supports Most Common Battery Types • Fast Charging Algori
Getting started with the AVR battery charger reference design.
Getting started with the AVR battery charger reference design. The AVR battery charger reference design is designed for use with several types of batteries and various number of battery cells. The AVR battery charger reference design is supplied with resistor values for scaling down the charge volta
8-bit Microcontroller Application Note
8-bit Microcontroller Application Note Rev. 2534A–AVR–05/03 AVR415: RC5 IR Remote Control Transmitter Features • Utilizes ATtiny28 Special HW Modulator and High Current Drive Pin • Size Efficient Code, Leaves Room for Large User Code • Low Power Consumption through Intensive Use of Sleep Modes • Cos
AVR336: ADPCM Decoder
AVR336: ADPCM Decoder Features • AVR Application Decodes ADPCM Signal in Real-Time • Supports Bit Rates of 16, 24, 32 and 40 kbit/s • More Than One Minute Playback Time on ATmega128 (at 16 kbit/s) • Decoded Signal Played Using Timer/Counter in PWM Mode 1 Introduction Adaptive Differential Pulse Code
8-bit Microcontroller Application Note
8-bit Microcontroller Application Note Rev. 1181B–AVR–04/03 AVR360: Step Motor Controller Features • High-speed Step Motor Controller • Interrupt Driven • Compact Code (Only 10 Bytes Interrupt Routine) • Very High Speed • Low Computing Requirement • Supports all AVR Devices Introduction This applica
8-bit RISC Microcontroller Application Note AVR335: Digital Sound Recorder with AVR and Serial DataFlash Features
8-bit RISC Microcontroller Application Note Rev. 1456B–01/04 AVR335: Digital Sound Recorder with AVR and Serial DataFlash Features • Digital Voice Recorder • 8-bit Sound Recording • 8 KHz Sampling Rate • Sound Frequency up to 4000 Hz • Maximum Recording Time 2 1/4 Minutes • Very Small Board Size • O
USB in a Nutshell. Making Sense of the USB Standard.
USB in a Nutshell. Making Sense of the USB Standard. Starting out new with USB can be quite daunting. With the USB 2.0 specification at 650 pages one could easily be put off just by the sheer size of the standard. This is only the beginning of a long list of associated standards for USB. There are U
What is USB Enumeration? What does enumeration look like?
What is USB Enumeration? Enumeration is the process by which a USB device is attached to a system and is assigned a specific numerical address that will be used to access that particular device. It is also the time at which the USB host controller queries the device in order to decide what type of d