Base on previous article, there are 2 common types of non-volatile memory:-
SDRAM & SRAM.
SRAM stands for static random access memory. The internal circuit is base on flip-flop. It means it require a lot of transistor to represent a bit of memory.
SRAM advantage:-
- fast access time
- low static power, when there's no access to the memory, it wont drain much power
SRAM disadvantage:-
- expensive, because of many transistor it use, it use high silicon real-estate.
SDRAM stands for synchronous dynamic random access memory. It is most common type of non-volatile memory that you would find on most design. It is base on capacitor to represents a bit. Due to it capacitor base, it require some refreshing to keep the memory.
SDRAM advantage
- very cheap, (cost for 1 byte)
- a lot of R & D been done to improve it's speed comparable to SRAM
SDRAM disadvantge
- need complicated interface to access the memory. Normal I/O bus cannot access SDRAM directly. Usually there will be a SDRAM controller to access it and it require complex configurations.
- it require constant refreshing due to it's capacitive nature. this make the memory consume high power during static operations. The refereshing is usually been handle by the SDRAM controller.
Will SRAM become obsolete..?
If you look some of the embedded design, you sometimes could see design that have both SDRAM and SRAM. Usually for SRAM, it mention "battery backup SRAM". In application that require important data not to be lost, during power outage we to use SRAM backup by battery. This is possible due to it's low static power consumption.
Thursday, May 28, 2009
Tuesday, May 26, 2009
Memory

