Showing posts with label RAM. Show all posts
Showing posts with label RAM. Show all posts

Sunday, September 12, 2010

Bits on AVR

Memory
The ATMega memory consists of three parts:
● Data memory of SRAM : used for temporary storage of data values
● Program memory, which is a Flash Memory, that can be rewritten up to 10,000 times
● Finally the EEPROM memory, which is used for permanent storage of data values or initial parameters for the microcontroller.
In-System Programmable flash
--can easily program chips, even while in-circuit.
Many peripherals:
a whole bunch of internal and external interrupt sources and peripherals are available on a wide range of devices (timers, UARTs, ADC, watchdog,etc.).
32 registers:
The 32 working registers (all directly usable by the ALU) help keep performance snappy, reducing the use of time consuming RAM access.
Internal RC oscillators can be used on many chips to reduce part count further.
Flexible interrupt module with multiple internal/ external interrupt sources.
Multiple power saving modes.


Tuesday, June 22, 2010

What is a microcontroller....?

What is a microcontroller?

A micro consists of:

  • Flash ROM memory for holding your program, they call it non-volatile cause it will retain your program even when power goes off. Next time it powers up, your code will run again. However, it is electrically erasable so you may use your programmer to program it and re-program it and …
  • RAM memory for holding runtime data, say variables that change during execution and are not to be remembered forever, they will be lost when power goes off.
  • EEPROM non-volatile memory for those variables that are to be remembered when power goes off. You may access the micro's EEPROM either in advance when you program the micro or during runtime.
  • CPU/ALU the processing unit for doing arithmetic and logical operations amongst other things. Mainly these other things are controlling program flow (yes these ifs and fors you know from high level languages) but also for transferring data within the microcontroller.
  • Peripherals that are dedicated for various purposes, e.g the I/O ports are for turning pins on and off, USART is for communicating serially with another device (may be a PC), SPI is another serial protocol but for board level communication (short distance), interrupts are for getting external events asynchronously with our program flow, timers for measuring time, ADC for measuring analog quantities and the list goes on …
  • Registers hold 8-bit values and come into two flavors. Dedicated, which are used for configuring the operation of the micro and its peripherals. General purpose, working together with the ALU for storing temporarily results.
  • Clock is used by the micro for synchronizing all its operations. The clock is basically a train of square pulses at certain frequency, in our case 7.3728MHz. It is usually an external crystal, but one may use the internal clock.
AVRs are produced by ATMEL, you may go there and download the datasheet of a micro of AVR series, have a look at the application notes as well. Be careful not to be scared by the vast amount of information. We need only specific set of informations for each application.