All About Classic Autosar Technology at one place. From Its architecture layer to methodology to Companies and tools involved. All at one place
All About Microcontrollers at One Place. From building blocks to functional concepts to its SDK and HDK
What is UDS technology in automotive and how to implement this technology in your own product
Want to know how to debug the microcontrollers? Want to know how to use debugging tools like step-in, step-out, breakpoints and etc. If yes then you have to right place. Explore this blog to understand about Debugging technology in microcontroller’s with NXP S32K144 MCU using ElecronicsV2 board
Why building the project is required ? so After, we have developed/configured the code and we have got the .c & .h files in our project. Now microcontrollers can’t understand the text which is written in these files. They only understand the Binary language of 0 & 1. So we have to convert these .c & .h files into a single file of binary language which the microcontroller can understand. Now these .c and .h files can be in 1000 numbers in some projects. So you can think of how much processing is done to analyze all files, check them for any errors and then convert them into a single file of binary language. This work is done by compilers and the build process. This technology is truly amazing, and its process is even more interesting. What is building the project in embedded and how is it done? In embedded “building the project” refers to the process of compiling and linking the source code and resources of an embedded software application to create an executable binary file that can be loaded onto the target embedded hardware platform. In Embedded, Build process is the process of converting multiple source files into a single file that can run on a computer. So as to understand this process and the technology behind it, let’s understand the procedure/step involved in doing so. Preprocessing(.i files) Compilation(.s files) Assembly(.o files) Linking(.elf files) Preprocessing(.i files) Preprocessing :- Before the actual compilation, the C preprocessor comes into play. It handles directives that start with `#`, such as `#include` and `#define`. It performs macro expansion and file inclusion. The preprocessor generates a modified version of your code, often saved with a `.i` extension. Compilation(.s files) In this phase, the preprocessed code (`.i` files) is translated into assembly code. This step is performed by the C compiler (e.g., `gcc` for GNU C Compiler). The compiler checks your code for syntax errors and generates an assembly code file (usually with a `.s` extension). Assembly(.o files) The code generated by the compiler is not yet in a machine-executable format. It’s a human-readable representation of the code. The assembler takes this assembly code and translates it into machine code, generating an object file (typically with a `.o` or `.obj` extension). Linking(.elf files) Most C programs consist of multiple source files, and each one might produce an object file. The linker (e.g., `ld` for GNU Linker) combines these object files along with any necessary system libraries to create an executable binary file. This is the final output of the compilation process, often with no file extension or a `.exe` (on Windows) or no extension (on Unix-based systems) for executable files. It’s important to note that the compilation process can be controlled through various compiler options, allowing you to customize how your code is compiled, optimize it, and handle various aspects of the process. Building an embedded project is a crucial step in the development process, as it ensures that the software is correctly translated into machine code and can run effectively on the embedded hardware, meeting the project’s functional and performance requirements. After the building process is done then which file is created. After the build process is done then these files are created and then deployed onto the target embedded hardware. Executable Binary (Firmware) : This is the primary output of the build process. It’s a binary file that contains the machine code instructions and data necessary for the embedded system to execute your program. The format of this binary file may depend on the microcontroller or processor used and can include extensions like .bin, .hex, .elf, .s19, etc. Object Files : During compilation, each source file is typically compiled into an object file (with extensions like .o or .obj). These object files contain machine code generated from the corresponding source code and may include debugging information. Debug Information : Debugging information (often in a format like DWARF) can be included in the binary or stored in separate files. This information helps debuggers associate machine code instructions with your original source code, making it easier to debug your program. Hexadecimal Files : In some cases, especially when programming microcontrollers, you might generate hexadecimal files (with extensions like .hex) that specify the memory contents, including both code and data, in a human-readable format. Assembly Listings : Some build systems can generate assembly listings (with extensions like .lst) that show the generated assembly code alongside your source code. This can be useful for understanding how your high-level code translates into machine code. 7. Other Output Files : Depending on your specific development environment and tools, you might encounter other files related to the build process, such as project configuration files, build logs, or build artifacts generated by plugins or extensions. Like the Cmake , SDK files etc. In this IDE when the build process is done the compiler gives us a .elf file that can be loaded onto the target embedded hardware. The exact set of files generated can vary widely based on your development workflow and tools, so it’s important to consult the documentation for your chosen development environment and build system to understand the specifics for your project.( To understand build process and specifies of S32K144 MCU, refer this). Which tools are used in building the project? When we build an embedded project there are some files and a compiler that is used to build the project. Makefile Linker script Startup code GNU GCC Compiler Make file :- A makefile can be considered as a script or a set of commands which help build, compile, link the entire project in order to create an executable. The makefile defines a set of tasks to be executed.A makefile does not have any extension. The makefile has to be specifically named as “makefile”. Linker Script :- A linker script is used to specify how object files should be linked together to create the final executable binary. It defines the memory layout of the
OVERVIEW Nowadays we see oled display being used everywhere be it the phones , TVs , laptops or PCs , smartwatches . They sure are better than old chunky CRT TV displays that were bulky and didn’t deliver the desired picture quality , with the introduction of the LCD and backlight LEDs the things sure got better with the chunkiness of the display gone but the picture quality still wasn’t what one desired of but with the release of the OLED display all these problems became a thing of past. OLED or organic light emitting diode were invented in 1987 by Ching Tang and Steven Van Slyke from Kodak but it was until 2004 when SONY released a OLED TV. In fact in CES 2019 , there were some innovative inventions that were released in the OLED domain with the companies trying to come up with foldable display and some exceptional picture quality. TYPES OF OLED Passive Matrix Oled (PMOLED) Pmoleds have strips of cathode , anode and organic layer. The anode strips are perpendicular to cathode strips it is their intersection that makes a pixel . External circuitry applies current to the cathode and anode strips to decide which pixel to light up. They are used in MP3 players , cell phones etc. Active Matrix Oled(AMOLED) Amoleds have full layer of anode and cathode and organic molecules . The anode layer overlaps the TFT matrix array . The TFT array is the matrix circuitry that decides which pixel gets turned on form the image. Since they consume less electricity they are used in TV screens , BillBoards, Computer Monitors. Transparent Oled A Transparent Oled has all the components cathode, anode, substrate transparent and when off the display is 85 percent transparent. When switched ON the display allows the transfer of light in both the directions. Top Emitting Oled The Top Emitting Oled is have substrate that is either opaque or transparent . They are best suited for active matrix design . They are used in smartcards Foldable Oled They are substrate that made of flexible metallic foil , plastic . They are durable and are easier to replace in case of damage . They are used in smart clothing , GPS receivers , IC computers. White Oled They are made of white light that is more uniform and energy efficient rather than fluorescent lights. They posses true color of incandescent lights BESIDES THESE OLEDS ARE ALSO CATEGORIZED ON THE BASIS OF BASE COLOUR Monochrome Blue Monochrome white Yellow Colour NO OF PINS 3 Pins (supports only I2C) 7 Pins(supports both I2C and SPI) BASED ON INTERFACE ICs SSD1306 SSD1331 BASED ON SIZE 0.91 inch(128×32) 0.96 inch(128×64) HOW OLEDs WORKS Both the LCD and OLED have similar display mechanism . The difference lies in the fact that OLED has the smallest display unit made of pixels that are usually 0.3mm x 0.3mm . Inside each pixel they are 3 different type of color filters . When the size of the color filter is reduced then human eye losses its ability to view each color individually and sees them as a mixture. Next each pixel is converted into digital form for future reproduction of the image. Earlier the image reproduction was done using backlight white , colour filters, glass , diffuser . When the light would glow each color filter would light up too. Behind the filters a polarizer lcd sheet is used which reproduces the image , the problem with this was the black colour produced wasn’t exactly black due to the back light being ON constantly . This issue was rectified using tiny light sources for each pixel due to which organic led was used . If we apply positive voltage to the anode termina the electrons would combine with the holes in the LUMO layer producing light. Work is also being done to remove the need for light source and add doping material in the emission layer which will release light of the certain color due to the energy difference in the conduction and valence layer corresponding to their wavelengths FIG -1 SIZE OF A SINGLE PIXEL FIG-2 RGB COLOR FILTERS INSIDE A PIXEL FIG -3 CONVERTING EACH COLOR INTO BINARY FIG -4 CROSS SECTION VIEW OF OLED FIG-5 CHANGING THE ORIENTATION OF THE POLARIZER TO GENERATE DIFFERENT COLORS FIG -6 ELECTRON HOLE PAIR COMBINATION TO GENERATE LIGHT FIG – 7 DOPING OF SUBSTRATE TO GENERATE LIGHT OF VARIOUS WAVELENGTH USE CASES OF OLED DISPLAY Raspberry Pi Based SSD1306 OLED Video PlayerThis project uses Raspberry pi and OpenCv to display videos on the Oled display ESP8266 Weather WidgetThis project used ESP8266 and weather API to display real time weather conditions on the 0.96 inch display. Tinyduino gamepadThe project used joystick , push buttons , arduino uno , custom designed PCB , USB module and ssd display to play games on the tiny 0.96 inch screen Bluetooth SmartwatchThe project uses 0.96 display , bluetooth module , tiny arduino , lipo battery to connect to the phone and display all kinds of medical stats and time Speedometer for bikes The project uses gps module neo6m and ssd1306 display to show speed of the vehicle on the display and raise an alarm in case of overspeeding. HOW TO CONNECT THE DISPLAY WITH THE MICROCONTROLLER WE WILL BE COVERING THE DETAILS ON HOW TO CREATE AN EMBEDDED DRIVER FOR THE DISPLAY IN THE NEXT BLOG . IN THIS WE’LL BE COVERING A BRIEF OVERVIEW OF THE 2 METHODS THAT CAN BE USED TO COMMUNICATE WITH THE DISPLAY. I2C SPI I2C Using I2C we’ll be communicating with the microcontroller by the help of SCL the clock
Basics of USB Technology || Exploring what it is, how does it work, frame format and many other things
Table of Contents What is RFID technology? RFID is a technology by which objects can be tracked and identified using electromagnetic fields. RFID stands for Radio Frequency Identification. An RFID system consists of an RFID reader known as a Proximity Coupling device (PCD) and RFID tags known as Proximity Integrated Circuit Cards (PICC). RFID Tags are attached to the objects which need to be tracked/identified and each tag has a unique value hard coded. RFID readers are attached to the main system/computer where all the processing takes place. Now, these tags are brought in close proximity to the RFID readers, RFID readers decode the value and send the information to the main system for tracking/identifying/monitoring purposes depending on the application. RFID technology is similar to a barcode or the magnetic stripe of a credit card, as the data encoded in the label or magnetic strip can be captured by a device and stored in a database. RFID belongs to a group of technologies referred to as automatic identification and data capture (AIDC). AIDC methods automatically identify objects, collect data about them and enter the data directly into systems with little or no human intervention. RFID methods use radio waves and automation technologies to accomplish all of this. This technology has grown a lot since its first application. It has not only been improved over the years but also the cost of implementing and utilizing it continues to minimize, making this technology more efficient and affordable. In its simplest form, an RFID system consists of 2 components: an RFID tag and an RFID reader. Refer to the section below to know more in-depth about RFID tags and Readers. RFID tags are used to track objects, by reading/writing information on them and are usually composed of an integrated circuit, antenna, and battery. The integrated circuit stores the data and powers the antenna, allowing it to be read by a reader. Tags contain digitally encoded information that is stored in the integrated circuit and is transmitted to the reader. Readers are devices that intercept, decode, and interpret the information stored in the tag. Typically, readers consist of RFID antennas, multiple operating modes (active and passive), frequency capabilities, and signal processing. The readers, antennas, and tags work together to collect data from RFID tags and transmit it to computer systems. RFID Reader (PCD) PCD(Proximity Coupling device): Also known as RFID readers. They decode the RFID Tags and communicate with them based on ISO14443 standard. PCD can perform read and write operation of data i.e bidirectional communication once PCD and PICC are coupled together. The coupling between PCD and PICC is based on inductive coupling (Refer to Working principle of RFID technology to know physics behind it).PCD energizes the PICC by coupling with them when PICC comes in close vicinity of PCD.And PICC gets energized, it starts transmitting its radio signals with UID of it. For energizing the PICC, they need to be brought in close proximity so that PCD magnetic fields get properly coupled with PICC. PCD’s have the memory(FIFO buffers, EEPROM), communication pins for Host Interface(I2C,SPI,UART), antenna for generating of radio signals, power supply, I/O pins(Interrupt and Timer pins), small CPU for processing of data(CRC,Interrupt controller, Timer unit), Analog interface for RF front head(oscillators, PLL, PGA and etc), Low power modes and support of multi protocols for decoding tags. PCD has the crypto features also implemented inside them, so that only authenticated RFID readers can communicate with PICC. And this also becomes the distinguishing feature in different PCD’s. Like NXP semiconductors, RFID readers follow the crypto-1 cipher for authenticating. Also some PCD’s have secure models and key handling capabilities for secure communication between PCD and PICC for banking and transaction related applications. There are many semiconductor companies who provide the RFID reader chips, with many enhanced features.NXP semiconductors and STMicroelectronics are world leaders in providing RFID reader chips. NXP semiconductors has a family of RFID/NFC chips with many enhanced features. For more indepth knowledge on PCD, viewers can refer to:Radio-frequency identification – Wikipedia. In the upcoming blog, we are going to interface NXP semiconductors MFRC522 and PN512 with host MCU. By making its device driver and to showcase the working of PCD’s RFID Tag(PICC) PICC (Proximity Integrated Circuit Card): These are the RFID Tags, which are known as Proximity Integrated Circuit cards, in technical terms. PICC are attached to the objects which need to be tracked. PICC consists of an antenna for generation of radio waves and memory for storing the UID and other information of PICC. Each PICC has a Unique value hardcoded inside them. This unique value is referred to as UID. The UID value is 7 bytes. PICC have memory divided in terms of blocks and sectors for storing the important information. There are mainly 2 types of PICC/RFID tags. Active tags and Passive tags. Active tags: They have on chip batteries; thus, they can operate at bigger distances and can operate at higher frequencies. Passive tags: They don’t have an on-chip battery, instead they get energized and get the power from the PCD’s.magnetic fields. Thus, Passive tags need to be brought in very close proximity to PCD of about 1-2 cm, for decoding its value. Also, tags are available in many different shapes, depending on the application. They come in credit card-based shapes, to small key ring-based shapes. Also, some tags have crypto features inside them for authentication purposes when PCD’s communicate with them. NXP semiconductor is a world leader in providing RFID Tag chips. Their MIFRAME family of RFID tags has been implemented in 1000’s of devices and use cases. PCD and PICC communicate with each other according to ISO14443 spec. There are certain commands specified in that protocol, which are at first transmitted by PCD’s and then corresponding PICC responds, and the communication session is initialized. For more in-depth knowledge on PICC, viewers can refer to:Radio-frequency identification – Wikipedia. NXP semiconductor is a world leader in providing RFID Tag chips. Their MIFRAME family of RFID tags