Table of Contents Memory Controller (MCU) It is a digital circuit that manages the flow of data going to and from the computer main memory. MCU can be a separate chip or integrated into another chip such as being placed on the same die of a microprocessor. In the latter case it is known as an integrated memory controller. Memory controller is also called a Memory Chip Controller(MCC) or Memory Control Unit.(MCU). Now Main memory can be directly or indirectly connected to the CPU via memory bus. Is the only memory that is directly accessible to CPU The CPU continuously reads instructions stored in Main Memory and executes them as required. Types of Main Memory/Primary Storage are: RAM(Random Access Memory) Processor Registers Processor Cache Processor Registers: are located inside the processors and are the fastest accessible memory by CPU of computers data storage. Processor Cache / cache memory: is intermediate stage b/w Processor registers and RAM. Most actively used information in the RAM is stored in the cache memory. Random Access Memory(RAM): is a main memory which is directly accessible by CPU (though it is slowest of the above mentioned Primary Storage). RAM(Random Access Memory) It is volatile memory that loses content on power off. It is the main memory with the largest size and it stores the working data and machine code. (Machine Code – is instruction that can be executed directly by CPU. Each instruction tells the CPU to perform a task like load, store, jump or ALU operation on the data of Processor Register or Processor Core) So RAM stores the instructions and the data on which instruction has to be done. When the computer is turned on, it loads data to RAM. Programs that are currently running are stored in RAM. Now, there are 2 main types RAM: SRAM 2) DRAM As the RAM types used for Primary storage are volatile, a computer containing only such storage would not have a source memory to read instructions from, in order to start the computer. Hence the non – volatile primary storage containing a small start-up program(BIOS) is used to bootstrap the computer.The non-volatile technology used for this purpose is ROM(Read Only Memory). ROM( Read Only Memory) It stores the program that is rarely changed during the life of the system and it contains the data for initialising the system and also user application program. → When Powered on CPU has no software in its main memory (as main memory mainly RAM: that tells the instructions to CPU, is volatile in nature) → ROM stores the initial program that runs when the computer is powered on. → The computer first executes a relatively small program stored in ROM(Read Only Memory) along with a small amount of data, to access the non-volatile devices. In short ROM contains the program that allows a computer to startup each time it is turned on. ROM also performs large Input/Output tasks and perform programs or software instructions.
Table of Contents Introduction Most of the viewers reading this blog must have known the word NodeMCU or esp8266 WiFi chip. For those who don\’t know just for the introduction, it is a WiFi chip that is connected with the embedded products that give u the feature of wireless communication in your device. Now there are many tutorials and resources (getting started with esp8266, how to make and add WiFi functionality on your project using esp8266 and NodeMCU ) which are just one google search with full source codes and circuitry. The content of this blog is not related to any tutorial. The thing which comes to my mind when I first get to know about esp8266 is What is the working and technology behind a device which connects to our WiFi ( like WiFi is a wireless communication which is more raw language we can say a bunch of electromagnetic waves which are radio waves or radio frequency in wireless communication). We have wifi-connected devices everywhere around us in laptops, phones, watches, etc. How does a small IC( here talking in reference to esp8266) which is about the size of our finger connect to these electromagnetic waves and also decode them ??? What is the basic classification of these chips ??? What are the hardware and software tools which are needed for them???? and many such things that actually the whole hardware and software is set up for programming these chips and using in our embedded device. So this blog will be all about answers to these questions, as an understanding of these things will get u knowledge that how in actual a controller(like Microcontroller, Soc, etc) is interfaced with the outside world. As esp8266 is open source so there are many resources and tutorials given for it but what if we need to integrate a controller or any wireless chip that is not open source ( like in our laptops, smartwatches, smartphones) and also there are many WiFi chips other than esp8266 which are used in our embedded products and which are not open source. So to have an understanding of the whole hardware and software environment for an embedded developer is important to concern. As understanding, these things will get u knowledge that how in actual a controller( like Microcontroller, Soc, etc) is interfaced with the outside world. Hardware Development Kit / Hardware Setup Esp8266 is a standalone wifi MCU or Wireless SoC that connects to wireless network internet. It is produced by Espressif Systems in Shanghai, China. After reading this definition of esp8266 i got a question that how MCU connects to our wireless communication ( basically radio waves ) as in most simple words u can say that MCU is a bunch of transistors which are miniaturized in a single IC and transistor is a device which is used for switching purpose or amplification . Now these transistors are miniaturized in a small IC using RF-CMOS technology which integrates our radio frequency with the electronic circuits(which are made up of transistors ). This RF-CMOS technology is the reason behind we today have wireless communication like WiFi, Lora, cellular communication. Now this MCU requires some external circuit like reset circuit, crystal oscillator to make this MCU work ( just like we make a circuit for boot-loading the AVR MCU) and that circuit is what we call as WiFi modules e.g. esp01 -12 series of modules (made by third party manufacturer AI thinker labs) and ES Wroom-02 series of modules made by Espressif Systems. Now, these modules are integrated with an external circuit like a voltage regulator, USB to UART interface controller for connecting the host computer for programming the esp8266 chip. This integration of modules with these circuits is development boards. Most common and popular development boards are NodeMCU, Bolt IOT, Adrafruit huzzah esp8266 breakout, etc. Software Tools and Environment Setup Classification In Embedded systems when programming on a controller, there is a need for toolchains, Software Development Kits(SDK), Integrated Development Board for creating the software environment to upload the programs or firmware into it. Tool-chain – Is a set of all programming tools that are used to perform a complex software task or to create a software environment for a controller in embedded systems. These programming tools can be IDE, Compiler, debugger, etc, Software Development Kit (SDK)- This includes the necessary building blocks for developing applications. This includes the framework, libraries, Header files, Compiler, Debuggers, DLL libraries, and other tools to compile source code into the executable program. One can write Source Code in any text editor and build our program using the tools of SDK. Integrated development environment (IDE)- integrates all these SDK features, including the compiler into the GUI interface which makes it easier for the user to access all these features and easy to develop Software. The main concern here is that when we want to write programs for a controller in embedded systems there are many tool-chains available for them and tool-chain forms our software environment. Now in the tool-chain, our IDE comes which is the software application that contains all the tools and files required for programming the controller like the ARDUINO IDE provides a tool-chain to a number of controllers -AVR, SAM, NRF52 , esp8266 MCU and many others. And our IDE contains the SDK and makes them in GUI interface for user friendly. Also Some Tool-chain use the command-line interface in which commands are written instead of clicking the icons by going to the path directory of the SDK. To be noted down: Now for esp8266 the most common and popular tool-chain is using the Arduino IDE. Software Environment for esp8266 Now there are many tool-chains for programming the esp8266, we can program esp8266 in python as well as C,C++ language depending upon the tool-chain we chose. like 1) Using Arduino IDE – A C++-based firmware. With this core, the ESP8266 CPU and its Wi-Fi components can be programmed like any other Arduino device. The ESP8266 Arduino