Skip to main content

Posts

Showing posts from September, 2018

Introduction to Embedded Programming!

In the last sections, we discussed the communication protocols in general and then shifted to discussing the Spi in detail. The last discussions were based on the hardware part of the MCU and Spi peripheral but from this section, we will shift our focus to the software implementation. We have already discussed that any digital circuitry requires binary instructions i.e, we need to provide the machine language(binary) code. Now we can either write our program in assembly language which is more user-friendly than the machine code or we can write in other high-level languages such as C.The assembly code is a low-level code i.e it is much more dependent on the architecture of the processor. Hence the use of a higher-level language such as C is much more efficient as it is portable across all the architectures. There are some cases in which the use of assembly is preferred such as while writing the Reset handlers or accessing the CPU registers, but other than these cases, ...

The Serial Peripheral Interface.

The Spi is one of the most popular communication protocol in the MCU’s. Many of the available components such as an SD card and TFT displays drivers such as ST7735 can be interfaced by using it. This blog will not be centered around any MCU rather it would be just a general overview of the process of data transfer. As discussed in the earlier section, the high-speed data transfer often requires a Sync between the receiver and the transmitter. So this peripheral also requires one line to be the clock. Here it is referred to as the Serial Clock(SCL) line. In every MCU which supports Spi, there will be an SCL line for each of the available Spi’s. Now since we have given a common reference to the MCU’s, we need to have dedicated lines for the data transfer. The Spi is a Full-Duplex communication protocol i.e there are dedicated lines for transferring data as well as receiving it and both transfer and receiving can be done at the same time. It also supports other modes such as the...

Understanding Communication in MCU’s.

This Blog paves a way to understand how Microcontrollers are able to transfer data i.e communicate and it also lays a strong foundation for the upcoming series of blogs which are all related to the specific protocols through which any two MCU’s transfer Information between them. An Embedded system may contain many Mcu’s and hence it becomes very necessary for them to communicate for sharing different information. This blog is a general introduction to various protocols which are involved in the process and in the subsequent blogs we will be focusing on the use of them to communicate our device with many standard devices such as the Sd-Card and the TFT displays. As we know that transfer of Information Requires a transmitter, receiver and a common language.  Here the transmitter and the receiver are the microcontrollers. The common language for such Mcu’s is nothing but the Binary language. There can be two ways in which data is transferred, In the first approach ...

The General Purpose Input/Output.

The GPIO is one of the most frequently encountered acronyms in the embedded domain. It stands for General Purpose Input/Output and exactly does the same thing i.e either it is used to take input or to give output. These are hardware lines which are general purpose in the sense that they are not specifically used for only one functionality by any peripheral. For example, if any MCU contains 8 Gpio’s then one at any given instance one Gpio may be used in taking input from a button, other may be used to give output to an LED and the next one may be used to communicate with other MCU.So by using these Gpio’s an MCU can give/take instructions/inputs from other electronic components such as LED’s, buttons, sensors etc. In a nutshell, the Gpio’s are the mediators through which the internal peripherals such as the different communication protocols, Timers, analog to digital converters can perform there functionalities. In the case of an ADC(Analog to digital converter), It requires a...

Introduction to Microcontrollers.

We often come across these tiny electronic components in our day-to-day  life. These  small Integrated circuits have many applications ranging from your Coffee maker to the ATM  machines. This  blog will be more of an introduction to the world of embedded systems. The term Microcontroller can be understood just by understanding its two components i.e Micro which resembles small size and controller which can be anything used to control/provide instructions to other  components. So  an MCU(microcontroller unit) is a chip which can be used to control various other components such as sensors, relays, Led’s etc. Imagine a scenario in which many people are traveling in a  bus. There  are several locations where any one person may leave the bus and the tickets for different locations are at varying  prices. So  the Conductor of the bus is responsible for providing the tickets to all the passengers and telling the driver when and wh...