Microchip Documentation - Vineetha-1
Microchip Documentation - Vineetha-1
Microchip Documentation - Vineetha-1
Bachelor of Technology in
ELECTRICAL AND ELECTRONICS ENGINEERING
by
This report on “EMBEDDED SYSTEM VIRTUAL INTRNSHIP” is a bona fide record of the
internship work submitted by VASUPALLI NITHIN with Reg. No 23KD5A0217, in His 5th semester
in partial fulfillment of the requirements for the award of degree of B.Tech in Electrical and Electronics
EXTERNAL EXAMINER
ACKNOWLEDGENT
I would like to express my deep sense of gratitude to my esteemed institute Lendi Institute of
Engineering and Technology (Autonomous), which has provided me an opportunity to fulfill my
cherished desire.
I am highly indebted to Dr.K.Subbaramaiah, Professor - Head of the Department of
Electrical and Electronics Engineering, Lendi Institute of Engineering and Technology
(Autonomous), for giving me the opportunity to do the internship in college.
I express my sincere thanks to Principal, Dr. V. V Rama Reddy, Lendi Institute of
Engineering and Technology (Autonomous) for his encouragement to me during this Internship,
giving me a chance to explore and learn new technologies in the form of summer Internship-2.
I am grateful for EDUSKILLS and AICTE for providing me this learning opportunity.
Finally, I am indebted to the teaching and non-teaching staff of the Electrical and Electronics
Engineering Department for all their support in completion of my Internship
VASUPALLI NITHIN
(23KD5A0217)
CERTIFICATE
INSTITUTE
VISION
Producing globally competent and quality technocrats with human values for the holistic needs of
industry and society.
MISSION
➢ Creating an outstanding infrastructure and platform for enhancement of skills, knowledge and
behavior of students towards employment and higher studies.
➢ Providing a healthy environment for research, development and entrepreneurship, to meet the
expectations of industry and society.
➢ Transforming the graduates to contribute to the socio-economic development and welfare ➢ Of the
society through value based education.
Department of Electrical & Electronics Engineering
PROGRAMSPECIFICOUTCOMES (PSOs)
PSO1: Capable of design, develop, test, verify and implement electrical and electronics engineering
systems and products.
PSO2:Succeed in national and international competitive examinations for successful higher studies
and employment
Department of Electrical & Electronics Engineering
COURSE OUTCOMES
S.No Description
CO1 Construct the company profile by compiling the brief history, management
structure, products / services offered, key achievements and market
performance of internship organization.
CO3 Test the theoretical learning in practical situations by accomplishing the tasks
assigned during the internship period.
CO4 Apply various soft skills such as time management, positive attitude and
communication skills during performance of the tasks assigned in internship
organization.
1.4 Getting started with PIC16F1xxx MCUs using MCC ans State Machines
3.2 Exploring Bluetooth Low energy (BLE) from first steps to final
application
Slave Embedded system does not decide on its own which means that it is not
having intervenience but in independent Embedded system it can take necessary
actions based on input from the synthesis
Example: driver less car ,semiautomatic washing machine
Real time Embedded system are the systems takes action within a specific amount
of time
Example: airbags in cars, pacemakers which are used for blood pumping
Networked Embedded system are the systems which are connected via network
Example: routers ,gps modems
some of the embedded systems which satisfies all above criteria are called Hybrid
Embedded systems category
Example: Robots etc..
1.2 8 Bit Micro controllers: Architecture of the PIC16
The PIC16 family of micro controllers, produced by Microchip Technology (formerly
Microchip PIC), is a popular series of 8-bit micro controllers known for their
simplicity, low power consumption, and versatility. These micro controllers are
widely used in various embedded systems, including consumer electronics, industrial
automation, and automotive applications. Here, I'll provide an overview of the
architecture of the PIC16 micro controller.
1. CPU Core:
- The PIC16 micro controllers are based on a Harvard architecture, which means
they have separate program memory (Flash memory) and data memory (RAM).
- They feature an 8-bit RISC (Reduced Instruction Set Computer) CPU core,
which is highly optimized for low-power and fast execution of instructions.
- The CPU can execute most instructions in a single instruction cycle, making it
relatively efficient.
2. Memory:
- Program Memory (Flash): This is where the program code is stored. The size of
the Flash memory can vary depending on the specific PIC16 model.
- Data Memory (RAM): This is where variables and data are stored during
program execution. PIC16 devices typically have a limited amount of RAM.
4. Instruction Set:
- The instruction set of the PIC16 micro controller is relatively small and designed
for simplicity and efficiency.
- Instructions are mostly 8-bit wide and include arithmetic, logical, and control
operations.
5. Peripherals:
- PIC16 micro controllers offer a variety of on-chip peripherals, which can include
timers, USARTs (Universal Synchronous/Asynchronous Receiver/Transmitter),
PWM (Pulse Width Modulation) controllers, and more.
- These peripherals can be configured and controlled through SFRs.
6. I/O Ports:
- PIC16 micro controllers typically have multiple I/O ports for connecting to
external devices and sensors.
- These ports can be configured as inputs or outputs and can be used for digital I/O
operations.
7. Interrupts:
- PIC16 micro controllers support both hardware and software interrupts, allowing
for responsive event handling.
- Interrupts are vectored, meaning there are specific memory locations for
different interrupt sources.
The specific features and capabilities of PIC16 micro controllers can vary depending
on the exact model within the family. Developers choose a particular PIC16 device
based on the requirements of their application, considering factors like memory size,
available peripherals, and power consumption.
8. Plugin Support:
- MPLAB X IDE supports plugins, which extend its functionality. Developers can
create custom plugins or use existing ones to enhance the IDE's capabilities.
9. Real-Time Data Monitoring:
- For debugging and analysis, the IDE provides real-time data monitoring and
visualization tools, allowing you to monitor variables and peripheral registers while
making it easy to program your microcontroller with the compiled code directly from
the IDE.
- The IDE can integrate with version control systems like Git, making it easier for
MPLAB X IDE is an essential tool for anyone developing applications for Microchip
microcontrollers and digital signal controllers. It offers a user-friendly interface and a
wide range of features that simplify the development process, from writing code to
programming and debugging your embedded systems.
1. Comments:
Example:
2. Preprocessor Directives:
- Preprocessor directives begin with a `#` symbol and are used to include header
files, define macros, and perform other preprocessing tasks.
Example:
Example:
int main() {
// Program statements
return 0; // Indicates successful execution
}
4. Variables:
- Variables are used to store data. They must be declared before use,
specifying their data type.
- Variable names can include letters, digits, and underscores but must
start with a letter or underscore.
Example:
5. Data Types:
- C supports basic data types such as `int`, `float`, `char`, and more.
- You can also create user-defined data types using structures and
enumerations.
Example:
int x = 42;
float pi = 3.1415;
char grade = 'A';
struct Person {
char name[50];
int age;
};
6. Operators:
- C includes various operators for performing operations on variables
and values, including arithmetic, comparison, logical, and assignment
operators.
Example:
int sum = 5 + 3;
int isEqual = (sum == 8); // Comparison operator
int isTrue = (1 && 0); // Logical AND operator
7. Control Structures:
- C provides control structures like `if`, `else`, `while`, `for`, and
`switch` for decision-making and looping.
Example:
if (x > 10) {
8. Functions:
- Functions are blocks of code that can be called and reused.
- Functions are defined with a return type, a name, and optional
parameters.
Example:
int add(int a, int b) {
return a + b;
function
9. Arrays:
- Arrays are used to store collections of data of the same data type.
10. Pointers:
- Pointers are variables that store memory addresses. They are used
for dynamic memory allocation and accessing data indirectly.
Example: int value = 42; int *ptr = &value; // Declare a pointer and
assign the address of 'value' printf("Value: %d\n", *ptr); //
Dereference the pointer to access the value
These are some of the fundamental syntax and structures in the C programming
language. Understanding and mastering these concepts is essential for writing C
programs effectively. C is a versatile language, and it allows for low-level
memory manipulation, making it suitable for systems programming and
embedded development.
In a singly linked list, each node points to the next node in the sequence, and the last
node points to NULL to indicate the end of the list.
Example: struct Node { int data;
struct Node *next;
};
To create a linked list, you typically start with a pointer to the first node (the head) and
initialize it to NULL. You then add nodes dynamically as needed.
Example: struct Node *head = NULL; // Initialize an empty
linked list
Inserting Nodes:
To insert a node at the beginning of the linked list, you allocate memory for the new
node, set its data and next pointer, and update the head to point to the new node.
Example:
Example:
// Assuming 'prevNode' is the node before the one you want to
delete struct Node *temp = prevNode->next; prevNode->next =
temp->next; free(temp);
Traversing the Linked List:
To access and process the elements in the linked list, you traverse it using a loop or
recursion. Example:
struct Node *current = head; while
(current != NULL) {
// Process the current node
printf("%d ", current->data);
current = current->next;
}
1. Dynamic Size: Linked lists can grow or shrink dynamically, making them
suitable for situations where the size is not known in advance.
1. Random Access: Unlike arrays, linked lists don't support direct random
access to elements. To access an element, you need to traverse the list from the
beginning.
2. Memory Overhead: Linked lists require extra memory for the next
pointer, which can lead to higher memory consumption compared to arrays
Linked lists are a fundamental building block in C programming and are widely used
in various applications, including implementing data structures like stacks, queues,
and hash tables. Understanding linked lists and their operations is crucial for C
programmers.
1. Function Pointers:
Callbacks are implemented using function pointers. A function pointer is a
-
variable that stores the address of a function instead of its value.
Function pointers have a specific function signature, meaning they point to
-
functions with a specific set of parameters and return type.
Example:
// Declare a function pointer type typedef void
(*CallbackFunction)(int);
}
// Define a callback function void myCallback(int value) {
printf("Callback invoked with value: %d\n", value);
} int main() { doSomething(42, myCallback); // Pass the callback function as an
argument return 0;
}
In this example, `doSomething` is a function that takes an integer value and a callback
function as arguments. When called, it performs some operation and then invokes the
provided callback function with the given value.
2. Using Callbacks for Custom Behavior:
- Callbacks are often used when you want to customize the behavior of a function
without modifying its code. This allows for greater flexibility and reusability of code.
Example:
compareAscending(const void *a, const void *b) { return (*(int *)a - *(int *)b);
} return 0;
In this example, `qsort` is a library function that sorts an array of integers. It accepts a
callback function (`compareAscending`) to determine the sorting order.
Callbacks are a powerful tool in C programming that allows you to create flexible and
reusable code by separating functionality from behavior. They are commonly used in
libraries, frameworks, and event-driven systems to enable customization and
extensibility.
2. Data Structures:
- Implementing and working with complex data structures like linked
lists, trees, graphs, and hash tables. This involves memory management and
pointer manipulation.
3. Function Pointers and Callbacks:
1. Efficient Data Types: Use data types that match the target hardware's
architecture to improve performance and reduce memory usage. For example, use
`uint8_t` for an 8-bit microcontroller.
CHAPTER3
3.1 Design Considerations for your first IOT
project
Designing your first IoT (Internet of Things) project involves several important
considerations to ensure the success and functionality of our project. Here are key
design considerations for your first IoT project:
1. Define the Problem and Objectives:
- Clearly define the problem you want to solve with your IoT project and
set specific objectives. Understand the needs and requirements of your target
users or customers.
2. Select the IoT Platform:
- Plan for the power supply and management of your IoT device.
Consider battery life, power efficiency, and whether the device needs to
operate in a low-power mode.
5. Connectivity:
- Determine how your IoT device will connect to the internet or other
devices. This could involve Wi-Fi, Ethernet, cellular, or LPWAN (Low-Power
Wide Area Network) technologies.
6. Security:
- Choose the appropriate sensors to collect relevant data for your project.
Consider factors like accuracy, precision, and calibration.
- Decide how and where data will be processed and analyzed. It can be on
the device itself, at the edge, or in the cloud. Determine the necessary
processing power and storage capacity.
9. User Interface:
- Design a user interface if your project requires user interaction. This could be
a web or mobile app, a dashboard, or even voice commands through virtual assistants.
10. Data Storage:
- Plan for data storage requirements. Decide whether you will store data
locally on the device, in a cloud database, or in a hybrid setup.
- Plan for remote firmware updates to fix bugs, add features, and enhance
security. Ensure that updates can be deployed seamlessly.
- Calculate the total cost of ownership (TCO) for your IoT project,
including hardware, software development, maintenance, and operational
costs.
Exploring Bluetooth Low Energy (BLE) from first steps to a final application
involves understanding the technology, developing the necessary skills, and
following a systematic approach to building your project. Here's a step-by-step guide:
Select the development platform and tools that suit your project. Popular options
include Nordic Semiconductor's nRF series, Texas
- Instruments' CC26xx/CC13xx series, and the Arduino platform with
BLE shields.
- Study the BLE protocol stack, which includes the Generic Attribut
Profile (GATT), Generic Access Profile (GAP), and more. Understand
concepts like advertising, connections, services, and characteristics.
- BLE is known for its low power consumption, but you can optimize further by using
low-power modes, optimizing advertising intervals, and minimizing data transfers.
11. Implement Security:
-Consider future enhancements and scalability. Plan for firmware updates and
feature additions
18. Real-World Testing:
19. Deployment:
1. Select Hardware:
- Choose a microcontroller or single-board computer (SBC) that is
compatible with Azure IoT Central. Common options include Raspberry Pi,
Arduino, or specialized IoT development boards with built-in connectivity.
2. Assemble Hardware: -
- Assemble your hardware components, including the microcontroller, sensors
(e.g., temperature, humidity, light), power supply, and any necessary peripherals.
3. Set Up Development Environment:
- Install the necessary software tools and libraries for your chosen
hardware platform. Configure your development environment.
4. Interface Sensors:
- Connect and interface your sensors with the microcontroller. Read data
from the sensors using appropriate libraries or code.
5. Implement Communication:
- Choose a communication method to send sensor data to Azure IoT
Central. Common options include Wi-Fi, Ethernet, or cellular connectivity.
Ensure your hardware supports the chosen method.
6. Azure IoT Central Setup:
- Sign in to the Azure IoT Central portal
(https://apps.azureiotcentral.com/).
9. Security Implementation:
- Ensure that your firmware includes secure communication practices,
such as using TLS/SSL for data encryption and proper authentication
mechanisms.
10. Test and Debug: - Test your sensor node in a real-world environment to
ensure data collection and transmission work as expected. Use debugging tools
and logs to troubleshoot any issues.
- Register your sensor node with Azure IoT Central by providing device-
specific information and credentials.
- Set up rules and alerts in Azure IoT Central to trigger actions based on
sensor data, such as sending notifications or performing specific tasks.
15. Deployment:
16. Scalability:
Creating a sensor node for Azure IoT Central involves both hardware and software
development, along with integration with the Azure IoT platform. Be prepared to
iterate on your design and implementation to achieve a reliable and scalable IoT
solution.
motor control. These dual-core devices combine a Digital Signal Processor (DSP) core
with a microcontroller core, making them suitable for demanding control applications
like motor control. Below is a structured outline for conducting such a workshop:
Workshop Title: Motor Control Workshop using
dsPIC Dual-Core DSC Devices
Workshop Duration: Typically, a full-day or multi-day workshop, depending on the
depth of the content and hands-on activities.
Workshop Goals:
Workshop Outline:
- Hands-on lab: Assembling motor control hardware with dsPIC DSC development
boards.
CONCLUSION
In conclusion, my internship as an embedded system developer has been a valuable
and enriching experience. Over the course of this internship, I have had the opportunity
to work on real-world projects, collaborate with a talented team, and expand my
technical skills significantly.
This internship has reaffirmed my passion for embedded systems development and has
equipped me with the knowledge and skills needed to excel in this field. I am grateful
for the guidance and mentorship I have received throughout this journey, and I am
excited to continue my career as an embedded system developer, applying the lessons
and experiences gained during this internship to future endeavors .
FUTURESCOPE
The future scope for an embedded system developer is promising and diverse. As
technology continues to advance, embedded systems are becoming increasingly
integral to various industries. Here are some key points regarding the future scope of
an embedded system developer:
1. Academic Journals: Websites like IEEE Xplore, ACM Digital Library, and
ScienceDirect host academic journals and papers related to embedded systems. You
can search for specific papers or journals that are relevant to your research or
interests.
2. Online Courses and Tutorials: Websites like Coursera, edX, Udemy, and
embedded systems projects on GitHub. You can explore repositories, access source
THEEND