Here you mentioned string of characters, "frog". But if I want to write single character to SRAM ?
For example, I am executing a program
main()
{
char c;
c = 'A';
}
During execution of the above program, C will be given a byte space in the memory.
Then I am assigning a value 'A' to that location.
Yes
My data bus is made up of 32 copper lines. 8 lines would be carrying the 'A' value which has to be written to SRAM.
What data would be carried by the rest of the 24 lines.? ? ?
If the processor can do an eight bit write to memory then the other 24 lines are unused. The memory will ignore them. They may be one, zero, or floating/tristate, it does not matter.
If the processor can only do a 32 bit write then it would first read the word containing the desired byte, modify the byte in that word, and then write it back to memory.
According to my program I just have to write 'A' in the location of variable C.
And that is what it does.
Thanks,