Memory is place where we store what we call 'data'. Memory divided into 2 main categories.
1) Volatile
2) Non-Volatile
Volatile Memory
Volatile memory basically define as memory that its contents loss if the power to the memory gone. Example of such memory is:-
- SRAM (Static Ram)
- SDRAM or DRAM (Dynamic Random Access Memory)
Non-Volatile Memory
Non-volatile memory basically defines as memory that it's contents will not erase even when the power is gone. Example such memory is:-
- PROM, EEPROM
- Flash
Why not use everything non-volatile?
It will be very good if we could use all the memory in our design as non-volatile. The main issue to do this is speed. Non-volatile memory work much slower than volatile especially during write operations.
Both of this memory also are access differently. All volatile memory can be access randomly. Random access means that any memory location can be read on one instructions. Unlike flash memory, it need to be access semi-sequential. To read a particular byte from the memory, you need to read the whole page of the flash. In flash memory, page is group of 512bytes or 256bytes.
Internal & External Memory
If you look at the datasheets of MCU, it will specify something like internal SRAM - xxx kB, internal program memory - xxx kB. This means that both type of memory is inside the MCU IC itself. But this doesn't mean that the amount of memory it have is limit by that. Sometimes you could have some of the memory internal and some external. The limit of memory space basically depend on how big the address bus is. 16bit address line can adress up to 64K and 32bit can goes up to 4GB.
Sunday, May 24, 2009
Inter IC communications
When design board for embedded applications, very seldom we are lucky that we only require to use one IC that able to meet our requirement. Most of the time, we need to use several IC and these IC need to communicate between one and another.How does it communicate ?
What we learn from data communications class, communications are either serial or parallel.
I'm not gonna explain how each types works, because you could also read it from wikipedia.
I basically will explain several standard that usually use in embedded design.
Serial
Serial are basically for low speed communications. Typical example is use when communicate with EEPROM IC, digital potential meter, low speed ADC & DAC, PLL, etc. Common standard for serial is
I²C
This is standard develop by philips and widely use in a lot of applications. It only require 2 wire for biderectional (half duplex) data transfer and can have communicatins of single master and multiple slave. Slave is addresable using 7bit, slave addrees. Typical speed is around 100kbits/sec and go also go up to 400kbits/sec. I've once develop a device that generate I²C signal to control a PLL IC inside a tv tuner. Inside Linux kernel already have the driver for I2C. You could go to http://www.i2cbus.com/ to look for the standard or wiki it for more detail explaination.
SPI, Serial Perihperal Interface
This standard is develop by motorola and widely use also like the I2C. The main advantage over I²C is it offer full duplex com,unications. But it use more wire, minimum 4 for duplex communications. It also master-slave communications but to add slave need to add extra CS (chip select line).
I2S & AC97
This standard is common use for audio applications (codec). It is use to transport PCM data between codec.
Parallel
Parallel communications are much faster than serial. Because it is parallel, it use more line for data transfer and take up more space on the PCB.
I/O bus
When we talk about I/O bus it can be both memory and normal I/O. For memory device like SDRAM, it communicate with the SDRAM controller which has it own spec. Other I/O device like the SRAM, UART, RTC usually communicate what is call I/O bus. I/O bus come into 2 variants:- Intel style or Motorola style. Both style can be interoperate by applying some simple logic. Most of my work, I use Intel style but I learn Motorola style using my study.
Many device can communicate sharing the same bus but the I/O address must be configured early during installation. If you look at "device manager" inside windows, go to COM1 or LPT1 properties, you will see their base address, such as 0x378. If you change the number, the device wont work because the address decoder inside the device already set to acknowledge that address. There's no spec on how big the address space or how big the data bus but usally either 8bit or 16bit.
PCI
PCI device was develop to replace ISA bus. As a replacement for ISA, it must be faster and solve the base address configurations issue. PCI bus communicate at 33Mhz clock minimum on 32bit/64bit address bus. The 33Mhz, 32bit can give data rate of 132Mbytes/sec. It has plug and play capability, meaning that the base address is assign at during the bootup of the sysem. Detail spec and implementation of the bus is widely available on the net.
What we learn from data communications class, communications are either serial or parallel.
I'm not gonna explain how each types works, because you could also read it from wikipedia.
I basically will explain several standard that usually use in embedded design.
Serial
Serial are basically for low speed communications. Typical example is use when communicate with EEPROM IC, digital potential meter, low speed ADC & DAC, PLL, etc. Common standard for serial is
I²C
This is standard develop by philips and widely use in a lot of applications. It only require 2 wire for biderectional (half duplex) data transfer and can have communicatins of single master and multiple slave. Slave is addresable using 7bit, slave addrees. Typical speed is around 100kbits/sec and go also go up to 400kbits/sec. I've once develop a device that generate I²C signal to control a PLL IC inside a tv tuner. Inside Linux kernel already have the driver for I2C. You could go to http://www.i2cbus.com/ to look for the standard or wiki it for more detail explaination.
SPI, Serial Perihperal Interface
This standard is develop by motorola and widely use also like the I2C. The main advantage over I²C is it offer full duplex com,unications. But it use more wire, minimum 4 for duplex communications. It also master-slave communications but to add slave need to add extra CS (chip select line).
I2S & AC97
This standard is common use for audio applications (codec). It is use to transport PCM data between codec.
Parallel
Parallel communications are much faster than serial. Because it is parallel, it use more line for data transfer and take up more space on the PCB.
I/O bus
When we talk about I/O bus it can be both memory and normal I/O. For memory device like SDRAM, it communicate with the SDRAM controller which has it own spec. Other I/O device like the SRAM, UART, RTC usually communicate what is call I/O bus. I/O bus come into 2 variants:- Intel style or Motorola style. Both style can be interoperate by applying some simple logic. Most of my work, I use Intel style but I learn Motorola style using my study.
Many device can communicate sharing the same bus but the I/O address must be configured early during installation. If you look at "device manager" inside windows, go to COM1 or LPT1 properties, you will see their base address, such as 0x378. If you change the number, the device wont work because the address decoder inside the device already set to acknowledge that address. There's no spec on how big the address space or how big the data bus but usally either 8bit or 16bit.
PCI
PCI device was develop to replace ISA bus. As a replacement for ISA, it must be faster and solve the base address configurations issue. PCI bus communicate at 33Mhz clock minimum on 32bit/64bit address bus. The 33Mhz, 32bit can give data rate of 132Mbytes/sec. It has plug and play capability, meaning that the base address is assign at during the bootup of the sysem. Detail spec and implementation of the bus is widely available on the net.
Wednesday, May 20, 2009
Open source design
I believe we all now quite familiar what open source means. It's been quite a while in the IT industry. Lately there's also been a lot of open source embedded system design. Old design of router or other stuff is release to the web. We can have the complete design document like schematics, PCB drawing, BOM list, firmware, etc.
I wont discuss on which is better between proprietary and open source. They already plenty article about it already.
What is good about open source design?
The good things for sure is, it accelerate the learning process. For people that try to learn about embedded system design, they have source of reference. You could try step by step to develop board and make it work. Along the process you will learn a lot of things. Below is example of few open source design in embedded applications:
Lego Mindstorm
http://mindstorms.lego.com/Overview/NXTreme.aspx
Megasquirt (Open source fuel injection system)
http://www.megasquirt.org/megasquirt.html
Linksys WRT router series
http://openwrt.org
If you have the resource, you could develop the board base on it. Even you don't design it from scratch, to able to make it work is already a huge success.
I wont discuss on which is better between proprietary and open source. They already plenty article about it already.
What is good about open source design?
The good things for sure is, it accelerate the learning process. For people that try to learn about embedded system design, they have source of reference. You could try step by step to develop board and make it work. Along the process you will learn a lot of things. Below is example of few open source design in embedded applications:
Lego Mindstorm
http://mindstorms.lego.com/Overview/NXTreme.aspx
Megasquirt (Open source fuel injection system)
http://www.megasquirt.org/megasquirt.html
Linksys WRT router series
http://openwrt.org
If you have the resource, you could develop the board base on it. Even you don't design it from scratch, to able to make it work is already a huge success.
Friday, May 15, 2009
Reinventing the wheel?
Do you need to reinvent the wheel? In my opinion, yes you do. You just reinvent a better wheel. I heard from someone that, if you want to apply for a government technology grant, you must come out with a very solid proposal. Come out with something that people never did before. On top of that, the stuff you want to develop must have commercialization value. If you go through the title name that manage to get the grant, you notice it look so bombastic. What happen to them now?
Being the first doesnt mean you will be the last to stay there. If you look at history, Microsoft Windows is not the first, you propabaly heard of Apple Lisa. Why would Microsoft create the same thing that flop 10 years ago. The answer is, Microsoft learn from their mistake and improve. This means that, being the first, make u a guniea pig and guniea pig usually die at the end of the experiment. Microsoft never really the first in everthing, your probaly know Excel rather than Lotus 123, Access than dBase, Word than Wordperfect, Wordstar. If you are a programmer, I bet you know Visual Studio than Borland. They are sucessful because they make a better software and clever business strategies. They reinvent a better wheel.
Another good example is China. China now start to dominate the telecomunications industry. More and more backend server in the world start to use their brand. Name like Huawei or ZTE is no longer uncommon to telecomunications engineer. They make same equipment done before by Cisco, Alcatel, Ericsson, Nokia, etc. They came late to the market, but still manage to overtake. They are example of what Warren Buffet said "value propositon". It basically means, to win the market; 1) You make a product that price the same but have more extra features than competitor. or 2) You make product same features like the competitor but cheaper.
Being the first doesnt mean you will be the last to stay there. If you look at history, Microsoft Windows is not the first, you propabaly heard of Apple Lisa. Why would Microsoft create the same thing that flop 10 years ago. The answer is, Microsoft learn from their mistake and improve. This means that, being the first, make u a guniea pig and guniea pig usually die at the end of the experiment. Microsoft never really the first in everthing, your probaly know Excel rather than Lotus 123, Access than dBase, Word than Wordperfect, Wordstar. If you are a programmer, I bet you know Visual Studio than Borland. They are sucessful because they make a better software and clever business strategies. They reinvent a better wheel.
Another good example is China. China now start to dominate the telecomunications industry. More and more backend server in the world start to use their brand. Name like Huawei or ZTE is no longer uncommon to telecomunications engineer. They make same equipment done before by Cisco, Alcatel, Ericsson, Nokia, etc. They came late to the market, but still manage to overtake. They are example of what Warren Buffet said "value propositon". It basically means, to win the market; 1) You make a product that price the same but have more extra features than competitor. or 2) You make product same features like the competitor but cheaper.
Subscribe to:
Posts (Atom)