Embedded C programming based on 8051 microcontrollerGaurav Verma
This lecture note covers the embedded 'c' programming constructs based on 8051 microcontroller. Although the same concepts can be used for other advanced microcontrollers with some modifications.
Embedded C programming based on 8051 microcontrollerGaurav Verma
This lecture note covers the embedded 'c' programming constructs based on 8051 microcontroller. Although the same concepts can be used for other advanced microcontrollers with some modifications.
This presentation discusses the Serial Communication features in 8051, the support for UART. It also discusses serial vs parallel communication, simplex, duplex and full-duplex modes, MAX232, RS232 standards
This presentation discusses the Serial Communication features in 8051, the support for UART. It also discusses serial vs parallel communication, simplex, duplex and full-duplex modes, MAX232, RS232 standards
Technology is constantly changing. New microcontrollers become available every year. The one thing that has stayed the same is the C programming language used to program these microcontrollers. If you would like to learn this standard language to program microcontrollers, then this book is for you!
Arduino is the hardware platform used to teach the C programming language as Arduino boards are available worldwide and contain the popular AVR microcontrollers from Atmel.
Final project report on grocery store management system..pdfKamal Acharya
In today’s fast-changing business environment, it’s extremely important to be able to respond to client needs in the most effective and timely manner. If your customers wish to see your business online and have instant access to your products or services.
Online Grocery Store is an e-commerce website, which retails various grocery products. This project allows viewing various products available enables registered users to purchase desired products instantly using Paytm, UPI payment processor (Instant Pay) and also can place order by using Cash on Delivery (Pay Later) option. This project provides an easy access to Administrators and Managers to view orders placed using Pay Later and Instant Pay options.
In order to develop an e-commerce website, a number of Technologies must be studied and understood. These include multi-tiered architecture, server and client-side scripting techniques, implementation technologies, programming language (such as PHP, HTML, CSS, JavaScript) and MySQL relational databases. This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart website and also to know about the technologies used to develop such a website.
This document will discuss each of the underlying technologies to create and implement an e- commerce website.
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxR&R Consult
CFD analysis is incredibly effective at solving mysteries and improving the performance of complex systems!
Here's a great example: At a large natural gas-fired power plant, where they use waste heat to generate steam and energy, they were puzzled that their boiler wasn't producing as much steam as expected.
R&R and Tetra Engineering Group Inc. were asked to solve the issue with reduced steam production.
An inspection had shown that a significant amount of hot flue gas was bypassing the boiler tubes, where the heat was supposed to be transferred.
R&R Consult conducted a CFD analysis, which revealed that 6.3% of the flue gas was bypassing the boiler tubes without transferring heat. The analysis also showed that the flue gas was instead being directed along the sides of the boiler and between the modules that were supposed to capture the heat. This was the cause of the reduced performance.
Based on our results, Tetra Engineering installed covering plates to reduce the bypass flow. This improved the boiler's performance and increased electricity production.
It is always satisfying when we can help solve complex challenges like this. Do your systems also need a check-up or optimization? Give us a call!
Work done in cooperation with James Malloy and David Moelling from Tetra Engineering.
More examples of our work https://www.r-r-consult.dk/en/cases-en/
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
Saudi Arabia stands as a titan in the global energy landscape, renowned for its abundant oil and gas resources. It's the largest exporter of petroleum and holds some of the world's most significant reserves. Let's delve into the top 10 oil and gas projects shaping Saudi Arabia's energy future in 2024.
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
Overview of the fundamental roles in Hydropower generation and the components involved in wider Electrical Engineering.
This paper presents the design and construction of hydroelectric dams from the hydrologist’s survey of the valley before construction, all aspects and involved disciplines, fluid dynamics, structural engineering, generation and mains frequency regulation to the very transmission of power through the network in the United Kingdom.
Author: Robbie Edward Sayers
Collaborators and co editors: Charlie Sims and Connor Healey.
(C) 2024 Robbie E. Sayers
Explore the innovative world of trenchless pipe repair with our comprehensive guide, "The Benefits and Techniques of Trenchless Pipe Repair." This document delves into the modern methods of repairing underground pipes without the need for extensive excavation, highlighting the numerous advantages and the latest techniques used in the industry.
Learn about the cost savings, reduced environmental impact, and minimal disruption associated with trenchless technology. Discover detailed explanations of popular techniques such as pipe bursting, cured-in-place pipe (CIPP) lining, and directional drilling. Understand how these methods can be applied to various types of infrastructure, from residential plumbing to large-scale municipal systems.
Ideal for homeowners, contractors, engineers, and anyone interested in modern plumbing solutions, this guide provides valuable insights into why trenchless pipe repair is becoming the preferred choice for pipe rehabilitation. Stay informed about the latest advancements and best practices in the field.
About
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Technical Specifications
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
Key Features
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface
• Compatible with MAFI CCR system
• Copatiable with IDM8000 CCR
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
Application
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Welcome to WIPAC Monthly the magazine brought to you by the LinkedIn Group Water Industry Process Automation & Control.
In this month's edition, along with this month's industry news to celebrate the 13 years since the group was created we have articles including
A case study of the used of Advanced Process Control at the Wastewater Treatment works at Lleida in Spain
A look back on an article on smart wastewater networks in order to see how the industry has measured up in the interim around the adoption of Digital Transformation in the Water Industry.
2. Topics Covered
• Comparison Between Microprocessors and
Microcontroller
• Features, Architecture & Pin configuration
• CPU Timing and Machine cycle
• I/P and O/P Ports
• Memory Organization
• Counters and Timers
• Interrupts
• Serial data I/P &O/P
Thursday, September 03, 2015 2By AMRUTA CHINTAWAR
3. Comparison Between P & C
P C
CPU is stand-alone, RAM, ROM, I/O,
timer are separate
CPU, RAM, ROM, I/O and timer are all
on a single chip
Designer can decide on the amount of
ROM, RAM and I/O ports
fix amount of on-chip ROM, RAM, I/P
O/P ports (internal h/w is fixed)
general-purpose single-purpose
Instructions are mainly to move large
volume of data
Many bit handling instructions along
with byte processing
More access time for peripherals-system
slower
Less access time on On-chip devices-
system faster
In contrast, similar system that builds
from uP would require a lot of
additional units
Only single chip can be a complete
system
Thursday, September 03, 2015 3By AMRUTA CHINTAWAR
4. Comparison Between P & C
P C
Implementation is complicated Implementation is easy
Bulkier, costly, less reliable and consume
more power
Compact, Cheaper, more reliable and
consume less power
S/W protection not possible - external
code memory
Possible –On chip memory
uPs are suitable to processing
information in computer systems.
uCs are suitable to control of I/O devices
in designs requiring a minimum
component
Thursday, September 03, 2015 4By AMRUTA CHINTAWAR
5. Features of 8051
• 12Mhz/ (11.0592Mhz to support standard baud rate for serial
port)
• 4K bytes ROM
• 128 bytes RAM
• Four 8-bit I/O ports (32 I/O pins)
• Two 8/16 bit timers
• Serial port-Asynchronous
• 64K external code memory space
• 64K data memory space
• Multiple internal and external interrupt sources (5 srcs)
Thursday, September 03, 2015 5By AMRUTA CHINTAWAR
7. Blocks of Architecture
• ALU
• Memory
• Peripherals
• Timing and Control Unit
• Oscillator
Thursday, September 03, 2015 7By AMRUTA CHINTAWAR
8. ALU
• 8-bit
• Performs all arithmetic and
logical operations
• Updates status flags(PSW)
Thursday, September 03, 2015 8By AMRUTA CHINTAWAR
9. Memory
• Separate On-chip Data and Code memor
• Code Memory-Programs instructions (ROM-4KB)
• Data memory-various Data (RAM-128B)
• Few RAM locations used to program control
various on-chip peripherals and features-SFRs
Thursday, September 03, 2015 9By AMRUTA CHINTAWAR
10. Peripherals
• 2, 16 bit Timers T0,T1
SFRs- TCON,TMOD,T0,T1
PINs-T0, T1
• 4,I/O ports P0,P1,P2,P3
SFRs-P0,P1,P2,P3
PINs-P0.0-P0.7 ,P1.0-P1.7
• Serial Port
SFRs-SCON,SBUF,PCON (1-bit)
PINs-Rxd,Txd
• Interrupts
SFRs-IP,IE,TCON
PINs-INT0,INT1 (H/W)Thursday, September 03, 2015 10By AMRUTA CHINTAWAR
11. Timing and Control
• Generate time and Control signal
• Necessary for Execution
• Synchronizes all activities with clock
Thursday, September 03, 2015 11By AMRUTA CHINTAWAR
14. Pin Configuration
• 40 pins DIP package
• Four 8-bit I/O port pins-has two functions
1. Vcc (pin 40): Power supply ,+5v
2. GND(pin 20) : supply is connected wrp to
ground
Thursday, September 03, 2015 14By AMRUTA CHINTAWAR
15. Pin Configuration
3. XTAL1 &XTAL2: The external resonant circuit is
connected to on-chip oscillator circuit .
• NORMALLY Quartz crystal and capacitor are
connected with XTAL1(pin 19) & XTAL2 (pin
18)
• Works at a frequency of crystal oscillator
• If clock signal external oscillator is used,its
onne ted to XTAL …XTAL is left
unconnected.
Thursday, September 03, 2015 15By AMRUTA CHINTAWAR
16. Pin Configuration
3. XTAL1 &XTAL2: The external resonant circuit
is connected to on-chip oscillator circuit .
• NORMALLY Quartz crystal and capacitor are
connected with XTAL1(pin 19) & XTAL2 (pin
18)
• Works at a frequency of crystal oscillator
• If clock signal external oscillator is used,its
onne ted to XTAL …XTAL is left
unconnected.
Thursday, September 03, 2015 16By AMRUTA CHINTAWAR
19. Pin Configuration
4.ALE/PROG#: Address latch Enable
• Used to Demultiplex address and data
• ALE=1,indicates presence of lower address bits on
P0,thus enable latch to store address.
• ALE=0, contents are latched, it retains till next ALE.
• ALE=0, P0 act as data bus
PROG#
• for on-chip flash memory programming
• After reset if this pin is low ,uC enters into
programming mode
Thursday, September 03, 2015 19By AMRUTA CHINTAWAR
21. Pin Configuration
5.RST: Reset
• Active high I/P
• Terminates all the activities
• Clears the contents of all the registers
• Default values will be loaded in SFRs
• Reset signal must be held high for at least 2
m/c cycles
Thursday, September 03, 2015 21By AMRUTA CHINTAWAR
23. Pin Configuration
6.PSEN#: Program store Enable
• Active low
• Activate external ROM/EPROM/EEPROM
• Connected to OE# of ROM chip
• not activated when On-chip ROM is accessed
Thursday, September 03, 2015 23By AMRUTA CHINTAWAR
24. Pin Configuration
7.EA#/VPP: External Access
• Active low, External Access, complete code on external ROM
• If high fetch code from on-chip ROM
• Connected to OE# of ROM chip
• not activated when On-chip ROM is accessed
• However any reference to program address outside the address range of
on-chip memory will automatically access External memory
Thursday, September 03, 2015 24By AMRUTA CHINTAWAR
25. Pin Configuration
8.PORT 0:
• 8-bit open drain bidirectional I/O port
• Occupies 8-pins
• Open drain external pull-up resistor of 10Kohm must be connected to each pin
• To program P0 as I/P, write 1 to lacth register
• It also has alternate function of ADD/DATA
• However any reference to program address outside the address range of on-chip
memory will automatically access External memory
Thursday, September 03, 2015 25By AMRUTA CHINTAWAR
26. Pin Configuration
9.PORT 1:
• 8-bit bidirectional I/O port
• Occupies 8-pins
• Has Internal pull-up resistor
• To program P1 as I/P, write 1 to latch register
Thursday, September 03, 2015 26By AMRUTA CHINTAWAR
27. Pin Configuration
9.PORT 2:
• 8-bit bidirectional I/O port
• Occupies 8-pins
• Has Internal pull-up resistor
• Act as Higher order address bus A8-A15 while accessing external memory
• To program P1 as I/P, write 1 to latch register
Thursday, September 03, 2015 27By AMRUTA CHINTAWAR
28. Pin Configuration
9.PORT 3:
• 8-bit bidirectional I/O port
• Occupies 8-pins
• Has Internal pull-up resistor
• Has alternate functions
• To program P1 as I/P, write 1 to latch register
• TXD & RXD , INT0# & INT1# , T0 & T1 ,WR# and Rd#
Thursday, September 03, 2015 28By AMRUTA CHINTAWAR
29. Programming Model
• H/W which is available for Programmer to
directly use it through S/W
• It is a collection of 8 and 16 bit register and 8
bit memory locations.
• Can be operated using software instructions
• Each register with exception of PC, has an
internal one byte address assigned to it.
Thursday, September 03, 2015 By AMRUTA CHINTAWAR 29
30. Programming Model
• Some registers such as TCON, SCON, IP, IE, A,
B, PSW and ports are all bit addressable and
are marked with * mark.
• These types have provision for reading or
writing the entire byte of data and also each
individual bits may be read or altered
• operations can be done by software
instructions that are generally able to specify a
register by its address or its symbolic name or
both
Thursday, September 03, 2015 By AMRUTA CHINTAWAR 30
34. I/P and O/P Port
• Ports can be accessed directly by instructions
during program execution
• I/O ports are memory mapped, they are
treated as memory locations
• All ports are bit addressable
• Each PIN consists of a D latch, I/P buffer and
O/P driver
• SFRs for each port is made of 8-latches
• Accessed by SFRs address or name of that port
Thursday, September 03, 2015 34By AMRUTA CHINTAWAR
48. Serial Port
• Slow Process
• To tie-up with valuable processor time serial
data flags are included
• Transmission is under control of program
• Reception unpredictable
• Many a times beyond control of program
• Programmers must write routine to clear flags
Thursday, September 03, 2015 48By AMRUTA CHINTAWAR
49. Serial Port
• Support full-duplex serial communication
• Transmit and receive buffer register with shift
register
• Logic for generating timing signal
• Status bit showing that data byte has been
sent
• Status bit to indicate data bytes has been
received
• Controlled by SBUF & SCON
Thursday, September 03, 2015 49By AMRUTA CHINTAWAR
54. Serial Modes
MODE 0 MODE 1,2,3
Fixed baud rate Variable by T1 and SMOD bit of
PCON
Thursday, September 03, 2015 54By AMRUTA CHINTAWAR
55. Serial Mode 0
• 8-bit half Duplex
• START/STOP Bit not required
• TRN and REN is on RxD
• TxD-provides shift clock for data transfer
-data shifted out at S6P2
-data shifted in after Rxd is sampled S5P2
-signal is square wave
-high for S6,S1,S2
-low for S3,S4,S5
• Timer1 baud rate f/12
• For high speed data collection
Thursday, September 03, 2015 55By AMRUTA CHINTAWAR
57. Serial Mode 1
• 10-bits per character, full duplex
• 1-start(0),8-data,1-stop bit(1)
• Start and stop bit -----discard
• RxD-receives
• TxD-Transmit
• TI=1-after all 10-bits transmitted
• RI=1-if SM2=0 unconditional
RB8=1 condition satisfies
Thursday, September 03, 2015 57By AMRUTA CHINTAWAR
58. Serial Mode 1
• Reception- START bit discarded
-8-Bit SBUF
-stop bit RB8
• Data received at programmed baud rate
fbaud =2smod /32 xT1
1/32 x T1 ----SMOD=0
1/16xT1 ----SMOD=1
Thursday, September 03, 2015 58By AMRUTA CHINTAWAR
60. Serial Mode 2
• 11-bits per character
• 1-start(0),8-data,9th-programmable,1-stop
bit(1)
9th- RB8 and 8-SBUF ------reception
9th -TB8 and 8-SBUF------transmission
• Start and stop bit -----discard
• Baud rate controlled by oscillator frequency
fbaud =2smod /64,1/64,1/32 x OSC freq
Thursday, September 03, 2015 60By AMRUTA CHINTAWAR
61. Serial Mode 3
• Operates like Mode 2
only
• Baud rate is variable
Thursday, September 03, 2015 61By AMRUTA CHINTAWAR
62. Serial Mode 2 & 3
Thursday, September 03, 2015 62By AMRUTA CHINTAWAR
63. Interrupts
• It’s a signal generated y an event that auses
the controller to stop temporarily its current
program
• Performs ISR to service that event(Interrupt
handler)
• These events are asynchronous generated by
peripherals
• It allows most efficient utilization of resources
and time
• It’s a H/W generated all
Thursday, September 03, 2015 63By AMRUTA CHINTAWAR
64. Interrupts of 8051
• The source may be internal peripheral or
external devices
• Total 5---3 internal & 2 H/W
• Internal– Timer0 (TF0),Timer1(TF1),serial
port(TI/RI)
• External--INT0#,INT1#,also referred as IE0,IE1
• Each interrupt has fixed memory location that
contains its ISR
• ISRs are stored in IVT
Thursday, September 03, 2015 64Thursday, September 03, 2015 64By AMRUTA CHINTAWAR
65. Interrupts of 8051
• All flags auto clear except RI/TI it has to be
cleared manually
Thursday, September 03, 2015 65Thursday, September 03, 2015 65By AMRUTA CHINTAWAR
68. Power Saving Modes
• Two Power saving modes activated by
programming PCON
• IDLE and POWER DOWN mode
• Most important factor to save powe
consumption is to use crystal frequency just
sufficient for application
• Operating with higher frequency will consume
more power
Thursday, September 03, 2015 68Thursday, September 03, 2015 68By AMRUTA CHINTAWAR
69. IDLE Mode
• By setting IDLE bit in PCON =1
• Stops program execution and contents of
internal RAM are preserved
• Oscillator continues to run,but clock is
disconnected from CPU
• Timer and serial port operates normally
• Come out by activation of any Interrupt or
RESET,this will make IDLE=0
• After execution of ISR,program resume from
instruction after set idle.
Thursday, September 03, 2015 69Thursday, September 03, 2015 69By AMRUTA CHINTAWAR
70. Power Down Mode
• By setting PWDN=1
• Stops on chip oscillator
• Program execution, timers and serial port
operation also stops
• Content of internal RAM are preserved
• Come out of by RESET
Thursday, September 03, 2015 70Thursday, September 03, 2015 70By AMRUTA CHINTAWAR