Tuesday, January 25, 2011

Difference between DYNAMIC_RAM and STATIC_RAM:

RAM ( Random Access Memory )

first we will get cleat with word RANDOM means in RAM- IT means that you can access any address of RAM randomly .(ie., you can go to particular address directly )
There is another type of called SERIAL ACCESS MEMORY - In this you should go to a particular address serially . (example - If address is '10' and now you are at '4', you cant goto '10' directly, you should go serially like 5,6,7,8,9 and then to 10 .

Difference:

Memory means storage of bits, right! .

In DYNAMIC_RAM bits are stored in the form of charge in the capacitor .
As capacitor discharges it should be refreshed frequently to store the value correctly.
so there should be one unit which refreshes every memory cell frequently, thats why dynamic_RAMs are slow .

In static_RAM the bit is stored in a Flip_Flop.
one flip flop needs 6 to 8 transistors to store a bit, so static_RAMs are costly compared to Dynamic_RAMs which use only one transistor and a capacitor to store a bit.

static_RAMs are faster compared with Dynamic_RAMs

Difference between DYNAMIC_RAM and STATIC_RAM:

RAM ( Random Access Memory )

first we will get cleat with word RANDOM means in RAM- IT means that you can access any address of RAM randomly .(ie., you can go to particular address directly )
There is another type of called SERIAL ACCESS MEMORY - In this you should go to a particular address serially . (example - If address is '10' and now you are at '4', you cant goto '10' directly, you should go serially like 5,6,7,8,9 and then to 10 .

Difference:

Memory means storage of bits, right! .

In DYNAMIC_RAM bits are stored in the form of charge in the capacitor .
As capacitor discharges it should be refreshed frequently to store the value correctly.
so there should be one unit which refreshes every memory cell frequently, thats why dynamic_RAMs are slow .

In static_RAM the bit is stored in a Flip_Flop.
one flip flop needs 6 to 8 transistors to store a bit, so static_RAMs are costly compared to Dynamic_RAMs which use only one transistor and a capacitor to store a bit.

static_RAMs are faster compared with Dynamic_RAMs

Friday, January 21, 2011

How to check a ROM of a micrcontroller?

First of all checking means what?
-dump some code into the rom and seeing weather it is saved correctly or not.

process:
-we are going to use concept called "CHECKSUM CALCULATION" .
-Checksum process uses a byte called "CHECKSUM_BYTE".
-Checksum_byte is the extra byte tagged at the end of series of bytes of data.

process to calculate checksum_byte:
-Add the code bytes together and drop the carry .
-Then take the 2's complement of the total sum it becomes the last byte of the series.

How to perform Checksum Operation:
-Add all the bytes including the checksum byte, the result should be zero.
-If not zero then one or more bytes has been changed.


Small Example:
Assume that we have 4 bytes of hexadecimal data: 25H, 62H, 3FH, and
52H.
(a) Find the checksum byte,
(b) perform the checksum operation to ensure data integrity, and
(c) if the second byte 62H has been changed to 22H, show how checksum detects the error.
Solution:
(a) Find the checksum byte.

25H+62H+3FH+52H=118H .
By droping the carry we get 18H.
checksum_byte = 2's complement of 18H i.e., E8H
Therefore we got the checksum_byte = E8H

(b) performing the checksum operation

25H+62H+3FH+52H+E8H= 200H . Dropping the carry we get 00H ie., no byte is corrupted. (indirectly ROM is good)

(c) If second byte 62H is changed to 22H then,

25H+22H+3FH+52H+E8H= 1C0H . Dropping the carry we get C0H which is not zero ,which means one or more bytes are corrupted.



Once we had dis in our external exams and at that time I was aware of this concept, and was not able to answer the question .
I finally cracked the answer when I was really going deep into the subject .

Here's the proces:

How to check a ROM of a micrcontroller?

First of all checking means what?
-dump some code into the rom and seeing weather it is saved correctly or not.

process:
-we are going to use concept called "CHECKSUM CALCULATION" .
-Checksum process uses a byte called "CHECKSUM_BYTE".
-Checksum_byte is the extra byte tagged at the end of series of bytes of data.

process to calculate checksum_byte:
-Add the code bytes together and drop the carry .
-Then take the 2's complement of the total sum it becomes the last byte of the series.

How to perform Checksum Operation:
-Add all the bytes including the checksum byte, the result should be zero.
-If not zero then one or more bytes has been changed.


Small Example:
Assume that we have 4 bytes of hexadecimal data: 25H, 62H, 3FH, and
52H.
(a) Find the checksum byte,
(b) perform the checksum operation to ensure data integrity, and
(c) if the second byte 62H has been changed to 22H, show how checksum detects the error.
Solution:
(a) Find the checksum byte.

25H+62H+3FH+52H=118H .
By droping the carry we get 18H.
checksum_byte = 2's complement of 18H i.e., E8H
Therefore we got the checksum_byte = E8H

(b) performing the checksum operation

25H+62H+3FH+52H+E8H= 200H . Dropping the carry we get 00H ie., no byte is corrupted. (indirectly ROM is good)

(c) If second byte 62H is changed to 22H then,

25H+22H+3FH+52H+E8H= 1C0H . Dropping the carry we get C0H which is not zero ,which means one or more bytes are corrupted.



Once we had dis in our external exams and at that time I was aware of this concept, and was not able to answer the question .
I finally cracked the answer when I was really going deep into the subject .

Here's the proces: