Int 2
Int 2
Int 2
A
INTERNSHIP REPORT
Submitted to
JAWAHARLAL NEHRU TECHONOLOGICAL UNIVERSITY HYDERABAD
In partial fulfillment of the requirement
for the award of the degree of
BACHELOR OF TECHNOLOGY
In
ELECTRICAL & ELECTRONICS ENGINEERING
SUBMITTED BY
CERTIFICATE
This is to certify that the mini Project report entitled “EMBEDDED SYSTEM DEVELOPER
” that is being submitted by P. SAI SIVA RAMA KRISHNA (22645A0238),of seventh semester
B.Tech (EEE), academic year (2024-25) in the partial fulfilment of the master degree from
Jawaharlal Nehru Technologies University, Hyderabad (T.S).
11 Conclusion 19
12 Reference 20
ABSTRACT
This virtual internship, organized by AICTE and supported by Microchip, offers
a dynamic 10-week learning experience for aspiring embedded developers. The program
focuses on providing participants with hands-on skills in embedded systems, equipping them
with the knowledge to thrive in the ever- evolving tech industry. Interns will delve into the
fundamentals of embedded development, gaining practical insights into microcontroller
programming and hardware interfacing. Throughout the internship, emphasis is placed on real-
world applications, enabling interns to apply their learning to tangible projects.
Collaborating with Microchip, a leading technology company, ensures interns
receive industry- relevant training and exposure to cutting-edge tools and resources. The
internship caters to individuals at various skill levels, fostering a supportive environment for
beginners and those with experience in embedded development. Key components of the
internship include interactive virtual sessions, guided projects, and mentorship opportunities.
Participants will have the chance to explore diverse aspects of embedded development, from
coding to circuit design.
CHAPTER 1
INTRODUCTION TO EMBEDDED SYSTEM
An embedded System is an integrated system that is formed as a combination of computer
hardware and software for a specific function. It can be said that a dedicated computer system
has been developed for some particular reason. But it is not our traditional computer system or
general-purpose computers, these are the Embedded systems that may work independently or
attached to a larger system to work on a few specific functions. These embedded systems can
work without human intervention or with little human intervention.
Three main components of Embedded systems are:
1. Hardware
2. Software
3. Firmware
2.1 Characteristics of an Embedded System
1. Performs specific task: Embedded systems perform some specific function or tasks.
2. Low Cost: The price of an embedded system is not so expensive.
3. Time Specific: It performs the tasks within a certain time frame.
4. Low Power: Embedded Systems don’t require much power to operate.
1
2.3 Block Structure Diagram of Embedded System
2
CHAPTER 2
8-Bit Microcontrollers: Architecture of the PIC16
Microchip's first 8-bit microcontroller (MCU), was the PIC1650. Over time, 8-bit PIC
expanded from 12-bit instruction words to 14 and 16. Non-volatile program and data memory
was introduced along with more package options and many new digital and analog peripherals.
Improvements to power consumption, performance, and cost also became available.
3
CHAPTER 3
ADVANCED C PROGRAMMING
Microcontroller embedded C programming is a crucial skill for professionals in the
field of embedded systems. It is a programming language that is widely used in the development
of microcontroller-based systems, and it offers a wide range of features that allow developers to
create efficient and effective code. In this blog, we will explore some advanced microcontroller-
embedded techniques that professionals can use to take their skills to the next level.
• Use of Pointers: Pointers are variables that store the memory address of another variable. In
microcontroller-embedded C programming, pointers are used to access and manipulate memory
locations directly. This technique can be used to optimize code and improve performance.
• Use of Interrupts: Interrupts are signals that are generated by hardware devices to interrupt
the normal flow of program execution. In microcontroller-embedded C programming, interrupts
can be used to respond to external events in real-time.
• Use of DMA: DMA (Direct Memory Access) is a technique that allows data to be transferred
from one memory location to another without the need for CPU intervention. In microcontroller-
embedded C programming, DMA can be used to optimize code and improve performance.
• Use of Timers: Timers are hardware devices that can be used to measure time intervals in
microcontroller-embedded systems. In microcontroller-embedded C programming, timers can be
used to perform time-critical operations.
Advanced C programming for embedded systems demands a comprehensive understanding of
both software and hardware aspects. Developers need to navigate the intricate landscape of
memory management, optimization, real-time considerations, power management, and peripheral
interaction.
4
CHAPTER 4
ADVANCEDEMBEDEED CTIPS, TRICKS, AND CAUTIONS
Embedded systems, the silent workhorses powering an array of devices from medical
equipment to automotive control units, demand a nuanced approach as complexity and
performance requirements escalate. Here, we delve into advanced tips, tricks, and precautions
that can elevate your embedded systems development prowess.
Certainly! Here are some advanced embedded systems tips, tricks, and precautions:
Tips and Tricks:
• Power Optimization: Utilize low-power modes when possible. Optimize voltage and clock
frequency for specific tasks.
• Memory Management: Implement efficient memory allocation and deallocation. Optimize
data structures to minimize memory usage.
• Real-Time Operating Systems (RTOS): Consider using an RTOS for better task
management. Optimize task priorities for time-critical functions.
• Interrupt Handling: Minimize interrupt service routine (ISR) execution time. Prioritize
interrupts based on criticality.
• Peripheral Management: Utilize DMA (Direct Memory Access) for efficient data
transfer. Optimize usage of timers and counters.
• Code Optimization: Use inline assembly for critical sections. Employ compiler
optimization flags.
• Debugging and Profiling: Use hardware and software debugging tools. Profile code to
identify performance bottlenecks.
Cautions:
• Interrupt Safety: Be cautious when accessing shared resources in ISRs. Minimize the use
of floating-point operations in ISRs.
• Real-Time Constraints: Ensure critical real-time tasks meet deadlines. Be aware of the
worst-case execution time for tasks.
• Concurrency Issues: Implement proper synchronization mechanisms. Avoid race
conditions and deadlocks.
• Power Failures: Implement mechanisms to handle unexpected power loss. Use non- volatile
memory for critical data.
• Peripheral Configuration: Double-check configuration registers for peripherals.Be cautious
with changes to the clock and power settings.
5
• Security Concerns: Implement secure coding practices to prevent vulnerabilities. Regularly
update and patch any external libraries or components.
• Watchdog Timers: Use watchdog timers carefully to avoid unintended resets. Ensure the
watchdog timer period is appropriate for the application.
Remember, embedded systems often have resource constraints, so balance optimization with
maintainability. Regularly test and validate your code, especially in real-world conditions, to
ensure reliability.
In conclusion, navigating the realm of advanced embedded systems necessitates a holistic
approach, blending technical expertise with meticulous attention to detail. Document your design
decisions, stay abreast of industry best practices, and embrace continuous learning to master the
ever-evolving landscape of embedded systems development.
6
CHAPTER 5
C PROGRAMMING: LINKED LIST DATA STRUCTURE
Linked lists in embedded systems, where resource constraints and efficiency are
paramount, pose both challenges and opportunities. In the realm of C programming for embedded
systems, the use of linked lists must be carefully considered to ensure optimal performance with
limited resources. One of the primary advantages of linked lists in embedded systems is their
dynamic nature, enabling efficient memory utilization. Unlike static arrays whose size is fixed at
compile-time, linked lists allow for dynamic allocation and deallocation of memory during
runtime. This flexibility is especially valuable in embedded systems where memory resources are
typically scarce and need to be managed judiciously.
Another consideration is the overhead associated with traversing linked lists. In
embedded systems, where computational resources are often limited, the linear traversal required
to access or manipulate elements in a linked list may introduce inefficiencies.
Despite these challenges, linked lists remain a valuable tool in embedded systems
programming. They provide a flexible and adaptive means of managing data structures in
situations where the size of the dataset is not known at compile time. By understanding the trade-
offs and implementing optimization techniques, developers can harness the power of linked lists
while ensuring the efficient operation of embedded systems.
Embedded systems, characterized by constrained resources and specialized
applications, demand a nuanced approach to data structures in C programming. The selection and
implementation of data structures in embedded systems play a pivotal role in achieving optimal
performance, reliability, and efficient memory utilization.
• Limited Resources: Embedded systems often operate with restricted resources, including
limited memory, processing power, and energy. This necessitates a careful choice of data
structures to ensure efficient use of available resources. Traditional data structures like arrays and
linked lists must be scrutinized in terms of their memory footprint and processing overhead.
• Arrays for Deterministic Access: Arrays, with their contiguous memory allocation and
direct access through indexing, are frequently employed in embedded systems. They offer
constant-time access to elements, making them suitable for situations where deterministic access is
crucial. However, their drawback lies in fixed size, which may not accommodate dynamic data
requirements.
• Linked Lists for Dynamic Adaptability: Linked lists, while introducing potential memory
fragmentation and traversal overhead, provide dynamic adaptability in situations where the size
of the data set is unpredictable. Memory allocation strategies, such as memory pools and careful
7
node management, can be implemented to mitigate these concerns and leverage the flexibility of
linked lists.
• Trees for Hierarchical Structures: In embedded systems handling hierarchical data, tree
structures become invaluable. Binary trees, AVL trees, or other variations can efficiently
organize and search hierarchical data, optimizing both memory and processing resources.
However, the choice of a specific tree structure depends on the specific application requirements
and resource constraints.
• Stack and Queue for Real-Time Processing: Embedded systems often require real- time
processing, and data structures like stacks and queues can play a crucial role. These structures
facilitate efficient last-in, first-out (LIFO) or first-in, first-out (FIFO) operations, aiding tasks
such as task scheduling, event handling, and buffer management.
In conclusion, the choice and implementation of data structures in C programming
for embedded systems involve a delicate balance between resource constraints and application
requirements. Developers must carefully analyze the trade-offs, leverage optimized versions of
traditional structures, and, when necessary, create custom solutions to ensure that the data
structures employed align seamlessly with the unique demands of embedded systems.
8
CHAPTER 6
CREATING A SENSOR NODE FOR AZURE IoT CENTRAL
The Internet of Things (IoT) has revolutionized data collection and automation across
various industries. Embedded systems, often serving as the backbone of these connected devices,
play a crucial role in sensor data acquisition and communication. To effectively manage and
utilize this data, platforms like Azure IoT Central offer a streamlined solution. This essay
provides a comprehensive guide on creating a sensor node for Azure IoT Central, specifically for
embedded systems.
To create a sensor node for Azure IoT Central, you can follow these general steps:
• Set Up Azure IoT Central:
- Create an Azure IoT Central application.
- Define a device template in IoT Central that represents your sensor node.
• Choose Hardware:
- Select a microcontroller or single-board computer compatible with Azure IoT. Common
choices include Raspberry Pi, Arduino, or devices with supported IoT SDKs.
• Programming Language and SDK:
- Choose a programming language for your sensor node (e.g., C, Python) and use the Azure IoT
SDK for that language. Azure provides SDKs for various languages.
• Device Registration:
- Register your device in Azure IoT Central. Obtain the device connection string or credentials
needed for your device to communicate with Azure.
• Connectivity:
- Implement the necessary code to establish a secure connection from your sensor node to
Azure IoT Central using the obtained credentials.
• Sensor Integration:
- Interface your sensor(s) with the chosen hardware and write code to read sensor data.
• Data Formatting:
- Format the sensor data according to the requirements of your device template in Azure IoT
Central.
• Data Transmission:
- Send the formatted sensor data to Azure IoT Central using the established connection.
• Security Measures:
- Implement security measures such as using secure connections (HTTPS), device
authentication, and encryption to protect your IoT communication.
9
• Testing:
- Test your sensor node by sending data to Azure IoT Central. Verify that the data is received
and displayed correctly in your IoT Central application.
• Monitoring and Maintenance:
- Implement mechanisms for monitoring the health of your sensor node and handle maintenance
tasks as needed.
10
CHAPTER 7
EXPLORING BLUETOOTH LOW ENERGY(BLE) FROM FIRST
STEPS TO FINAL APPLICATION
Certainly! Exploring Bluetooth Low Energy (BLE) in an embedded system involves a
series of steps tailored for the constraints and requirements of embedded environments:
1. Selecting Embedded Hardware:
- Choose an embedded platform that supports Bluetooth Low Energy, such as microcontrollers
or system-on-chip (SoC) devices with integrated BLE capabilities.
2. Development Environment Setup:
- Set up a development environment suitable for embedded programming (e.g., Keil, IAR
Embedded Workbench).
- Install the necessary SDKs and tools provided by the hardware manufacturer for BLE
development.
3. Understanding BLE Stack:
- Familiarize yourself with the BLE protocol stack and how it operates in embedded systems.
- Understand the roles of the Controller and Host in BLE communication.
4. Peripheral Configuration:
- Configure your embedded device as a BLE peripheral, defining services and characteristics
relevant to your application.
- Implement the necessary callbacks for handling BLE events.
5. Central Configuration:
- Configure your embedded device as a central if it needs to communicate with other
peripherals.
- Implement scanning and connection logic in the embedded system.
6. Memory Optimization:
- Optimize code and data structures for memory-constrained environments typical in embedded
systems.
- Minimize the use of dynamic memory allocation if resources are limited.
7. Power Management:
- Implement power-saving features to extend battery life or reduce power consumption in the
embedded system.
- Utilize low-power modes and consider dynamic power adjustment based on communication
requirements.
11
8. Integration with Sensors and Actuators:
- Integrate BLE communication with sensors and actuators relevant to your application.
- Ensure proper data formatting and handling within the embedded system.
9. Real-time Considerations:
- Address real-time requirements if your application demands timely responses.
- Implement mechanisms to handle time-sensitive tasks efficiently.
10. Security Implementation:
- Implement security features provided by the BLE stack, such as encryption and
authentication.
- Adapt security measures to meet the specific needs of your embedded system.
11. Testing in Embedded Environment:
- Test the BLE functionality in the embedded system, considering hardware limitations and
environmental constraints.
- Use debugging tools specific to your embedded platform to identify and resolve issues.
12. Final Application Integration:
- Integrate the embedded BLE functionality into the overall embedded system application.
- Ensure seamless interaction with other components of the system.
13. Documentation and Version Control:
- Document the embedded BLE implementation, considering constraints and challenges.
- Use version control for maintaining and tracking changes in the embedded system code.
14. Compliance and Certification:
- Ensure your embedded BLE implementation complies with Bluetooth standards.
- If applicable, pursue certification for your embedded system.
12
CHAPTER 8
GETTING STARTED WITH PC16F1XXXMCUS USING MCS
AND STATE MACHINES
Prerequisites:
Before we start, make sure you have the following:
- MPLABX IDE installed on your computer.
- MPLAB Code Configurator (MCC) installed as a plugin in MPLABX.
- A PIC16F1619 microcontroller.
- Curiosity Demo Board.
To get started with the PIC16F1XXX microcontroller using MCs (Microcontrollers)
and state machines for embedded systems, follow these steps:
1. Setup Development Environment:
- Install MPLAB X IDE and XC8 compiler, which are commonly used for PIC
microcontroller development.
- Familiarize yourself with the development tools and their basic usage.
2. Select a PIC16F1XXX Device:
- Choose a specific PIC16F1XXX microcontroller variant based on your project
requirements.
3. Understand the Datasheet:
- Refer to the datasheet of the selected PIC16F1XXX device to understand its features,
pinouts, and functionalities.
4. Create a Project:
- Create a new project in MPLAB X IDE and configure the project settings for your chosen
microcontroller.
5. Peripheral Configuration:
- Configure the necessary peripherals (e.g., GPIO, Timer, UART) using the MPLAB Code
Configurator (MCC) or by directly writing register-level code.
6. Implement State Machines:
- Define the states and transitions of your system using a state machine approach.
- Use switch-case or if-else statements to implement the logic for each state.
7. Interrupt Handling:
- Implement interrupt service routines (ISRs) to handle asynchronous events.
- Configure interrupts for timers, external events, or other relevant sources.
8. Testing and Debugging:
13
- Use MPLAB X IDE's debugging tools to test and debug your code.
- Use breakpoints, watch variables, and step through the code to identify and fix issues.
9. Optimization:
- Optimize your code for performance and resource usage.
- Consider power consumption, especially in battery-powered embedded system.
10. Documentation:
- Document your code, especially the state machine logic, to make it easier for others (or
yourself) to understand and maintain.
11. Iterative Development:
- Develop and test your code incrementally. Start with a simple implementation and gradually
add complexity.
12. External Communication:
- If your application involves communication with external devices or sensors, implement
the necessary protocols (e.g., I2C, SPI, UART).
14
CHAPTER 9
INTRODUCTION TO MPLAB XIDE
MPLAB X Integrated Development Environment (IDE) is a comprehensive software tool for the
development of embedded systems, particularly for Microchip's PIC microcontrollers and dsPIC
digital signal controllers. Here's a brief introduction to MPLAB XIDE:
1. Overview:
MPLAB XIDE serves as the central hub for embedded system development. It integrates various
tools and features to streamline the entire development process, from coding to debugging and
programming.
2. Supported Platforms:
MPLAB XIDE is cross-platform, compatible with Windows, macOS, and Linux. This flexibility
allows developers to choose their preferred operating system for embedded development.
3. Project Management:
The IDE organizes projects, source files, and configurations in a structured manner. It supports
various project types, including those for different Microchip devices and application needs.
4. Code Editing:
MPLAB XIDE provides a code editor with features like syntax highlighting, code completion,
and project-wide search. It supports multiple programming languages, including C, Assembly,
and more.
5. Device Configuration:
Users can configure Microchip devices within MPLAB XIDE. This involves setting up clock
sources, I/O ports, and other device-specific parameters through graphical interfaces, easing the
initialization process.
6. Build and Compilation:
The IDE incorporates a build system that compiles source code into executable binaries. It
manages dependencies, ensuring that the compilation process is efficient and error-free.
7. Debugging:
MPLAB XIDE offers robust debugging tools, including breakpoints, watchpoints, and real- time
variable monitoring. It supports both software and hardware debugging, allowing developers to
identify and fix issues efficiently.
8. Simulator:
For testing without physical hardware, MPLAB XIDE includes a simulator. This tool emulates the
behavior of the target microcontroller, aiding in early-stage development and debugging.
15
9. Peripheral Libraries:
Microchip provides peripheral libraries that simplify interfacing with the microcontroller's
peripherals. MPLAB XIDE seamlessly integrates these libraries, making it easier to access and
utilize hardware features.
10. Programming and Flashing:
The IDE facilitates programming the compiled code onto the target device. It supports various
programming methods, including in-circuit programming (ICP) and in-system programming
(ISP).
11. Plugin System:
MPLAB XIDE supports plugins that extend its functionality. These plugins can add new features
or support for additional devices and peripherals, enhancing the IDE's versatility.
In summary, MPLAB XIDE is a powerful and versatile development environment that simplifies
the process of creating embedded systems with Microchip's microcontrollers. It provides a
comprehensive set of tools for coding, debugging, and programming, contributing to efficient
and reliable embedded system development.
16
CHAPTER 10
MOTOR CONTROL WORKSHOP USING dsPIC DIGITAL
SIGNAL CONTROLLERS (DSC) DUAL CORE DEVICES
This workshop explores the world of motor control using dsPIC® Digital Signal Controllers
(DSC) with a focus on dual-core devices. Participants will gain a comprehensive understanding
of BLDC (Brushless DC) and PMSM (Permanent Magnet Synchronous Motor) designs, along
with the classic control algorithms employed for each. The workshop delves into the dsPIC33xx
architecture and its motor control peripherals, providing an in-depth look at the Microchip demo
board, MCLV-2. Hands-on labs utilizing the dsPIC33CH128MP508 will equip participants with
practical experience in sensored and sensorless BLDC control, as well as sensorless PMSM
(Field Oriented Control).
Certainly! To conduct a motor control workshop using dsPIC digital signal controllers with dual-
core devices for embedded systems, you may want to consider the following key steps:
1. Introduction to Motor Control:
- Provide a brief overview of motor control concepts.
- Discuss different types of motors and their applications.
2. dsPIC Dual-Core Basics:
- Introduce participants to dsPIC digital signal controllers and dual-core architecture.
- Explain the advantages of using dual cores for real-time control.
3. Software and Development Environment:
- Guide participants in setting up the development environment for dsPIC controllers.
- Introduce programming tools and software, such as MPLAB X IDE.
4. Motor Control Algorithms:
- Cover basic motor control algorithms like PI control and field-oriented control (FOC).
- Explain how dual-core processing can enhance the performance of these algorithms.
5. Hardware Interface:
- Discuss hardware interfaces for motor control, including PWM (Pulse Width Modulation)
signals.
- Provide hands-on experience with connecting dsPIC controllers to motor drivers and sensors.
6. Dual-Core Coordination:
- Illustrate how to distribute tasks between the two cores for efficient processing.
- Explore examples of tasks suitable for each core in a motor control application.
17
7. Sensor Integration:
- Demonstrate how to interface sensors like encoders or Hall effect sensors for feedback.
- Discuss the role of feedback in closed-loop motor control systems.
8. Real-time Debugging and Simulation:
- Showcase real-time debugging features available in the development environment.
- Discuss simulation tools to test motor control algorithms before deploying them.
9. Communication Protocols:
- Introduce communication protocols (e.g., UART, SPI, I2C) for external control or monitoring.
- Explore ways to integrate the motor control system into larger embedded systems.
10. Practical Projects:
- Break the workshop into practical projects to reinforce learning.
- Provide participants with motor control challenges to solve using dsPIC dual-core devices.
11. Q&A and Troubleshooting:
- Allocate time for questions and troubleshooting common issues.
- Encourage participants to share their experiences and challenges.
Remember to adapt the workshop based on the participants' skill levels and interests. Hands-on
activities and practical demonstrations will enhance the learning experience.
18
Conclusion
In conclusion, the Embedded Developer Virtual Internship, facilitated by the All
India Council for Technical Education (AICTE) in collaboration with Microchip, has been a
transformative and enriching experience for participants. This initiative has successfully bridged
the gap between theoretical knowledge and practical application, providing aspiring embedded
developers with a platform to hone their skills in a virtual environment.
Throughout the internship, participants had the invaluable opportunity to work on
real-world projects, gaining hands-on experience with Microchip's cutting-edge technologies. The
collaboration with Microchip has not only enhanced the quality of the program but has also
ensured that participants are exposed to industry-relevant tools and practices.The virtual format of
the internship allowed for a diverse pool of participants from across the country to engage in
collaborative learning and knowledge exchange. This inclusivity has contributed to a vibrant and
dynamic learning community, fostering a sense of camaraderie among the aspiring embedded
developers.
The support and guidance provided by industry experts and mentors from
Microchip have played a pivotal role in the success of this virtual internship. The participants
have benefited immensely from the wealth of knowledge shared by these experts, gaining
insights into the latest trends, best practices, and real-world challenges in the field of embedded
development. As we reflect on the achievements of the Embedded Developer Virtual Internship,
it is evident that the collaboration between AICTE and Microchip has not only addressed the
demand for skilled professionals in the embedded systems domain but has also set a benchmark
for future initiatives in virtual education and industry-academia partnerships.
In conclusion, this virtual internship has empowered a new generation of
embedded developers, equipping them with the skills and confidence needed to excel in the fast-
evolving landscape of embedded systems. The success of this program underscores the
importance of continued collaboration between academia and industry in shaping the future of
technical education and nurturing the talent pool for the digital era.
19
Reference
1. Microchip Technology's PIC Microcontroller Documentation
2. MPLAB X IDE User's Guide
3. Azure IoT Central Documentation
4. Bluetooth SIG (Special Interest Group) Documentation
5. (link unavailable) (Embedded Systems Design)
6. IoT Times (IoT News and Insights)
7. ChatGtp
20