What is Microcontroller Technology??? How to start learning about Microcontrollers technology
I was in my final year of my graduation (Btech:EEE) and our last semester is getting over. It was 26th of May 2022, I was in my college lab with my friends and Hod teacher discussing our Farewell venue and date, at that moment I just checked my phone and I saw a notification on LinkedIn, got a LinkedIn HR mail from one of the Re recruiters of Texas Instruments. I got very excited and happy at that moment. I got so anxious at that moment that I immediately told my best friend and gf, after reading the Job Description. My resume got selected for 2 positions in Texas Instruments, one is of Embedded Application Developer and other is of Field Application Engineer. For the position of Embedded Application Developer, I got the LinkedIn HR mail and from there my profile was selected. For the position of Field Application Engineer, I got a referral from the Alumni of my college, who is Field Application Manager at Texas Instruments. And this happens in a span of 1 week, at first my resume is selected for Embedded Application Developer. The very next day I talked to one of the teachers of my college regarding my selection and then she gave me the reference of Alumni of our college who have been at Texas Instruments for 10 years. On talking to the alumni, he told me that there are positions open in his team for Field Application Engineer. He likes my profile and resume both for that position and he referred to my profile for that position. Though I have called him with an intention to talk about an Embedded Application Developer position, he has referred me for one of the positions open in his team. So my interview process was going on for 2 positions parallel at Texas Instruments. Field Application Engineer Now at first let\’s start with the interview process and experience of a Field Application Developer position, for which I ultimately get selected too and offered with a final offer letter of 25 LPA CTC. Field Application Engineer is a kind of technical sales job, in which the hired person has to provide technical assistance, development and strategies of Company products to customers. So the hired person should have knowledge related to company products. Should also be good in communication skills and interpersonal skills to make long lasting professional relations with company customers. So in this case, Texas Instruments is the company and its products are mainly concentric to Its Wide number of MCU, MPU, IoT modules and ASIC chips. So FAE should have good understanding and knowledge of microcontrollers, system level knowledge of embedded products, IoT protocols, use cases of different peripherals of the MCU. A person should have knowledge of different sub components that are used in the design of Embedded products, but is not necessary to have in depth knowledge as FAE would not be involved in development but much more acts as interface between company and the customer using the company products. 4 rounds were taken, out of which 3 are in online mode and one(last one) is offline mode. For the position of FAE, interview questions are different from what we all normally used to prepare ourselves. The questions are much more to test one\’s personality, communication skills, conceptual questions related to technology. My first round was for about 45 mins, in which the interviewer asked questions related to my journey so far, how I have learnt things on my own, why I chose to get into the technical field and some basic technical questions related to Embedded. Also about 15-20 mins of my first round went into discussion of the Field Application Engineer job role, in which the interviewer told me what exactly would be my roles and responsibilities. I expected that there would be coding questions or questions related to in depth hardware but nothing much like that. And i analyzed that the interviewer was concentric to my communication skills, how well can i address my self, how i well i can interact with people to
See around yourself, we all are surrounded by electronic gadgets around ourselves. The mouse which you are using to navigate through desktop, the Earphones via we all used to listen to music and show off our styles while traveling!!!, the doorbell we ring in homes and see who is outside through video, wireless car keys through which we open our cars, high volume speakers and decks we enjoy dancing on playing the music of our choice when we go to pubs/discos or parties, automation in cars which we see in the forms of lights, automatic systems, high graphics infotainment along with cameras and wireless systems, setup boxes, medical devices like oximeter, sugar, and blood pressure machines. The list will not stop but the size of this blog will get par. All the above examples which I have listed can be termed as Embedded products. Embedded Products are like a silent servants of the modern technological society, as most of the time people are not aware of it but they keep on doing their work Silently and efficiently. One thing in common in all types of Embedded products is the presence of Microcontrollers or Microprocessors. Microcontrollers or Microprocessors are like the brain of embedded products. Microcontrollers or Microprocessors are digital systems as they only understand binary language that is 0 or 1’s. Now the thing that makes these microcontrollers and microprocessors different from the human brain is that we can program these digital systems. Here comes the Embedded Software/Firmware Development. What is Embedded Software/Firmware Development? Basically, the programming that is done into microcontrollers/microprocessors is termed Embedded Software Development. The term Embedded makes this different from traditional Software Development ( Web/App Development).By the term embedded, it means that their is s Embedded products have a constraint of memory, so programming language has to be there that is of less size and easily be converted to binary language of 0 & 1’s. Programming languages that are widely used: are C and CPP language. Microcontrollers/Microprocessors are physical hardware that can be felt, thus Embedded Software Developers do need some hardware knowledge( like that of Electronics and Computers). Now the difference in Embedded Software and Embedded Firmware is not much. Both of these are used interchangeably in embedded domain. Embedded Firmware is used when we are developing programs very close to hardware like: Device driver development, Peripheral Interfacing, Sensors and Modules integration. Embedded Software is much more inclined towards Hardware Abstraction Layers(HAL), RTOSes, Wireless protocol stacks, Code portability on different platforms. Need of Embedded Firmware/Software Development. Embedded Software/Firmware development is niche R&D skill in modern world technology whose scope and demand will only increase with growing technologies. All modern world technologies which we see around ourselves: AR-VR gadgets, Industrial PLC-HMI’s, Next Generation Automotive cars, Internet of Things, Aircrafts, Avionics and many more can only be build by the help of Embedded Software/Firmware Developers. Because it is role of Embedded Software Developers to interact different hardware subsystems interact with each other( through programming and coding) and made the Embedded product work. How to get Started with Embedded Firmware Development. I hope by now you have get bit of clarity and idea about Embedded Firmware Development and its need. Also the kind of industries one can work on after getting this skill. These are very important things to know before actually start learning any skill. As learning a skill is long process and one need good and strong motivation down the line to stay dedicated to learn that skill. Essential things to learn for Embedded Firmware Development. As if now I have talked much about the high end technologies and big flashy words. But now lets get down to basics and actually see how to learn this skill. Essential things to learn for Embedded Software/Firmware Development. C/CPP language–> This is de-facto and most important. As 95 percent of time programming language which is used by embedded developers would be C/CPP language. Both of the languages are more and less same apart from some concepts. Concept of pointers, bit shifting/bit manipulation, functions, types of data types, strings and arrays are the some concepts that should be gone through. Below are some of the books which one can refer for learning basics of C/CPP. Understanding and Using C Pointers: Core Techniques for Memory Management Object-Oriented Programming in Microsoft C++ Pointers on C by Kenneth Reek Computer Architecture and Organization –> Okay so done with programming part, now hardware knowledge plays equally important role. As Embedded Software/Firmware developers will be programming on Microcontrollers (MCU)/Microprocessors (MPU), so knowledge of them is essential. What exactly is Microcontroller? How do they work? Different kind of architectures in MCU/MPU, difference between MPU&MCU, Boot Process in MPU/MCU, getting familiar with terminologies related to MPU/MCU world are some of the thoughts you can start learning about these. Below are some of the books which one can refer for learning about Computer Architecture and Organization. Computer Organization and Architecture: Designing for Performance Computer system architecture by morris mano One of the best ways to learn these languages is by reading already built in codes. 3. Basic Electronics and Electrical knowledge: Okay so this is the part because of which majority of people after starting initially with Embedded Development left it further in college days. As there is role of hardware also, so alongside with programming language having knowledge of electronics and electrical is required sometimes and can be beneficial. In Electronics knowledge of Resistors, Capacitors, Inductors, Basic Ohm’s law (their use cases in real life application: Current sense amplifiers), Opamps, ADC’s would be good as this would make you understand the Embedded product in better way. In Electrical knowledge of AC-DC voltages, power supplies, Power electronics, basic principles of electricity generation and etc is though not always necessary but would be good to have to make your interactive and interesting DIY projects. Below are the books which one can refer for learning about Basic Electronics and Electricals: Get started with Embedded Firmware Development with Gettobyte (To all
What are Peripherals in MCU? What is peripheral driver in MCU? What is sensor/module interfacing in MCU. What is device driver and RTD? What is HAL/BSP? What is Application Software? When people start with Embedded Software development or Firmware development, there are couple of terms which they come across and found them very confusing to understand. Terms which i am targeting in this blog are like Device driver/low level drivers, Application codes, and HAL (Hardware Abstraction layer). To understand these terms, one has to understand that in Embedded systems there are hardware and Embedded Software is a software (take it as a programming) that is done to interact with different hardware devices. Now these hardware devices can be categorized broadly into input devices, processing devices and output devices. Input devices can be out and main These hardware devices would be like can be a complex software and s Device Driver –> First let’s breaks down the are the drivers that interface the 2 hardware’s. Real Time Drivers SDK HAL Application Codes BSP Abstraction layers
In this example, we will make animations by turning off and on Leds with some delays. We could simply do it like this. We could simply do it like this. PORTB=0B10101010; _delay_ms(1000); PORTB=0B01010101; _delay_ms(1000); . . . PORTB=0B01000001; _delay_ms(1000); But instead of writing like this, we would use the function Led_pin( ). It will reduce the typing a bit but in the next blog, we will learn to make it very small by learning a concept called Bit Shifting. Let\’s go for an example. #define F_CPU 16000000UL //defining the clock speed of the processor #include <avr/io.h> // library for using registers [PORTX,PORTD,PINX] #include <util/delay.h> // library for using delay void Led_pin(uint8_t byte) // Making a function with argument \”byte\” having data type unsigned int 8. { PORTB = byte; // Whenever the function is called it will store the argument byte in PORTB with delay. _delay_ms(100); } int main(void) { DDRB = (0b00111110); while(1) { Led_pin(0b00101010); Led_pin(0b00010100); Led_pin(0b00101110); Led_pin(0b00010001); Led_pin(0b00101010); Led_pin(0b00011100); Led_pin(0b00101011); Led_pin(0b00010100); PORTB=0b00000000; _delay_ms(1000); } return(0); } In the above code we made a function Led_pin( ). void Led_pin(uint8_t byte) { PORTB = byte; _delay_ms(100); } Here Led_pin takes a single byte of data type unsigned int [uint8_t]. Whenever our code calls this function the arguments inside it directly go to the PORTB and blink for 100 microseconds asset in delay. OUTPUT If you are new and feeling confused about other libraries and functions then please refer to this blog.
Embedded C is an extremely popular programming language when we talk about electronic devices. If you wanna go for robotics it would be a good start for you. In our day-to-day life, we use mobile, laptops, and fridges every electronic device we use is made up of using embedded C. Now without wasting any time let\’s dive a bit deep into it by looking into a very basic example Blinking LED using Embedded C. Blinking Led is a hello world for embedded C which means this is the first basic code that takes us into the world of embedded C. #define F_CPU 16000000UL#include <avr/io.h>#include <util/delay.h>int main(void){DDRB|= (0B00100000);while (1){PORTB=0B00100000;_delay_ms(1000);PORTB=0B11011111;_delay_ms(1000);}return(0);} Let’s understand our code from top to bottom. #define F_CPU 16000000UL Let’s break it into 3 parts #define F_CPU Here we are defining the clock speed of the processor. 16000000 Here we are setting the clock speed at 16Mhz as our atmega328p’s default value is 1Mhz hence 16Mhz will make it 16 times slower. UL Here we are doing nothing but declaring the data type of the clock speed. We used unsigned long because clock speed cant is negative. #include <avr/io.h> Whenever we want to use libraries of some function from some other source or even we wanna use our own code we use #include. #include <avr/io.h> includes a header file that contains code for using pins, ports, etc. for the Avr microcontroller. #include <util/delay.h> This library is used to put delays in our code. int main(void) The main function is when the AVR starts executing code. While(1) While loops execute the code inside it until the condition inside the parentheses remains true. We all know in C 1 refers to true and 0 refers to false. Here the code inside the while loop will run again and again because 1 can never be false. return(0); If we don\’t write return(0) at the end of the code we will get an error for sure. This happens because our operating system needs confirmation that the code we ran is running properly. This is more of a line of confirmation. You must be wondering what these words DDRB or PORTB are? Well, these are called hardware registers which are extremely important to understand so let\’s get to know what they are and what they do? Hardware Registers In our Atmega series of Avr, we have mainly 3 hardware registers. DDRx PORTx PINx Here x is referred to the bank. We have three of’em B, C, D.Every bank contains 8 pins. Depending on which bank’s pin you are using we chose the bank. DDRx[Data-Direction registers] DDRx configures the pins as output or input. As we are using an 8-bit microcontroller. The default value of the DDR is 0 which means whenever we give power it is not giving any output. If we want to set it for the output we need to set the bit we want to use for sending the output as 1. Output = 1Input = 0DDRB = 0b00000000 DDRB = 0b00100000 Here 0b is telling us that we are writing the number in binary. We all know 0 refers to the ‘off’ and 1 refers to the ‘on’. Hence the above example is telling us at first all pins were off later on we set pin 5 as 1 for giving output. If you are familiar with Arduino Ide then you can relate DDR with pinMode. PORTx[Port x data registers] After setting the DDRx bits to the 1(output), The port registers the voltage as HIGH or LOW. When we say the voltage is Low it means the voltage is 0V and if we say voltage is HIGH we consider the voltage as 5V. HIGH = 1LOW = 0PORTB = 0b00000000 PORTB = 0b00100000 If we take the example of our code we have seen above we are setting pb5 as output. In the picture you can see above PB5 is connected with pin 13 of Arduino. Now you can see we are turning we Led on which is connected with pin 13 which is connected with PB5 on Atmega 328p. If you are familiar with Arduino Ide then you can relate PORTx with digitalWrite. PINx[port c input data pin address] The pin register addresses are used when we want to read the digital voltage values for each pin we set as input in DDRX. You can relate this pin with digitalRead from Arduino IDE. I believe now it\’s clear what we did in the above example. In the next blog, we will see how we can write a function and use it for calling. So that we can reduce our writing.
I2C communication stands for inter-integrated circuits. I2C contains the best features of SPI & UART. It is a synchronous communication protocol. It transmits data serially. It is widely used in microcontrollers, IoT, sensors, displays, and EEPROMs, etc. I2C can be single master multiple slaves and multiple master multiple or single slave. In this blog, we will get to know about I2C in depth. Highlights of I2C I2C works with 2 wires only for communication. SDA [Serial Data]: It is used by the Master and Slave for the transmission or receiving bits. SCL [Serial Clock]: It is used to carry clock signals. I2C can communicate with 2 different methods. Slave selection protocol uses a 7-bit slave address. I2C doesn’t have any fixed length of data transfer. Confirmation after transferring every byte. Full-duplex. How does I2C work? Start Condition To initiate the communication, the master keeps the SCL line high and pulls the SDA line low. If we have more than one master then the one who pulls the SDA line low first will send the data first and if the SDA line is already low then the other masters can not send the data. Addressing Master sends the same address to all the slaves. The slave then compares its own address with this address. If the address doesn’t match with the slave, the slave doesn’t do anything if it does match then the slave sends an acknowledge bit to the master. Read/Write Bit With the address, master sends the read/write bit to all the slaves where 0 indicates a write and 1 indicates a read. If the master wants to read data from the slave then it sends the read bit. If it wants to write then it sends a write bit. ACK/NACK Bit Each frame in a message is followed by an ack/nack bit. If an address frame was successfully received, an ACK bit is returned to the Master from the slaves. THE DATA FRAME When the acknowledge bit is received by the master, the master sends the data frame to the slave which is of 8 bits. After every data frame the slave sents an acknowledge bit to confirm that the data frame has been received successfully. Stop Condition To generate the stop condition master pulls the SCL from high to low and SDA line from low to high. Applications of I2C Communicating with multiple micro-controller. Accessing low-speed DACs[digital to analog converter] and ADCs[analog and digital converter]. Accessing real-time clocks. Reading hardware sensors. Previous Next
Table of Contents These tests are conducted on all electronic/electrical devices and equipment, to make sure they do not make devices next to them malfunction. These tests are those which are conducted to measure the power and frequency of RF emissions from devices and equipment. These emissions are categorized as those under 30MHz and over 30MHz, because of the two primary methods of EM emission from equipment, conducted and radiated. Emission Measuring Instruments Measuring Receiver Conformance tests are taken with receivers which are optimized for the purpose of taking EMC measurements. The average cost of measuring a receiver system between 10kHz to 1GHz range is between $15,000-$60,000. Spot Frequency Receiver- These are hand-held receivers that the operator uses to take readings of emissions of individual frequencies from the EUT. FFT/time Domain Receiver- Fast Fourier Transform is an algorithmic implementation of Fourier Transform that enables the measuring device to take time-domain readings and convert them into real-time frequency spectrum plots. Spectrum Analyzer- This is used to record emissions from the EUT in the full frequency spectrum, within the device’s capability. This is used to confirm the frequency range in which sport frequency reception will be required because due to their full spectrum measurement capability these devices have a small amount of error. Receiver Specifications Figure 1 The new R&S®ESR EMI test receiver uses an FFT-based time domain scan to perform stan-dard-compliant dis-turbance measure-ments up to 6000 times faster than con-ventional EMI test receivers. These are the parameters on which these devices evaluate, emission performance of the equipment under test. These parameters are defined in CISPR 16-1-1, and MIL-STD-461G, and DEFSTAN 59-411 for military tests. Transducers These devices are used to convert the emissions to be measured from the EUT into something which can be displayed onto the screen of the measuring device. These devices are able to convert the four important parameters, Radiated electric field Radiated magnetic field Conducted cable voltage, and Conducted cable current Into readings which can be displayed on the screen on the receiver. CISPR 16-1-4 is referenced while choosing transducers/antennas for EMC emission testing. LISNs and probes for cable measurements Artificial Mains Network. These devices are used to conduct voltage emissions tests on the main port. These are required to provide a defined impedance at RF across the measuring point, to test the instrument, and isolate the test circuit from unwanted interference signals on the mains supply. Artificial Hand The requirements for this are specified in CISPR 16-1-2. This accessory is used to simulate those devices which are designed for hand-held usage. This accessory is a strip of metal foil, 6cm wide and normally wrapped around that part of the EUT which will be touched by the user’s hand. Absorbing clamp and CMAD These devices are used to measure emissions above 30MHz as radiated fields. The standards used to get this apparatus is CISPR 14-1/EN 55014-1. Current Probe This is a clamp-on device that is used to measure the amount of current flowing in a cable. The standard used for this is CISPR 22/EN 55022. Near Field Probes These probes are used to detect emissions near to culprit device. These devices can be around cylindrical rod or a loop that needs to be taken near the culprit devices to take readings
Altium Circuit Studio is an entry-level but professional PCB design suite. Which offers interactive automated routing, intuitive ECAD-MCAD collaboration, integrated SPICE simulations, and unparalleled design efficiency at an affordable price point. Often compared to KiCad because of the small difference in price point. Altium CircuitStudio comes with a perpetual licence fee of $495. With its native 3D, version control and over 300,00 component library and the Altium promise. This software will definitely prove to be better than others in its class. Opening up this software showcases a deliberately minimal interface that requires lesser resources to run on your computer. This showcases the demographic this product is aimed towards. Exactly as it says on the box entry-level professionals or freelancers or undergraduate students. This is not a full-professional product which is made evident by some things like, not being able to multi-object drag and drop, remapping hotkeys (this is a very mouse-heavy program), and no.DbLib support. CircuitStudio is unable to define its place, for a perpetual license fee of $495 you get 90% of the features of Altium Designer but those last 10% are the real challenge, this means that software is limited to designing low-level PCBs, which can be good for a freelance, but the price at which you get this software may just be too high for a graduate student willing to pay $120 per year for the Altium Designer student version, but without the ability to sell your designs, which CircuitStudio offers. The best thing which circuit studio offers at this price point is the Altium component library. This software is a good investment to start your PCB design and schematic journey while getting hands-on lessons and tutorials straight from the Altium community.
Altium designer is a PCB schematic design and layout tool, which is used to make component libraries and custom footprints, when they are not available from the manufacturer or the suppliers website. Altium even lets the user import custom made CAD files of the component, which can later be simulated to conduct thermal, electrical and RF tests. Altium Designer even has a built in SPICE simulation tool which rivals stand alone softwares in the same class. This SPICE simulation is used to conduct stability, power dissipation, impedance matching and power transfer analysis of the circuit which will be laid out later. This lets the design team save considerable money when developmental tests cannot be performed on these circuits. Altium designer is good not only because it gives the designer tools to help his PCB design process easier but it also comes with built in solutions which include videos, documentation and webinars, which pop-up and are available on the home page when the user enters. Altium design software requires a licence to operate and can be bought for a monthly fee of 20,250 rupees or a perpetually for rupees 600,000.