I need some help I am confuse, can anybody explain with basics why we use memory in microcontroller.
I am trying to understand with following example
example- I want to run dc motor with switches
I can do with three types
-analog circuit
-digital circuit
-micro controller
1)analog circuit-motor can run with switchs I can do with some transistor, resistor and other analog component
2)Digital circuit -there are two switches and one motor I can use AND Ic
A B c
0 0 0 when all switch are open motor is stop
0 1 0 when one switch is closed motor is stop
1 0 0 when one switch is closed motor is stop
1 1 1 when all switch is closed motor is run
3)microcontroller- I can also use use microcontroller and I can write code
processor-memory-I/o device
here I am confuse
processor- I know processor is use for all arithmetic and logical operations I used AND IC for motor in digital circuit I understood why we use processor
I/O device -switch is input device and motor is output device
memory - there are two type of memory code memory, data memory
code memory- we write code like c, assembly. Ram is used to store data
can anybody explain with basics why we use memory in microcontroller?
I am trying to understand with following example
example- I want to run dc motor with switches
I can do with three types
-analog circuit
-digital circuit
-micro controller
1)analog circuit-motor can run with switchs I can do with some transistor, resistor and other analog component
2)Digital circuit -there are two switches and one motor I can use AND Ic
A B c
0 0 0 when all switch are open motor is stop
0 1 0 when one switch is closed motor is stop
1 0 0 when one switch is closed motor is stop
1 1 1 when all switch is closed motor is run
3)microcontroller- I can also use use microcontroller and I can write code
processor-memory-I/o device
here I am confuse
processor- I know processor is use for all arithmetic and logical operations I used AND IC for motor in digital circuit I understood why we use processor
I/O device -switch is input device and motor is output device
memory - there are two type of memory code memory, data memory
code memory- we write code like c, assembly. Ram is used to store data
can anybody explain with basics why we use memory in microcontroller?