The document appears to be a long string of repeating binary digits (010101010101...) with no other meaningful information. It consists entirely of binary numbers with no spaces or punctuation.
Keil is a cross compiler that allows developers to write code for embedded systems like the 8051 on host computers. It provides an integrated development environment with tools like a compiler, assembler, linker and debugger. The Keil evaluation package is freely available and allows assembly and debugging of files up to 2K. Keil tools improve embedded software development by reducing time spent, improving reliability, and making maintenance and code portability easier.
Sistemas digitales principios y aplicaciones ronald tocci - 5º ediciónAlex Soto
Este documento describe los pasos para instalar un nuevo sistema de seguridad en una casa. Explica que primero se debe desconectar el sistema de seguridad existente, luego instalar los nuevos sensores en ventanas y puertas. Finalmente, se programa el controlador central para monitorear los sensores y enviar alertas cuando se detecte actividad.
The document discusses the benefits of exercise for mental health. Regular physical activity can help reduce anxiety and depression and improve mood and cognitive function. Exercise causes chemical changes in the brain that may help protect against mental illness and improve symptoms.
This document provides an overview of diabetes mellitus (DM), including the three main types (Type 1, Type 2, and gestational diabetes), signs and symptoms, complications, pathophysiology, oral manifestations, dental management considerations, emergency management, diagnosis, and treatment. DM is caused by either the pancreas not producing enough insulin or cells not responding properly to insulin, resulting in high blood sugar levels. The document compares and contrasts the characteristics of Type 1 and Type 2 DM.
Power Point Presentation on Artificial Intelligence Anushka Ghosh
Its a Power Point Presentation on Artificial Intelligence.I hope you will find this helpful. Thank you.
You can also find out my another PPT on Artificial Intelligence.The link is given below--
https://www.slideshare.net/AnushkaGhosh5/ppt-presentation-on-artificial-intelligence
Anushka Ghosh
The document summarizes key aspects of the Safe Spaces Act, which aims to address gender-based sexual harassment. It defines harassment in public spaces, online, and work/educational settings. Acts considered harassment include catcalling, unwanted comments on appearance, stalking, and distributing intimate photos without consent. Those found guilty face penalties like imprisonment or fines. The law also requires employers and educational institutions to disseminate the law, prevent harassment, and address complaints through committees.
This document defines hypertension and describes its types, etiology, risk factors, pathophysiology, clinical features, diagnostic evaluations, and management. Hypertension is defined as a systolic blood pressure of 140 mmHg or higher and/or a diastolic blood pressure of 90 mmHg or higher. It is managed primarily through lifestyle modifications like diet and exercise changes as well as pharmacological therapies including diuretics, beta blockers, ACE inhibitors, and calcium channel blockers. Nursing care involves monitoring the patient's condition, educating on lifestyle changes, and ensuring proper treatment adherence.
The document discusses the nursing process, which includes assessment, nursing diagnosis, planning, implementation, and evaluation. It describes each component in detail. Assessment involves collecting client data through various methods. Nursing diagnosis identifies client problems based on the assessment. Planning establishes goals and interventions. Implementation carries out the planned interventions. Evaluation assesses client progress and intervention effectiveness. The nursing process is a systematic approach to providing individualized care.
This document provides an introduction to pins, ports, and configuring pins on the ARM LPC2148 microcontroller. It discusses pin configuration, the different ports on the LPC2148, and how to configure pins as inputs, outputs, or alternate functions using the various IO registers. It also provides an example program for blinking an LED connected to pin P1.16 to demonstrate basic pin configuration and output. The document concludes with an assignment to draw the LED blinking circuit and modify the program to blink LEDs on pins P0.16 through P0.23.
This document discusses the architecture of Xilinx Cool Runner CPLDs. It provides an overview of Xilinx CPLD technologies including Cool Runner XPLA3 and Cool Runner-II. For the Cool Runner XPLA3, it describes the features and specifications, and details the architecture including the high-level block diagram, function block, macrocell, and I/O cell. For the Cool Runner-II, it lists the key features and specifications. The document is intended to explain the architectures of these Xilinx CPLD families.
The document describes an experiment to write VHDL code for basic logic gates. It includes the truth tables, logic diagrams, and VHDL code for AND, OR, NOT, NAND, NOR, and EXOR gates. Waveform diagrams are provided to simulate the behavior of each gate.
* What are Embedded Systems?
* C for Embedded Systems vs. Embedded C.
* Code Compilation process.
* Error types.
* Code Compilation using command line.
This document reports on the design and simulation of an audio amplifier circuit. Key specifications of the amplifier include a voltage gain of 76db, input impedance greater than 10k ohms, lower cutoff frequency of 2.572Hz, and upper cutoff frequency of 852.56kHz. The circuit uses BJT transistors in three gain stages and a complementary-symmetry Darlington pair power stage. Simulation results show the circuit meets specifications for gain, frequency response, input resistance, and voltage swing. Some challenges included achieving the needed 15V voltage swing but this was resolved using variable resistors.
This document provides an overview of embedded systems and the AVR microcontroller. It discusses how embedded systems combine hardware and software to perform tasks like processing and storing data. Examples of embedded systems include those used in biotechnology, telecom, military, automotive, and consumer electronics. It then describes the AVR microcontroller, its features, memory segments, pin descriptions, and how to interface it with hardware using Embedded C. Code examples are provided to blink LEDs and interface with 7-segment displays and LCDs.
This document summarizes different types of surveillance equipment including cameras, recording devices, and accessories. It describes dome, box, bullet, and IP camera styles and their applications. It also discusses digital video recorders, network video recorders, hybrid video recorders for recording analog and IP camera feeds. Other equipment like UPS systems, racks, cabling standards and power options are also summarized.
Seminar on Home Automation Using Raspberry PiBittu Kumar
This is the seminar on "Home automation using raspberry pi" which is helpful for the final year college going student. I have covered the basic under standing about the components and working of the home automation.
The document provides an overview of microcontrollers and embedded systems. It defines an embedded system and describes their characteristics such as real-time operation, small size, low power usage, and operation in harsh environments. It discusses the hardware components of typical embedded systems including microcontrollers. It then focuses on the 8051 microcontroller, describing its architecture and pin layout.
The document discusses the Embedded Development Life Cycle (EDLC), which is an analysis-design-implementation approach to product development. The EDLC involves analyzing customer needs, designing solutions, and implementing products. It aims to ensure high quality, minimize risks, and maximize productivity. The key phases of the EDLC include requirements analysis, design, development and testing, deployment, and support. Modeling approaches for the EDLC include iterative, incremental, fountain, prototyping, evolutionary, and spiral models. The EDLC process is essential for understanding complexities in embedded product development and defining interactions among project teams.
Question bank on Microcontroller 8051/AT89C51. Total 98 questions. Covering questions on introduction, programming, timers of 8051, serial communication of 8051, interrupts of 8051, memory interfacing, and applications.
This project is called ‘Voice Controlled Home Automation project using Arduino’
which enables a user to control the home appliances through voice commands sent to
an Android app i.e AMR voice app.
The Altera FLEX 8000 FPGA architecture uses logic elements (LEs) that each contain a 4-input lookup table and flip-flop. Eight LEs are grouped into a logic array block (LAB). The FLEX 8000 interconnect is faster than the MAX 9000 due to its finer granularity. It has 168 horizontal interconnect channels per row and 16 vertical channels per column, creating a 10:1 aspect ratio. Configuration of the FLEX 8000 SRAM takes around 100ms to load the programming information.
It is a presentation for the Embedded System Basics. It will be very useful for the engineering students who need to know the basics of Embedded System.
This document summarizes a student project on remote patient monitoring using GSM and embedded technology. The system monitors a patient's heartbeat rate and temperature and sends the data to a monitoring center. The monitoring center provides real-time analysis and alerts for emergencies or diagnoses. The system consists of sensors to measure the vital signs, a microcontroller to process the data, a GSM module to transmit the data to the monitoring center, and an LCD display to show the readings locally. The project aims to make monitoring patients more convenient and help detect health issues faster.
Sound and air pollution are a prominent subject that in our country continues to be highlighted every year.The Air Quality Index(AQI) in certain sections of the nation exceeds 500 and in traffic sounds exceeds 100 dB. Air quality and sound amplitude must be monitored for a better and safer life for everybody.
We present here a method for air pollution monitoring and sound pollution control that enables us to monitor live air Pollution and sound contamination by IOT in a region.
This document introduces Kenny Wei and his company EPZL. It provides details about the company's history, locations, products, services, and advantages. EPZL manufactures LED TV backlight strips and parts. It has offices in China and can produce 200,000 light bars per month. The company prides itself on its fast delivery, high credit guarantee, large product selection of over 100 models, and customer service response rate of 95% within 24 hours. Feedback from customers in countries like Peru, Russia, and Portugal praise EPZL's product quality and service.
This document provides an introduction to pins, ports, and configuring pins on the ARM LPC2148 microcontroller. It discusses pin configuration, the different ports on the LPC2148, and how to configure pins as inputs, outputs, or alternate functions using the various IO registers. It also provides an example program for blinking an LED connected to pin P1.16 to demonstrate basic pin configuration and output. The document concludes with an assignment to draw the LED blinking circuit and modify the program to blink LEDs on pins P0.16 through P0.23.
This document discusses the architecture of Xilinx Cool Runner CPLDs. It provides an overview of Xilinx CPLD technologies including Cool Runner XPLA3 and Cool Runner-II. For the Cool Runner XPLA3, it describes the features and specifications, and details the architecture including the high-level block diagram, function block, macrocell, and I/O cell. For the Cool Runner-II, it lists the key features and specifications. The document is intended to explain the architectures of these Xilinx CPLD families.
The document describes an experiment to write VHDL code for basic logic gates. It includes the truth tables, logic diagrams, and VHDL code for AND, OR, NOT, NAND, NOR, and EXOR gates. Waveform diagrams are provided to simulate the behavior of each gate.
* What are Embedded Systems?
* C for Embedded Systems vs. Embedded C.
* Code Compilation process.
* Error types.
* Code Compilation using command line.
This document reports on the design and simulation of an audio amplifier circuit. Key specifications of the amplifier include a voltage gain of 76db, input impedance greater than 10k ohms, lower cutoff frequency of 2.572Hz, and upper cutoff frequency of 852.56kHz. The circuit uses BJT transistors in three gain stages and a complementary-symmetry Darlington pair power stage. Simulation results show the circuit meets specifications for gain, frequency response, input resistance, and voltage swing. Some challenges included achieving the needed 15V voltage swing but this was resolved using variable resistors.
This document provides an overview of embedded systems and the AVR microcontroller. It discusses how embedded systems combine hardware and software to perform tasks like processing and storing data. Examples of embedded systems include those used in biotechnology, telecom, military, automotive, and consumer electronics. It then describes the AVR microcontroller, its features, memory segments, pin descriptions, and how to interface it with hardware using Embedded C. Code examples are provided to blink LEDs and interface with 7-segment displays and LCDs.
This document summarizes different types of surveillance equipment including cameras, recording devices, and accessories. It describes dome, box, bullet, and IP camera styles and their applications. It also discusses digital video recorders, network video recorders, hybrid video recorders for recording analog and IP camera feeds. Other equipment like UPS systems, racks, cabling standards and power options are also summarized.
Seminar on Home Automation Using Raspberry PiBittu Kumar
This is the seminar on "Home automation using raspberry pi" which is helpful for the final year college going student. I have covered the basic under standing about the components and working of the home automation.
The document provides an overview of microcontrollers and embedded systems. It defines an embedded system and describes their characteristics such as real-time operation, small size, low power usage, and operation in harsh environments. It discusses the hardware components of typical embedded systems including microcontrollers. It then focuses on the 8051 microcontroller, describing its architecture and pin layout.
The document discusses the Embedded Development Life Cycle (EDLC), which is an analysis-design-implementation approach to product development. The EDLC involves analyzing customer needs, designing solutions, and implementing products. It aims to ensure high quality, minimize risks, and maximize productivity. The key phases of the EDLC include requirements analysis, design, development and testing, deployment, and support. Modeling approaches for the EDLC include iterative, incremental, fountain, prototyping, evolutionary, and spiral models. The EDLC process is essential for understanding complexities in embedded product development and defining interactions among project teams.
Question bank on Microcontroller 8051/AT89C51. Total 98 questions. Covering questions on introduction, programming, timers of 8051, serial communication of 8051, interrupts of 8051, memory interfacing, and applications.
This project is called ‘Voice Controlled Home Automation project using Arduino’
which enables a user to control the home appliances through voice commands sent to
an Android app i.e AMR voice app.
The Altera FLEX 8000 FPGA architecture uses logic elements (LEs) that each contain a 4-input lookup table and flip-flop. Eight LEs are grouped into a logic array block (LAB). The FLEX 8000 interconnect is faster than the MAX 9000 due to its finer granularity. It has 168 horizontal interconnect channels per row and 16 vertical channels per column, creating a 10:1 aspect ratio. Configuration of the FLEX 8000 SRAM takes around 100ms to load the programming information.
It is a presentation for the Embedded System Basics. It will be very useful for the engineering students who need to know the basics of Embedded System.
This document summarizes a student project on remote patient monitoring using GSM and embedded technology. The system monitors a patient's heartbeat rate and temperature and sends the data to a monitoring center. The monitoring center provides real-time analysis and alerts for emergencies or diagnoses. The system consists of sensors to measure the vital signs, a microcontroller to process the data, a GSM module to transmit the data to the monitoring center, and an LCD display to show the readings locally. The project aims to make monitoring patients more convenient and help detect health issues faster.
Sound and air pollution are a prominent subject that in our country continues to be highlighted every year.The Air Quality Index(AQI) in certain sections of the nation exceeds 500 and in traffic sounds exceeds 100 dB. Air quality and sound amplitude must be monitored for a better and safer life for everybody.
We present here a method for air pollution monitoring and sound pollution control that enables us to monitor live air Pollution and sound contamination by IOT in a region.
This document introduces Kenny Wei and his company EPZL. It provides details about the company's history, locations, products, services, and advantages. EPZL manufactures LED TV backlight strips and parts. It has offices in China and can produce 200,000 light bars per month. The company prides itself on its fast delivery, high credit guarantee, large product selection of over 100 models, and customer service response rate of 95% within 24 hours. Feedback from customers in countries like Peru, Russia, and Portugal praise EPZL's product quality and service.
The following resources come from the 2009/10 BEng in Digital Systems and Computer Engineering (course number 2ELE0065) from the University of Hertfordshire. All the mini projects are designed as level two modules of the undergraduate programmes.
The objectives of this module are to demonstrate, within an embedded development environment:
• Processor – to – processor communication
• Multiple processors to perform one computation task using parallel processing
This project requires the establishment of a communication protocol between two 68000-based microcomputer systems. Using ‘C’, students will write software to control all aspects of complex data transfer system, demonstrating knowledge of handshaking, transmission protocols, transmission overhead, bandwidth, memory addressing. Students will then demonstrate and analyse parallel processing of a mathematical problem using two processors. This project requires two students working as a team.
The data that your business collects is constantly growing, making it increasingly difficult for traditional systems to keep up with resource demands. Understanding your big data can help you serve your customers better, improve product quality, and grow your revenue, but you need a platform that can handle the strain.
In hands-on tests in our datacenter, the Scalable Modular Server DX2000 from NEC processed big data quickly and scaled nearly linearly as we added server nodes. In our k-means data cluster analysis test, a DX2000 solution running Apache Spark and Red Hat Enterprise Linux OpenStack Platform processed 100GB in approximately 2 minutes. We also saw that as we doubled the number of server nodes, the DX2000 solution cut analysis time in half when processing the same amount of data, producing excellent scalability.
The Scalable Modular Server DX2000 by NEC is a good choice when you’re ready to put big data to work for you.
Start Manufacturing Business of Aluminium Easy Open End (EOE). Highly Profita...Ajjay Kumar Gupta
Start Manufacturing Business of Aluminium Easy Open End (EOE). Highly Profitable Industry of Aluminium Products.
One sort of easy-open end that is extensively used is the so-called "full-open" end, in which a peripheral score, often circular in configuration, is created in the end panel at or next to its periphery to permit its total opening.
For More Detail: https://bit.ly/3visY1o
Contact us
Niir Project Consultancy Services
An ISO 9001:2015 Company
106-E, Kamla Nagar, Opp. Mall ST,
New Delhi-110007, India.
Email: [email protected], [email protected]
Tel: +91-11-23843955, 23845654, 23845886
Mobile: +91-9097075054, 8800733955
Website: www.entrepreneurindia.co, www.niir.org
Creating first project in mikroC PRO for 8051inovabrasil
Fonte: http://www.mikroe.com/downloads/get/304/1st_project_8051_c_v100.pdf [27/03/2014]
Programação de microcontroladores 8051 (MCS-51) em linguagem C.
Para baixar a versão demo do programa compilador mikroC PRO for 8051 [site da MikroElektronika]:
http://www.mikroe.com/mikroc/8051/overview/
apidays LIVE Hong Kong - Open Banking, Yin and Yang in Hong Kong by Simon Red...apidays
apidays LIVE Hong Kong - The Open API Economy: Finance-as-a-Service & API Ecosystems
Open Banking, Yin and Yang in Hong Kong
Simon Redfern, Founder and CEO of Open Bank Project
This PDF serves as a practical guide to microprocessors and controllers for electrical engineering students at Sarvajanik College of Engineering and Technology (SCET GTU). It goes beyond theory, offering practical solutions and applications tailored to the SCET GTU curriculum.
This resource aims to equip students with the skills to implement and utilize microprocessors and controllers effectively in real-world electrical engineering projects.
Inteltronic display product line overview 2011Inteltronic-Inc
This document provides an overview of Inteltronic Inc.'s display product line in 2011. It discusses Inteltronic's parent company Wah Lee, which has annual sales of $2 billion and focuses on semiconductors, computers/communications, PCB/motherboards, and green energy/optoelectronics. Inteltronic is the US sales channel for Wah Lee divisions and offers OLED modules, TFT modules, touch panels, solar materials, LED lighting, and PCB. The document then summarizes Wah Lee's opto-electronics and green energy division and the products and services it offers related to LCD module manufacturing, LED, solar, and equipment.
This document provides an introduction to an Arduino starter kit, including what is included in the kit and how to use the included book to learn about the Arduino hardware, software, and programming. The kit contains an Arduino Uno board, sensors, displays, and other components. The book guides the user through 16 projects of increasing complexity to teach Arduino skills. It assumes no prior knowledge and provides step-by-step instructions and diagrams to help users build each project and understand how the code and hardware work together.
This document provides a management summary and recommendations for enhancing the supply chain between Telerex and its customer Atos Worldline. The main problems identified are long product lead times of 12 weeks and limited production capacity. The long lead times are due to issues in the supply chain and sourcing raw materials, while production capacity is limited by bottlenecks in manufacturing. The recommendations are to have suppliers keep stock of hard-to-source components to reduce lead times to 8 weeks, and transfer some production to suppliers to increase their capacity to 12,000 units per month. This would improve supply chain flexibility while minimizing costs. It is also recommended to improve supplier relationships, update contract terms, and involve purchasers earlier in projects.
Condroid KTH Summer CSD 2011 - Final ReportLaili Aidi
Condroid KTH Summer CSD 2011 - Final Report. Download the document in http://csd.xen.ssvl.kth.se/csdlive/content/final-deliverables-3
This lab report describes a student's design of basic logic gates and an integrated circuit using CMOS technology. The student first designed a single 2-input NAND gate with dimensions of 42μm x 35μm. They then combined four of these NAND gates into an integrated circuit layout for an IC4011 by copying, moving, and connecting the individual gates. Finally, the completed IC measured 98μm x 90μm, containing four NAND gates arranged to form a basic 4011 integrated circuit.
This document is a newsletter from security consulting firm XMCO Partners. It discusses the Stuxnet malware, including analyzing its myths and realities in part one and its technical workings in part two. It also covers the MS10-073 "keyboard layout" vulnerability exploited by Stuxnet, current hacking news, and blogs and software mentioned by the firm. The newsletter is intended to keep clients informed of recent security topics and XMCO's services, which include intrusion testing, security audits, and vulnerability monitoring.
Industrial Applications of Arduino using Ladder LogicRobocraze
This document provides an overview of using Arduino boards in industrial applications. It discusses the Arduino Pro series of boards including the Portenta H7, Edge Control, Nicla Sense ME, Nano 33 BLE, and MKR family. It then introduces ladder logic programming, the basics of how it works, and demonstrates it using an online IDE called IECuino. Circuit diagrams and programming examples for turning on an LED using buttons are provided to illustrate ladder logic programming with Arduino. The document concludes with information on asking questions.
A flexible organic light-emitting diode (FOLED) is a type of OLED that uses a flexible plastic substrate, allowing the device to be bent or rolled while still operating. FOLEDs are currently a focus of research in both industrial and academic groups. They have advantages like being lightweight, durable, and having a fast refresh rate that make them suitable for applications like phones, monitors, and electronic signs. However, challenges remain in improving their lifespan, water resistance, and reducing production costs before widespread adoption.
The document is a product catalog for TouchWo that includes:
- An overview of TouchWo's business structure, certifications, and applications.
- Specification sheets for a wide range of touchscreen and touch monitor products in various sizes ranging from 7-43 inches, along with embedded panel PCs, open frame panels, kiosks, and floor stand kiosks.
- The catalog provides details on hardware specifications, features, connectivity options, and customization capabilities for TouchWo's commercial-grade touch displays and devices.
This document provides an advertisement for OCR Servant, an optical character recognition (OCR) software for the NeXT workstation. It highlights that OCR Servant can recognize almost any font or type style at speeds of up to 200 characters per second, and converts scanned documents to ASCII text that can be used in any word processor. The ad encourages readers to contact HSD Microcomputer U.S., Inc. to learn more about OCR Servant and their family of color and grayscale scanners that are compatible with the NeXT workstation.
This is Eight Channel relay board controlled by Bluetooth Module. The Bluetooth relay board is with 8
SPDT relays rated up to 7A each. You can control devices 230V / 120V (up to 8) directly with one such
relay unit. Suitable for home automation applications, hobby projects, industrial
automation. Bluetooth module enables you to wireless transmit & receive serial data.
4 Channel Relay Board 5V-Bluetooth Compatible for ArduinoRaghav Shetty
Bluetooth technology is a short distance communication technology used by almost all phones
including smart phones and all laptops. This technology find very wide uses including that of Home &
Industrial automation.
The Relay shield is capable of controlling 4 relays. The max switching power could be
12A/250VAC or 15A/24VDC. It could be directly controlled by Arduino through digital IOs.
4 Channel Relay Board 12V-Compatible for ArduinoRaghav Shetty
4 Channel Relay Board 12V-Compatible for Arduino. The Relay shield is capable of controlling 4
relays. The max switching power could be 10A/120VAC or 10A/24VDC. It could be directly controlled by
Arduino through digital IOs. Each relay can switch variety of AC or DC high voltage, high current loads
working at 110V or 220V AC 7Amps mains like lights, fans, motors etc.
This is Eight Channel relay board controlled through RS485 protocol. The RS485 relay
board is with 8 SPDT relays rated up to 7A each. You can control devices 230V / 120V (up to 8)
directly with one such relay unit. Suitable for home automation applications, hobby projects,
industrial automation.
XBee is very easy and popular wireless device. It is a transceiver, it can transmit and it receive
data wirelessly. There are several types of XBee module. The very popular XBee is Series 1
(802.15.4), comes with the firmware to create connection for point to point or star network. But
bear in mind, many people actually thought it is using ZigBee protocol, but it is not compliance
to ZigBee because it uses the low layer of ZigBee protocol only
This basic piezo sensor can be used in anti-theft devices, electronic locks, mechanical equipment vibration detection, sound gesture application and detection range bull's-eye counts vibration sensor occasions. These vibration levels could be given to any controller/processor and necessary decisions could be taken through it. Module triple output mode, digital output simple, analog output more accurate, serial output with exact readings.
Support 5V-9V wide power voltage, Low-noise direct thermal printing method, can support Max.39MM (diameter) paper roll,RS-232C/TTL Interface, rich of graphics / curves / characters print function, Easy paper loading structure, outline dimension : 111W*65D*57H mm.
This document describes a digital soil moisture sensor that can be used to automatically monitor soil moisture levels and trigger watering systems. The sensor outputs a digital signal indicating soil moisture levels and can connect to devices like Arduino. It works by measuring the dielectric constant of soil which corresponds to moisture level. The sensor has adjustable sensitivity and threshold levels and provides digital, analog or serial output of moisture readings for various microcontroller applications.
Micro SD Memory Card Interface for 5V MCURaghav Shetty
This is a wonderful little SD card interface module. It is easily interfaced as a peripheral to your module. Through programming, you can read and write to the SD card. All SD Card works on 3V interface so if your microcontroller is working on 5V you will need to convert these signals.. All SD Card works on 3V interface so if your microcontroller is working on 5V you will need to convert these signals.
Micro SD Memory Card Interface for 3.3V MCURaghav Shetty
This is a wonderful little SD card interface module. It is easily interfaced as a peripheral to your module. Through programming, you can read and write to the SD card.All SD Card works on 3V interface so if your microcontroller is working on 3V you can use this board readily. The interface board provided is for microcontrollers running at 3V.
The regulated power supply accepts unregulated inputs from 9V to 15V AC or DC and gives regulated output of 3.3V, 5V and 12V suitable for projects which needs precise voltage to work. The input can come from step down transformer. Since board has Diode Bridge input polarity does not matter. All outputs are brought to screw terminal. There is also an unregulated output voltage to drive high current loads like relays and motors.
With this board you can develop and prototype with any of Microchip's 40 pin PIC microcontrollers. The RS232 driver on board allows easy connection with PC or other embedded hardware. The bridge rectifier allow this board to be powered with both AC and DC power supply adapters
8 Channel Bi Directional Logic Level ConverterRaghav Shetty
Because the Arduino (and Basic Stamp) are 5V devices, and most modern sensors, displays, flash cards and modes are 3.3V-only, many makers find that they need to perform level shifting/conversion to protect the 3.3V device from 5V.This 8-bit non inverting translator uses two separate configurable power-supply rails. The A port is designed to track VCCA. VCCA accepts any supply voltage from 1.2 V to 3.6 V. The B port is designed to track VCCB. VCCB accepts any supply voltage from 1.65 V to 5.5 V. This allows for universal low-voltage bidirectional translation between any of the 1.2-V, 1.5-V, 1.8-V, 2.5-V, 3.3-V, and 5-V voltage nodes. VCCA should not exceed VCCB.
One of the basic interfacing requirements for the hobbyists or electronics enthusiasts is I/P (keypad) and O/P (LCD display) for prototype applications. This shield uses minimum number I/O’s that is 4 bits for LCD data and 2 control signal lines for the same. A single analog pin (Pin A0) is multiplexed to read 5 input key switches (Navigation keys). Each key has been pulled up to a different voltage level, so a different voltage will be generated every time a user selects a key. This voltage could be read by the analog pin A0 on the board. Hence saves the no of I/O pins. The backlight of the LCD could be controlled by setting PWM (Pin D10) by adding a few lines of code.
The L298 Driver is a high voltage, high current dual ful bridge driver designed to accept standard TTL logic levels and drive inductive loads such relays, solenoids, DC and stepping motors. Two enable inputs are provided to enable or disable the device independently of the input signals. The emitters of the lower transistors of each bridge are connected together the corresponding external terminal can be used for the connection of an external sensing resistor.
The Joystick Shield easily stacks on top of your ATmega 328 and turns it into a simple robotic and gaming controller. Six momentary push buttons (4+2), a two-axis thumb joystick and optional remote transmission adapter for Xbee and Bluetooth allows your ATmega 328 to control from remote location. ATmega 328 digital pins D3-D8 are connected to momentary push buttons, when pressed they will pull the pin HIGH. Voltage accross analog pin 0 varies proportionally for the vertical movement of the joystick, like wise horizontal movement can be tracked at analog pin 1.Xbee Dout is connected to D0(Rx) and Din is connected to D1(Tx) of ATmega 328 sheild.
This is a force sensitive resistor with a round, 0.5" diameter, sensing area. This FSR will vary its resistance depending on how much pressure is being applied to the sensing area. The harder the force, the lower the resistance. When no pressure is being applied to the FSR its resistance will be larger than 1M. This FSR can sense applied force anywhere in the range of 100g-10kg.
Level switch magnetic reed switch and float by the composition of the reed switch encapsulated in the guide rod , fitted with a ring magnet in the float when the float moves up and down with the measured liquid level , its internal magnet to attract magnetic reed switch contact action , thereby detecting the level position as a level control or direction
Flex Sensor 4.2" ROHS Compliant Description: A simple flex sensor 4.2" in length. As the sensor is flexed, the resistance across the sensor increases. The resistance of the flex sensor changes when the metal pads are on the outside of the bend (text on inside of bend). Connector is0.1" spaced and bread board friendly. Note: Please refrain from flexing or straining this sensor at the base. The usable range of the sensor can be flexed without a problem, but care should be taken to minimize flexing outside of the usable range. For best results, securely mount the base and bottom portion and only allow the actual flex sensor to flex.
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025João Esperancinha
This is an updated version of the original presentation I did at the LJC in 2024 at the Couchbase offices. This version, tailored for DevoxxUK 2025, explores all of what the original one did, with some extras. How do Virtual Threads can potentially affect the development of resilient services? If you are implementing services in the JVM, odds are that you are using the Spring Framework. As the development of possibilities for the JVM continues, Spring is constantly evolving with it. This presentation was created to spark that discussion and makes us reflect about out available options so that we can do our best to make the best decisions going forward. As an extra, this presentation talks about connecting to databases with JPA or JDBC, what exactly plays in when working with Java Virtual Threads and where they are still limited, what happens with reactive services when using WebFlux alone or in combination with Java Virtual Threads and finally a quick run through Thread Pinning and why it might be irrelevant for the JDK24.
Zilliz Cloud Monthly Technical Review: May 2025Zilliz
About this webinar
Join our monthly demo for a technical overview of Zilliz Cloud, a highly scalable and performant vector database service for AI applications
Topics covered
- Zilliz Cloud's scalable architecture
- Key features of the developer-friendly UI
- Security best practices and data privacy
- Highlights from recent product releases
This webinar is an excellent opportunity for developers to learn about Zilliz Cloud's capabilities and how it can support their AI projects. Register now to join our community and stay up-to-date with the latest vector database technology.
Slides for the session delivered at Devoxx UK 2025 - Londo.
Discover how to seamlessly integrate AI LLM models into your website using cutting-edge techniques like new client-side APIs and cloud services. Learn how to execute AI models in the front-end without incurring cloud fees by leveraging Chrome's Gemini Nano model using the window.ai inference API, or utilizing WebNN, WebGPU, and WebAssembly for open-source models.
This session dives into API integration, token management, secure prompting, and practical demos to get you started with AI on the web.
Unlock the power of AI on the web while having fun along the way!
AI Agents at Work: UiPath, Maestro & the Future of DocumentsUiPathCommunity
Do you find yourself whispering sweet nothings to OCR engines, praying they catch that one rogue VAT number? Well, it’s time to let automation do the heavy lifting – with brains and brawn.
Join us for a high-energy UiPath Community session where we crack open the vault of Document Understanding and introduce you to the future’s favorite buzzword with actual bite: Agentic AI.
This isn’t your average “drag-and-drop-and-hope-it-works” demo. We’re going deep into how intelligent automation can revolutionize the way you deal with invoices – turning chaos into clarity and PDFs into productivity. From real-world use cases to live demos, we’ll show you how to move from manually verifying line items to sipping your coffee while your digital coworkers do the grunt work:
📕 Agenda:
🤖 Bots with brains: how Agentic AI takes automation from reactive to proactive
🔍 How DU handles everything from pristine PDFs to coffee-stained scans (we’ve seen it all)
🧠 The magic of context-aware AI agents who actually know what they’re doing
💥 A live walkthrough that’s part tech, part magic trick (minus the smoke and mirrors)
🗣️ Honest lessons, best practices, and “don’t do this unless you enjoy crying” warnings from the field
So whether you’re an automation veteran or you still think “AI” stands for “Another Invoice,” this session will leave you laughing, learning, and ready to level up your invoice game.
Don’t miss your chance to see how UiPath, DU, and Agentic AI can team up to turn your invoice nightmares into automation dreams.
This session streamed live on May 07, 2025, 13:00 GMT.
Join us and check out all our past and upcoming UiPath Community sessions at:
👉 https://community.uipath.com/dublin-belfast/
AI 3-in-1: Agents, RAG, and Local Models - Brent LasterAll Things Open
Presented at All Things Open RTP Meetup
Presented by Brent Laster - President & Lead Trainer, Tech Skills Transformations LLC
Talk Title: AI 3-in-1: Agents, RAG, and Local Models
Abstract:
Learning and understanding AI concepts is satisfying and rewarding, but the fun part is learning how to work with AI yourself. In this presentation, author, trainer, and experienced technologist Brent Laster will help you do both! We’ll explain why and how to run AI models locally, the basic ideas of agents and RAG, and show how to assemble a simple AI agent in Python that leverages RAG and uses a local model through Ollama.
No experience is needed on these technologies, although we do assume you do have a basic understanding of LLMs.
This will be a fast-paced, engaging mixture of presentations interspersed with code explanations and demos building up to the finished product – something you’ll be able to replicate yourself after the session!
fennec fox optimization algorithm for optimal solutionshallal2
Imagine you have a group of fennec foxes searching for the best spot to find food (the optimal solution to a problem). Each fox represents a possible solution and carries a unique "strategy" (set of parameters) to find food. These strategies are organized in a table (matrix X), where each row is a fox, and each column is a parameter they adjust, like digging depth or speed.
AI-proof your career by Olivier Vroom and David WIlliamsonUXPA Boston
This talk explores the evolving role of AI in UX design and the ongoing debate about whether AI might replace UX professionals. The discussion will explore how AI is shaping workflows, where human skills remain essential, and how designers can adapt. Attendees will gain insights into the ways AI can enhance creativity, streamline processes, and create new challenges for UX professionals.
AI’s influence on UX is growing, from automating research analysis to generating design prototypes. While some believe AI could make most workers (including designers) obsolete, AI can also be seen as an enhancement rather than a replacement. This session, featuring two speakers, will examine both perspectives and provide practical ideas for integrating AI into design workflows, developing AI literacy, and staying adaptable as the field continues to change.
The session will include a relatively long guided Q&A and discussion section, encouraging attendees to philosophize, share reflections, and explore open-ended questions about AI’s long-term impact on the UX profession.
In an era where ships are floating data centers and cybercriminals sail the digital seas, the maritime industry faces unprecedented cyber risks. This presentation, delivered by Mike Mingos during the launch ceremony of Optima Cyber, brings clarity to the evolving threat landscape in shipping — and presents a simple, powerful message: cybersecurity is not optional, it’s strategic.
Optima Cyber is a joint venture between:
• Optima Shipping Services, led by shipowner Dimitris Koukas,
• The Crime Lab, founded by former cybercrime head Manolis Sfakianakis,
• Panagiotis Pierros, security consultant and expert,
• and Tictac Cyber Security, led by Mike Mingos, providing the technical backbone and operational execution.
The event was honored by the presence of Greece’s Minister of Development, Mr. Takis Theodorikakos, signaling the importance of cybersecurity in national maritime competitiveness.
🎯 Key topics covered in the talk:
• Why cyberattacks are now the #1 non-physical threat to maritime operations
• How ransomware and downtime are costing the shipping industry millions
• The 3 essential pillars of maritime protection: Backup, Monitoring (EDR), and Compliance
• The role of managed services in ensuring 24/7 vigilance and recovery
• A real-world promise: “With us, the worst that can happen… is a one-hour delay”
Using a storytelling style inspired by Steve Jobs, the presentation avoids technical jargon and instead focuses on risk, continuity, and the peace of mind every shipping company deserves.
🌊 Whether you’re a shipowner, CIO, fleet operator, or maritime stakeholder, this talk will leave you with:
• A clear understanding of the stakes
• A simple roadmap to protect your fleet
• And a partner who understands your business
📌 Visit:
https://optima-cyber.com
https://tictac.gr
https://mikemingos.gr
Shoehorning dependency injection into a FP language, what does it take?Eric Torreborre
This talks shows why dependency injection is important and how to support it in a functional programming language like Unison where the only abstraction available is its effect system.
Slides of Limecraft Webinar on May 8th 2025, where Jonna Kokko and Maarten Verwaest discuss the latest release.
This release includes major enhancements and improvements of the Delivery Workspace, as well as provisions against unintended exposure of Graphic Content, and rolls out the third iteration of dashboards.
Customer cases include Scripted Entertainment (continuing drama) for Warner Bros, as well as AI integration in Avid for ITV Studios Daytime.
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPathCommunity
Nous vous convions à une nouvelle séance de la communauté UiPath en Suisse romande.
Cette séance sera consacrée à un retour d'expérience de la part d'une organisation non gouvernementale basée à Genève. L'équipe en charge de la plateforme UiPath pour cette NGO nous présentera la variété des automatisations mis en oeuvre au fil des années : de la gestion des donations au support des équipes sur les terrains d'opération.
Au délà des cas d'usage, cette session sera aussi l'opportunité de découvrir comment cette organisation a déployé UiPath Automation Suite et Document Understanding.
Cette session a été diffusée en direct le 7 mai 2025 à 13h00 (CET).
Découvrez toutes nos sessions passées et à venir de la communauté UiPath à l’adresse suivante : https://community.uipath.com/geneva/.
Discover the top AI-powered tools revolutionizing game development in 2025 — from NPC generation and smart environments to AI-driven asset creation. Perfect for studios and indie devs looking to boost creativity and efficiency.
https://www.brsoftech.com/ai-game-development.html
Introduction to AI
History and evolution
Types of AI (Narrow, General, Super AI)
AI in smartphones
AI in healthcare
AI in transportation (self-driving cars)
AI in personal assistants (Alexa, Siri)
AI in finance and fraud detection
Challenges and ethical concerns
Future scope
Conclusion
References
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...Raffi Khatchadourian
Efficiency is essential to support responsiveness w.r.t. ever-growing datasets, especially for Deep Learning (DL) systems. DL frameworks have traditionally embraced deferred execution-style DL code that supports symbolic, graph-based Deep Neural Network (DNN) computation. While scalable, such development tends to produce DL code that is error-prone, non-intuitive, and difficult to debug. Consequently, more natural, less error-prone imperative DL frameworks encouraging eager execution have emerged at the expense of run-time performance. While hybrid approaches aim for the "best of both worlds," the challenges in applying them in the real world are largely unknown. We conduct a data-driven analysis of challenges---and resultant bugs---involved in writing reliable yet performant imperative DL code by studying 250 open-source projects, consisting of 19.7 MLOC, along with 470 and 446 manually examined code patches and bug reports, respectively. The results indicate that hybridization: (i) is prone to API misuse, (ii) can result in performance degradation---the opposite of its intention, and (iii) has limited application due to execution mode incompatibility. We put forth several recommendations, best practices, and anti-patterns for effectively hybridizing imperative DL code, potentially benefiting DL practitioners, API designers, tool developers, and educators.
2. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
Embedded Systems
8051/89S52 Microcontroller
Introduction
The 8051 microcontroller is one of the most
popular general purpose microcontrollers in
use today. The 8051 is an 8-bit microcontroller
which means that most available operations
are limited to 8 bits. 8051 chips are used in a
wide variety of control systems, telecom
applications, robotics as well as in the
automotive industry.
There are 4 8-bit ports: P0, P1, P2 and P3.
PORT P1 (Pins 1 to 8): The port P1 is a general
purpose input/output port which can be used
for a variety of interfacing tasks. The other
ports P0, P2 and P3 have dual roles or
additional functions associated with them
based upon the context of their usage. The
port 1 output buffers can sink/source four TTL
inputs. When 1s are written to portn1 pins are
pulled high by the internal pull-ups and can be
used as inputs.
Fig A.
Pin description of 8051
PORT P3 (Pins 10 to 17): PORT P3 acts as a normal IO port, but Port P3 has additional functions such
as, serial transmit and receive pins, 2 external interrupt pins, 2 external counter inputs, read and
write pins for memory access.
PORT P2 (pins 21 to 28): PORT P2 can also be used as a general purpose 8 bit port when no external
memory is present, but if external memory access is required then PORT P2 will act as an address bus
in conjunction with PORT P0 to access external memory. PORT P2 acts asA8-A15, as can be seen from
fig 1.1
PORT P0 (pins 32 to 39)P0 can be used as a general purpose 8 bit port when no external memory is
present, but if external memory access is required then PORT P0 acts as a multiplexed address and
data bus that can be used to access external memory in conjunction with PORT P2. P0 acts as AD0-
AD7, as can be seen from fig 1.1
Overview:
Ports:
3. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
Keil provides a broad range of development tools like ANSI C compiler, macro assembler, debuggers
and simulators, linkers, IDE, library managers, real-time clock operating systems and evaluation
boards for 8051.
Install Keil by following the instructions sets provided in your software.
1) Open Keil.
2) Select New µVision Project from the Project Menu.
Keil
Creating a new project
4. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
3) Name the project ‘Led1’.
4) Click on the Save Button.
5) The device window will be displayed. Select the manufacturer of the IC.
Here let us use ATMEL AT89S52
6) Double Click on Atmel.
Tips
IR Obstacle
Sensor
Quick Overview
Based on a simple basic
Idea, this IR obstacle
sensor, is easy to build,
easy to calibrate and
still, it provides a
detection range of 10-
30 cm. This sensor can
be used for most indoor
applications where no
important ambient light
is present. It is the same
principle in ALL Infra-
Red proximity sensors.
The basic idea is to send
infra red light through
IR-LEDs, which is then
reflected by any object
in front of the sensor.
Code & Schematic
For more details
www.researchdesignlab.com
5. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
7) Scroll down and select AT89S52
8) Click OK
9) Choose No.
Tips
Carbon
Monoxide
Sensor
Quick Overview
M Q - 7 g a s s e n s o r
composed by micro
AL2O3 ceramic tube, Tin
Dioxide (SnO2) sensitive
layer , measuring
electrode and heater
are fixed into a crust
made by plastic and
stainless steel net. The
h e a t e r p r o v i d e s
n e c e s s a r y w o r k
conditions for work of
sensitive components.
Code & Schematic
For more details
www.researchdesignlab.com
6. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
Creating a
new source file
1)Click File Menu and
select New.
2) A new window will
open up in the Keil IDE.
3) Let us write a simple
code that would toggle
the status of Port 1 with
a small delay.
7. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
4) Click on File menu
and select Save as…
5) Name the file
Led1_blinking.c
6) Click the Save Button
7) In the ‘Project
Workspace’ window,
click on the ‘+’
symbol in front of
Target1.
Tips
Quick Overview
This is a simple-to-use liquefied petroleum gas (LPG) sensor,
suitable for sensing LPG (composed of mostly propane and
butane) concentrations in the air. Used in gas leakage
detecting equipments for detecting of LPG, iso-butane,
propane, LNG combustible gases. If output goes above a
preset range the output is low else high in idle condition.
Code & Schematic
For more details
www.researchdesignlab.com Gas Sensor
8. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
8) Below that ‘Source Group 1’ would appear, right click on it.
9) Click on “Add Files
to Group ‘Source
Group 1’ ”
10) Select
‘Led1_blinking.c’
11) Click Add button
12) Click Close button.
Tips
Digital Soil
Moisture
Sensor
Quick Overview
This sensor can be used
to test the moisture of
soil, when the soil is
having water shortage,
the module output is at
high level, else the
output is at low level.
By using this sensor one
can automatically water
the flower plant, or any
other plants requiring
automatic watering
technique. Module
triple output mode,
digital output is simple,
analog output more
accurate, serial output
with exact readings.
9. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
13) Click Close button.
Expand the Source
Group 1 in the tree
menu to ensure that
the file was added to
the project.
Tips
Code & Schematic
For more details
www.researchdesignlab.com
Digital
Heart Beat
Sensor
Quick Overview
This heart beat sensor is designed to give
digital output of heart beat when a finger is
placed on it. When the heartbeat detector is
working, the top-most LED flashes with each
heart beat. This digital output can be
connected to micro controller directly to
measure the Beats Per Minute (BPM) rate. It
works on the principle of light modulation by
blood flow through finger at each pulse.
Module dual output mode, digital output is
simple, serial output with exact readings.
10. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
Creating HEX for the
Part
1) Right click on Target
1 in Tree menu
2) Select Options for
Target ‘Target 1’
3) Select Target Tab
4) Change Xtal (Mhz) from 33.0 to 11.0592
Tips
Analog
Light
Intensity
Sensor
Quick Overview
Light dependent resistor
(LDR), suitable for use in
projects which require a
device or circuit to be
automatically switched
on or off in darkness or
light. As the amount of
light falling on this LDR
increases, its resistance
decreases. The light
detector itself is just
5mm in diameter.Analog
output more accurate.
Code & Schematic
For more details
www.researchdesignlab.com
11. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
5) Select Output Tab
6) Click on Create
Hex File check box
7) Click OK Button
8. Click on Project
Menu and select
Rebuild all Target
Files
12. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
9. In the Build Window it should report ‘0 Errors (s), 0 Warnings’
10. You are now ready to Program your Part
Tips
Code & Schematic
For more details
www.researchdesignlab.com
Digital
Vibration
Sensor
Quick Overview
This basic piezo sensor can be used in anti-theft
devices, electronic locks, mechanical equipment
vibration detection, sound gesture application and
detection range bull's-eye counts vibration testing
occasions. These vibration levels could be given to
any controller/processor and necessary decisions
could be taken through it. Module triple output
mode, digital output is simple, analog output more
accurate, serial output with exact readings.
13. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
Testing Program in Debugger
1) Click on the File Menu and select Save
2)Click on Project Menu and select Rebuild all Target Files
Tips
Digital
Light
Intensity
Sensor
Quick Overview
Light dependent resistor
(LDR), suitable for use in
projects which require a
device or circuit to be
automatically switched
on or off in darkness or
light. As the amount of
light falling on this LDR
increases, its resistance
decreases. The light
detector itself is just
5mm in diameter.
Module triple output
mode, digital output is
simple, analog output
more accurate, serial
output with exact
readings.
Code & Schematic
For more details
www.researchdesignlab.com
14. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
3) In the Build Window it should report ‘0 Errors (s), 0 Warnings’
4) Click on Debug Menu and Select Start/Stop Debug Session.
5) If you are using a free version of Keil the dialog appears. Click OK.
Tips
Serial
Ultrasonic
Distance
Measure
Quick Overview
Ultrasonic Distance
Sensor comes with an
ASCII serial O/P and
provided optimum
ranging & detection of
long to short distance
ranges. Owing to their
stable, precise, non-
contact and accurate
distance measurements
from about 2 cm to 4
m e t e r s . C o m p a c t l y
designed, easy usable,
high ranging and easily
interfaced upon micro
controllers RX and TX
pin.
Code & Schematic
For more details
www.researchdesignlab.com
15. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
Running the Keil Debugger (Simulation)
1) The Keil Debugger should be now running.
2) Click on Peripherals. Select I/O Ports, Select Port 1.
Tips
Ultrasonic
Ranging
Sensor
Quick Overview
U l t r a s o n i c s e n s o r
provides stable and
a c c u r a t e d i s t a n c e
measurements from
2cm to 450cm. It has an
focus of less than 15
degrees and an accuracy
of about 2mm.
Code & Schematic
For more details
www.researchdesignlab.com
16. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
3) A new window
should port will pop
up. This represents
the Port and Pins
4) To execute your code Click ‘Run’. The Parallel Port 1 Box status
should change as a continuous loop.
Tips
Ultrasonic
Obstacle
Sensor
Quick Overview
Used to detect the move
of human or object.
Suitable for indoor and
outdoor burglar proof
application, vehicle
a p p l i c a t i o n , AT M
survillence camera etc.
Code & Schematic
For more details
www.researchdesignlab.com
17. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
5) To exit out, first Click on Debug Menu and Select Stop Running
6) And then Click on
Debug Menu and
Select Start/Stop
Debug Session
Tips
Gyro
Sensor
Quick Overview
The L3G4200DTR is a
low-power, three-axis
angular rate sensor, able
t o p r o v i d e
u n p r e c e d e n t e d
stablility of zero rate
level and sensitivity over
temperature and time.It
includes a sensing
element and an IC
interface capable of
providing the measured
angular rate to the
external world through a
d i g i t a l i n t e r f a c e
(I2C/SPI).
Code & Schematic
For more details
www.researchdesignlab.com
18. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
Learn embedded C programming in 8051
Circuit and Working:
Fig.1 shows the circuit of simple
8051 Microcontroller interfaced
with LED’s.
Here are 3 simple programs for
controlling LED’s through simple
Embedded C programming in
Microcontroller.
Program 1 shows how to control
the entire port by toggling 8
LED’s.
Program 2 shows how to control
single I/O pin of the controller
one by one just like a Decimal
counter output.
Testing:
1) Write the program as shown below and generate the ‘hex’
file by the instructions provided in chapter 1.
2) Burn the code with the help of burner to the controller.
3) Power ON your microcontroller and check the result as per
your program.
Components/modules required :
1) 8051 project board (assembled/non assembled kit).
2) 5V DC source.
3) 8 LED’s.
4) Resistors (1KΩx8).
5) IC AT89S52.
6) 8051 IC burner.
7) Connectors and cables.
Fig 1. Circuit Diagram for LCD and 1x4 keypad interfacing
LED Blinking using 8051 Microcontroller and Keil – AT89S52
19. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
Program 1:
#include<reg52.h>
#define LEDPORT P2
void delay();
void main()
{
P2=0X00;
while(1)
{
LEDPORT =0XFF;
delay();
LEDPORT =0X00;
delay();
}
}
void delay()
{
unsigned int x=60000;
while (x--) ;
}
// special function register
//declarations for the
// intended 8051 derivative
//Defining Port 2 as the
//'LEDPORT'
// Function prototype declaration
//Main Code
//Set Port 2 all bits to 0
//infinite loop
//Set LEDPORT all bits to 1
// Wait for a small delay
//Set LEDPORT all bits to 0
// Wait for small delay
// Delay Routine
// larger the value of x
//the more is the delay.
// executes this statement
// until x decrements to 0
Program 2:
#include<reg52.h>
void delay();
sbit LED0=P2^0;
sbit LED1=P2^1;
sbit LED2=P2^2;
sbit LED3=P2^3;
sbit LED4=P2^4;
sbit LED5=P2^5;
sbit LED6=P2^6;
sbit LED7=P2^7;
void main()//Main Code
{
P1=0x00;
while(1)
{
LED0=1;
delay();
LED1=1;
delay();
//special function register declarations
//for the intended 8051 derivative
// Function prototype declaration
//Define Port Pin P2.0 as LED0
//Define Port Pin P2.1 as LED1
//Define Port Pin P2.2 as LED2
//Define Port Pin P2.3 as LED3
//Define Port Pin P2.4 as LED4
//Define Port Pin P2.5 as LED5
//Define Port Pin P2.6 as LED6
//Define Port Pin P2.7 as LED7
//Set Port 2 all bits to 0
// Continuous loop
//Turn ON LED0
//Wait for a small delay
//Turn ON LED1
//Wait for a small delay
Tips
Current
Sensor 20A
Quick Overview
The ACS712 provides
economical and precise
solutions for AC or DC
current sensing in
industrial, commercial,
and communications
systems. The device
package allows for easy
implementation by the
c u s t o m e r. Ty p i c a l
applications include
motor control, load
d e t e c t i o n a n d
m a n a g e m e n t ,
switchmode power
s u p p l i e s , a n d
o v e r c u r r e n t f a u l t
protection. The device
is not intended for
a u t o m o t i v e
applications.
Code & Schematic
For more details
www.researchdesignlab.com
20. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
LED2=1;
delay();
LED3=1;
delay();
LED4=1;
delay();
LED5=1;
delay();
LED6=1;
delay();
LED7=1;
delay();
P1=0x00;
delay();
}
}
void delay()
{
unsigned int x=60000
while (x--);
}
//Turn ON LED2
//Wait for a small delay
//Turn ON LED3
//Wait for a small delay
//Turn ON LED4
//Wait for a small delay
//Turn ON LED5
//Wait for a small delay
//Turn ON LED6
//Wait for a small delay
//Turn ON LED7
//Wait for a small delay
//Turn OFF all LED's
//Wait for a small delay
// Delay Routine
// larger the value of x the
//more is the delay.
// executes this statement
//until x decrements to 0
LCD Keypad interfacing using 8051
Microcontroller and Keil– AT89S52
Circuit and Working:
Components/modules required:
Fig.2 shows the circuit of simple 8051
Microcontroller interfaced with LCD and
1x4 Keypad.
Here is a simple program for interfacing
LCD and keypad through simple
Embedded C programming in
Microcontroller.
Program 3 demonstrates how to display in
a LCD when an event occurs like a key is
being pressed.
1) 8051 project board
(assembled/non assembled kit).
2) 5V DC source.
3) LCD interfacing Module
4) 4 Keys keypad
5) IC AT89S52.
6) 8051 IC burner.
7) Connectors and cables.
Fig 2. Circuit Diagram for LCD and 1x4 keypad interfacing
21. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
Program 3:
#include<reg51.h>
#define LCD_PORT P2
sbit rs=P3^5;
sbit en=P3^7;
sbit D7=P2^7;
sbit rw=P3^6;
sbit key1=P0^3;
sbit key2=P0^2;
sbit key3=P0^1;
sbit key4=P0^0;
void busy();
void CMD_WRT(unsigned char);
void LCD_WRT(unsigned char *);
void DATA_WRT(unsigned char);
void DELAY();
void main()
{
unsigned char CMD[]={0x38,0x0f,0x01,0x06,0x80};
unsigned char TEMP,i;
for(i=0;i<=4;i++)
{
TEMP=CMD[i];
CMD_WRT(TEMP);
}
CMD_WRT(0X01);
CMD_WRT(0X80);
LCD_WRT("RDL");
DELAY();
DELAY();
DELAY();
DELAY();
while(1)
{
//special function register declarations
//for the intended 8051 derivative
// LCD connections
//Define Port 2 as LCD Data pins.
//Register Select is connected to Port 3 pin 5
//Enable is connected to Port 3 pin 7
//Data Pin D7 is connected to Port 2 pin 7
//Read/Write is connected to Port 3 pin 6
// Keypad connections
//Switch 1 is connected to Port 0 pin 3
//Switch 2 is connected to Port 0 pin 2
//Switch 3 is connected to Port 0 pin 1
//Switch 4 is connected to Port 0 pin 0
// Call function declarations
//This Function checks whether the LCD is
//ready to receive next byte
//This Function is used to write commands
//into the LCD
//This Function is used to write Strings into
//the LCD
//This Function is used to write a byte of data
//into the LCD
//Call function declarations for delay
// MAIN CODE
// LCD Initialization
//commands, hex codes
// Variable declarations
//Write the commands into the LCD
//This command clears the LCD screen
//This moves the cursor to the beginning of the 1st
//line
//Writes the text 'RDL' in the LCD
//These delay's will hold the above text 'RDL' for
//some time
// Whatever comes next will execute forever
//Continuous loop
22. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
if (key1 ==0)
{
CMD_WRT(0X01);
CMD_WRT(0X80);
LCD_WRT("Key 1 is pressed");
while(key1==0);
}
else if (key2 ==0)
{
CMD_WRT(0X01);
CMD_WRT(0X80);
LCD_WRT("Key 2 is pressed");
while(key2==0);
}
else if (key3 ==0)
CMD_WRT(0X01);
CMD_WRT(0X80);
LCD_WRT("Key 3 is pressed");
while(key3==0);
}
else if (key4 ==0)
{
CMD_WRT(0X01);
CMD_WRT(0X80);
LCD_WRT("Key 4 is pressed");
while(key4==0);
}
else
{
CMD_WRT(0X01);
CMD_WRT(0X80);
LCD_WRT("No key Pressed");
DELAY();
DELAY();
DELAY();
}
}
}
void busy()
{
D7=1;
rs=0;
rw=1;
//Check whether switch 1 is being pressed
//Clears the LCD screen
//Moves the cursor to the beginning of the 1st line
//Writes the text within quotes in the LCD
//Wait until the switch has been released
//Check whether switch 2 is being pressed
//Clears the LCD screen
//Moves the cursor to the beginning of the 1st line
//Writes the text within quotes in the LCD
//Wait until the switch has been released
//Check whether switch 3 is being pressed
{
//Clears the LCD screen
//Moves the cursor to the beginning of the 1st line
//Writes the text within quotes in the LCD
//Wait until the switch has been released
//Check whether switch 4 is being pressed
//Clears the LCD screen
//Moves the cursor to the beginning of the 1st line
//Writes the text within quotes in the LCD
//Wait until the switch has been released
//Clears the LCD screen
//Moves the cursor to the beginning of the 1st line
//Writes the text within quotes in the LCD
// A small delay for relaxation
//This Function checks whether the LCD is ready to receive next byte
//Keep D7 pin to High
//Keep RS to Low to select command register
//RW=1 for read
23. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
while(D7!=0)
{
en=0;
en=1;
}
}
void CMD_WRT(unsigned char val)
{
busy();
LCD_PORT=val;
rs=0;
rw=0;
en=1;
en=0;
}
void LCD_WRT(unsigned char *string)
{
while(*string)
DATA_WRT(*string++);
}
void DATA_WRT(unsigned char ch)
{
busy();
LCD_PORT = ch;
rs=1;
rw=0;
en=1;
en=0;
}
void DELAY()
{
unsigned int X=60000,Y=60000;
while(X--);
while(Y--);
}
//Monitor D7 pin until it gets low
//Provide a latch pulse from low to high to EN
//This Function is used to write commands into the LCD
//Execute busy function to know whether the LCD is
//ready to receive any data/command
//Put the variable val into LCD_PORT which is
//connected to LCD data pins
//Keep RS to Low to select command register
// RW=0 for write
//Provide a latch pulse from High to Low to EN
//This Function is used to write Strings into the LCD
//increment from the beginning of the string until a
//null character is detected (end of the string)
//separates a single byte from the string
//This Function is used to write a byte of data into the LCD
//Execute busy function to know whether the LCD is
//ready to receive any data/command
//Put the variable ch into LCD_PORT which is
//connected to LCD data pins
//Keep RS to High to select Data register
// RW=0 for write
//Provide a latch pulse from High to Low to EN
//function for delay routine
// larger the value of X and Y the more is the
//delay.
//executes this statement until X decrements to 0
//executes this statement until Y decrements to 0
24. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
LCD Keypad and Relays interfacing using 8051
Microcontroller and Keil–AT89S52
Circuit and Working:
Fig.3.1 and Fig.3.2 shows the circuit of simple 8051
Microcontroller interfaced with LCD, 1x4 Keypad and 4 Relays.
Here is a simple Embedded C program for interfacing 4 Relays
to a 8051 Microcontroller which could be controlled by a key
press event through a 1x4 keypad, the result or state of the
relays being displayed on the LCD interfaced along with this.
Program 4 enables a user to toggle the state of relays by
pressing a key consequently the result gets displayed on the
LCD interfaced.
Fig 3.2.
Circuit Diagram for Relay LCD
and 1x4 keypad interfacing
- Part 2.
Fig 3.1.
Circuit Diagram for
Relay LCD and 1x4
keypad interfacing
- Part 1.
Components/modules required:
1) 8051 project board
(assembled/non assembled kit).
2) 12V and 5V DC source.
3) LCD interfacing Module
4) 4 Keys keypad
5) 4 Relay Interfacing Board 12V
6) IC AT89S52.
7) 8051 IC burner.
8) Connectors and cables
25. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
Program 4:
#include<reg52.h>
#define LCD_PORT P2
sbit rs=P3^5;
sbit en=P3^7;
sbit D7=P2^7;
sbit rw=P3^6;
sbit key1=P0^3;
sbit key2=P0^2;
sbit key3=P0^1;
sbit key4=P0^0;
sbit Relay1=P1^3;
sbit Relay2=P1^2;
sbit Relay3=P1^1;
sbit Relay4=P1^0;
void busy();
void CMD_WRT(unsigned char);
void LCD_WRT(unsigned char *);
void DATA_WRT(unsigned char);
void DELAY();
void main()
{
unsigned char CMD[]={0x38,0x0f,0x01,0x06,0x80};
unsigned char TEMP,i;
P1=0X00;
for(i=0;i<=4;i++)
{
TEMP=CMD[i];
CMD_WRT(TEMP);
}
//special function register declarations
//for the intended 8051 derivative
// LCD connections
//Define Port 2 as LCD Data pins.
//Register Select is connected
//to Port 3 pin 5
//Enable is connected
//to Port 3 pin 7
//Data Pin D7 is connected
//to Port 2 pin 7
//Read/Write is connected
//to Port 3 pin 6
// Keypad connections
//Switch 1 is connected to Port 0 pin 3
//Switch 2 is connected to Port 0 pin 2
//Switch 3 is connected to Port 0 pin 1
//Switch 4 is connected to Port 0 pin 0
// Relay Connections
//Relay 1 is connected to Port 1 pin 3
//Relay 2 is connected to Port 1 pin 2
//Relay 3 is connected to Port 1 pin 1
//Relay 4 is connected to Port 1 pin 0
// Call function declarations
//This Function checks whether the
//LCD is ready to receive next byte
//This Function is used to write commands
// into the LCD
//This Function is used to write Strings
//into the LCD
//This Function is used to write a byte
//of data into the LCD
//Call Function declarations for delay
// MAIN CODE
// LCD Initialization
// commands, hex codes
// Variable declarations
//Set Port 1 all bits to 0
//Write the commands into the LCD
26. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
CMD_WRT(0X01);
CMD_WRT(0X80);
LCD_WRT("RDL");
DELAY();
DELAY();
DELAY();
DELAY();
while(1)
{
if (key1 ==0 && Relay1==0)
{
CMD_WRT(0X01);
CMD_WRT(0X80);
LCD_WRT("Relay 1 is ON");
Relay1=1;
while(key1==0);
}
else if (key1 ==0 && Relay1==1)
{
CMD_WRT(0X01);
CMD_WRT(0X80);
LCD_WRT("Relay 1 is OFF");
Relay1=0;
while(key1==0);
}
else if (key2 ==0 && Relay2==0)
{
CMD_WRT(0X01);
CMD_WRT(0X80);
LCD_WRT("Relay 2 is ON");
Relay2=1;
while(key2==0);
}
else if (key2 ==0 && Relay2==1)
{
CMD_WRT(0X01);
CMD_WRT(0X80);
LCD_WRT("Relay 2 is OFF");
Relay2=0;
while(key2==0);
}
else if (key3 ==0 && Relay3==0)
{
CMD_WRT(0X01);
CMD_WRT(0X80);
LCD_WRT("Relay 3 is ON");
Relay3=1;
while(key3==0);
}
//This command clears the LCD screen
//This moves the cursor to the beginning of the 1st line
//Writes the text 'RDL' in the LCD
//These delay's will hold the above text 'RDL' for some time
//Continuous loop
//Check whether switch 1 is being pressed
//and Relay1 is OFF
//Clears the LCD screen
//Moves the cursor to the beginning of the 1st line
//Writes the text within quotes in the LCD
//Turn ON Relay1
//Wait until the switch has been released
//Check whether switch 1 is being pressed
//and Relay1 is ON
//Clears the LCD screen
//Moves the cursor to the beginning of the 1st line
//Writes the text within quotes in the LCD
//Turn OFF Relay1
//Wait until the switch has been released
//Check whether switch 2 is being pressed
//and Relay2 is OFF
//Clears the LCD screen
//Moves the cursor to the beginning of the 1st line
//Writes the text within quotes in the LCD
//Turn ON Relay2
//Wait until the switch has been released
//Check whether switch 2 is being pressed
//and Relay2 is ON
//Clears the LCD screen
//Moves the cursor to the beginning of the 1st line
//Writes the text within quotes in the LCD
//Turn OFF Relay2
//Wait until the switch has been released
//Check whether switch 3 is being pressed
//and Relay3 is OFF
//Clears the LCD screen
//Moves the cursor to the beginning of the 1st line
//Writes the text within quotes in the LCD
//Turn ON Relay3
//Wait until the switch has been released
27. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
else if (key3 ==0 && Relay3==1)
{
CMD_WRT(0X01);
CMD_WRT(0X80);
LCD_WRT("Relay 3 is OFF");
Relay3=0;
while(key3==0);
}
else if (key4 ==0 && Relay4==0)
{
CMD_WRT(0X01);
CMD_WRT(0X80);
LCD_WRT("Relay 4 is ON");
Relay4=1;
while(key4==0);
}
else if (key4 ==0 && Relay4==1)
{
CMD_WRT(0X01);
CMD_WRT(0X80);
LCD_WRT("Relay 4 is OFF");
Relay4=0;
while(key4==0);
else
{
CMD_WRT(0X01);
CMD_WRT(0X80);
LCD_WRT("Press any key..");
DELAY();
}
}
}
void busy()
{
D7=1;
rs=0;
rw=1;
while(D7!=0)
{
en=0;
en=1;
}
}
//Check whether switch 3 is being pressed
//and Relay3 is ON
//Clears the LCD screen
//Moves the cursor to the beginning of the 1st line
//Writes the text within quotes in the LCD
//Turn OFF Relay3
//Wait until the switch has been released
//Check whether switch 4 is being pressed
//and Relay4 is OFF
//Clears the LCD screen
//Moves the cursor to the beginning of the 1st line
//Writes the text within quotes in the LCD
//Turn ON Relay4
//Wait until the switch has been released
//Check whether switch 4 is being pressed
//and Relay4 is ON
//Clears the LCD screen
//Moves the cursor to the beginning of the 1st line
//Writes the text within quotes in the LCD
//Turn OFF Relay4
//Wait until the switch has been released
}
//Clears the LCD screen
//Moves the cursor to the beginning of the 1st line
//Writes the text within quotes in the LCD
// A small delay for relaxation
//This Function checks whether the LCD is ready to receive
//next byte
//Keep D7 pin to High
//Keep RS to Low to select command register
// RW=1 for read
//Monitor D7 pin until it gets low
//Provide a latch pulse from low to high to EN
28. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
void CMD_WRT(unsigned char val)
{
busy();
LCD_PORT=val;
rs=0;
rw=0;
en=1;
en=0;
}
void LCD_WRT(unsigned char *string)
{
while(*string)
DATA_WRT(*string++);
}
void DATA_WRT(unsigned char ch)
{
busy();
LCD_PORT = ch;
rs=1;
rw=0;
en=1;
en=0;
}
void DELAY()
{
unsigned int X=60000;
while(X--);
}
//This Function is used to write commands into the LCD
//Execute busy function to know whether the LCD is
//ready to receive any data/command
//Put the variable val into LCD_PORT which is
//connected to LCD data pins
//Keep RS to Low to select command register
// RW=0 for write
//Provide a latch pulse from High to Low to EN
//This Function is used to write Strings into the LCD
// increment from the beginning of the string until
//a null character is detected (end of the string)
//separates a single byte from the string
//This Function is used to write a byte of data into the LCD
//Execute busy function to know whether the LCD
//is ready to receive any data/command
//Put the variable ch into LCD_PORT which is
//connected to LCD data pins
//Keep RS to High to select Data register
// RW=0 for write
//Provide a latch pulse from High to Low to EN
//Function for delay routine
// larger the value of X the more is the delay.
//executes this statement until X decrements to 0
29. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
Asynchronous serial data communication is widely used for character-oriented transmissions. Each
character is placed in between start and stop bits, this is called framing. Block-oriented data
transfers use the synchronous method. The start bit is always one bit, but the stop bit can be one or
two bits. The start bit is always a 0 (low) and the stop bit(s) is 1 (high).
We need a line driver (voltage converter) to convert the R232’s signals to TTL voltage levels that will
be acceptable to 8051’s TxD and RxD pins.
The baud rate of 8051 system should match the baud rate of the PC’s COM port.
Serial Communication
Fig 4.1
Rs232 to TTL
Conversion
Fig 4.2
Serial Transmission
of Character ‘A’
30. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
SM0, SM1
They determine the framing of
data by specifying the number
of bits per character, and the
start and stop bits.
REN (receive enable)
It is a bit-addressable register
When it is high, it allows 8051 to
receive data on RxD pin If low,
and should be picked up before data is framed with start andthe receiver is disable.
it is lost. stop bits.
4. TR1 is set to 1 to start timer 1TI (transmit interrupt)
Programming the 8051 to 5. TI is cleared by (TI=0;) TIWhen 8051 finishes the transfer
transfer character bytes instructionof 8-bit Character It raises TI
serially. 6. The character byte to beflag to indicate that it is ready
1. TMOD register is loaded with transferred serially is writtento transfer another byte TI bit
the value TMOD=0X20, into SBUF registeris raised at the beginning of the
indicating the use of timer 1 in 7. The TI flag bit is monitoredstop bit
mode 2 (8-bit auto-reload) to with the use of instruction
set baud rate. while (TI==0); to see if theRI (receive interrupt)
2. The TH1 is loaded with one of c h a r a c t e r h a s b e e nWhen 8051 receives data
the values to set baud rate for transferred completely.serially via RxD, it gets rid of the
serial data transfer 8. To transfer the next byte, gostart and stop bits and places
3. The SCON register is loaded to step 5the byte in SBUF register It
with the value 50H, indicatingraises the RI flag bit to indicate
serial mode 1, where an 8-bitthat a byte has been received
Programming the 8051 to receive character bytes serially
1. TMOD register is loaded with the value TMOD=0X20, indicating the use of timer 1 in mode2
(8-bit auto-reload) to set baud rate
2. TH1 is loaded to set baud rate
3. The SCON register is loaded with the value SCON=0X50,indicating serial mode 1, where an 8-
bit data is framed with start and stop bits
4. TR1 is set to 1 to start timer 1
5. RI is cleared by RI=0; RI instruction
6. The RI flag bit is monitored with the use of instruction while(RI==0); to see if an entire
character has been received yet.
7. When RI is raised, SBUF has the byte, its contents are moved into a safe place
8. To receive the next character, go to step 5
Fig 4.3: Serial Mode Selector
31. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
Simple Serial interfacing using 8051 Microcontroller and Keil– AT89S52
Circuit and Working:
Fig.5 shows the circuit of simple 8051 Microcontroller interfaced with LED’s.
Here is a simple Embedded C program for interfacing 8 LED’s to a 8051 Microcontroller
which could be turned ON or OFF by sending few serial commands.
Program 5 enables a user to turn ON/OFF a series of LED’s by sending serial data. The
program is designed in such a way that a serial command A1 will turn ON the first LED
and A0 will turn of the same LED. Similarly B1 will turn ON the second LED and B0 will
turn of the same LED. This will continue for the remaining 6 LED’s. i.e. H1 and H0 would
turn ON and OFF last LED (8th LED) respectively. You can enter the inputs in any serial
window monitor software like Hyperterminal, Putty etc. Also you could design a GUI in
software like Matlab, .NET etc. which could be used to control these LED’s.
Components/modules required :
1) 8051 project board with RS232 interface (assembled/non assembled kit).
2) 5V DC source.
3) 8 LED’s.
4) Resistors (1KΩx8).
5) IC AT89S52.
6) 8051 IC burner.
7) Connectors and cables.
Fig. 5 Circuit Diagram for Serial and LED interfacing
32. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
#include<reg52.h>
void delay();
sbit LED0=P2^0;
sbit LED1=P2^1;
sbit LED2=P2^2;
sbit LED3=P2^3;
sbit LED4=P2^4;
sbit LED5=P2^5;
sbit LED6=P2^6;
sbit LED7=P2^7;
unsigned char byte1,byte2;
void main()
{
TMOD=0X20;
SCON=0X50;
TH1=0XFD;
TR1=1;
delay();
TI=0;
SBUF='S';
while (TI==0);
TI=0;
delay();
P2=0x00;
while(1)
{
RI=0;
while(RI==0);
byte1=SBUF;
RI=0;
while(RI==0);
byte2=SBUF;
RI=0;
delay();
delay();
if(byte1=='A')
{
if(byte2=='1')
{
//special function register declarations
//for the intended 8051 derivative
// Function prototype declaration
//Define Port Pin P2.0 as LED0
//Define Port Pin P2.1 as LED1
//Define Port Pin P2.2 as LED2
//Define Port Pin P2.3 as LED3
//Define Port Pin P2.4 as LED4
//Define Port Pin P2.5 as LED5
//Define Port Pin P2.6 as LED6
//Define Port Pin P2.7 as LED7
// Variable declarations
// MAIN CODE
//Serial Initialization
//use Timer 1, mode 2
//indicating serial mode 1, where an 8-bit
//data is framed with start and stop bits
//9600 baud rate
//Start timer
//Wait for a delay for serial initialization to finish
// Transmit 'S' to check whether the setup is ready
//Forcibly change the Transmit Interrupt Flag of 8051 to 0
//Move 'S' to serial buffer memory
//Wait until TI flag is set by hardware when an entire byte
//has been transmitted
// Forcibly clear TI flag
//A small delay for relaxation
//Set Port 2 all bits to 0
// continuous loop
//Forcibly clear the Receive Interrupt Flag of 8051 to 0
//Wait until RI flag is set by hardware when an entire byte
//has been received
//Move the received byte of data into variable 'byte1'
//Forcibly clear RI flag
//Wait until RI flag is set by hardware when an entire byte
//has been received
//Move the received byte of data into variable 'byte2'
//Forcibly clear RI flag
//Check whether the 1st byte of
//data is 'A'
//Check whether the 2nd byte of
//data is '1'
33. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
LED0=1;
delay();
}
else if(byte2=='0')
{
LED0=0;
delay();
}
}
else if(byte1=='B')
{
if(byte2=='1')
{
LED1=1;
delay();
}
else if(byte2=='0')
{
LED1=0;
delay();
}
}
else if(byte1=='C')
{
if(byte2=='1')
{
LED2=1;
delay();
}
else if(byte2=='0')
{
LED2=0;
delay();
}
}
else if(byte1=='D')
{
if(byte2=='1')
{
LED3=1;
}
//Turn ON LED0
//Wait for a small delay
//Check whether the 2nd byte of
//data is '0'
//Turn OFF LED0
//Wait for a small delay
//Check whether the 1st byte of
//data is 'B'
//Check whether the 2nd byte of
//data is '1'
//Turn ON LED1
//Wait for a small delay
//Check whether the 2nd byte of
//data is '0'
//Turn OFF LED1
//Wait for a small delay
//Check whether the 1st byte of
//data is 'C'
//Check whether the 2nd byte of
//data is '1'
//Turn ON LED2
//Wait for a small delay
//Check whether the 2nd byte of
//data is '0'
//Turn OFF LED2
//Wait for a small delay
//Check whether the 1st byte of
//data is 'D'
//Check whether the 2nd byte of
//data is '1'
//Turn ON LED3
Tips
SOIC to DIP
Adapter 8-Pin
Quick Overview
Adapter for standard 8
SOIC SMD Parts to
convert to standard 8 Pin
DIP size.This SOIC
breakout board is a PCB
which will interface an
SOIC package to 0.1"
(2.54mm) headers which
c a n b e u s e d o n
b r e a d b o a r d s f o r
p r o t o t y p i n g y o u r
projects.Simply solder-
on your 8-pin SOIC form-
factor IC, along with
some 0.1-inch-pitch
headers, and you will
h a v e a u s a b l e ,
breadboard-friendly
unit.
Code & Schematic
For more details
www.researchdesignlab.com
34. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
delay();
}
else if(byte2=='0')
{
LED3=0;
delay();
}
}
else if(byte1=='E')
{
if(byte2=='1')
{
LED4=1;
delay();
}
else if(byte2=='0')
{
LED4=0;
delay();
}
}
else if(byte1=='F')
{
if(byte2=='1')
{
LED5=1;
delay();
}
else if(byte2=='0')
{
LED5=0;
delay();
}
}
else if(byte1=='G')
{
if(byte2=='1')
{
LED6=1;
delay();
}
else if(byte2=='0')
{
LED6=0;
delay();
}
}
else if(byte1=='H')
{
//Wait for a small delay
//Check whether the 2nd byte of
//data is '0'
//Turn OFF LED3
//Wait for a small delay
//Check whether the 1st byte of
//data is 'E'
//Check whether the 2nd byte of
//data is '1'
//Turn ON LED4
//Wait for a small delay
//Check whether the 2nd byte of
//data is '0'
//Turn OFF LED4
//Wait for a small delay
//Check whether the 1st byte of
//data is 'F'
//Check whether the 2nd byte of
//data is '1’
//Turn ON LED5
//Wait for a small delay
//Check whether the 2nd byte of
//data is '0'
//Turn OFF LED5
//Wait for a small delay
//Check whether the 1st byte of
//data is 'G'
//Check whether the 2nd byte of
//data is '1'
//Turn ON LED6
//Wait for a small delay
//Check whether the 2nd byte of
//data is '0'
//Turn OFF LED6
//Wait for a small delay
//Check whether the 1st byte of
//data is 'H'
Tips
Current
Sensor 05A
Code & Schematic
For more details
www.researchdesignlab.com
Quick Overview
The ACS712 provides
economical and precise
solutions for AC or DC
current sensing in
industrial, commercial,
and communications
systems. The device
package allows foreasy
implementation by the
c u s t o m e r. Ty p i c a l
applicationsinclude
motor control, load
d e t e c t i o n a n d
m a n a g e m e n t ,
switchmode power
s u p p l i e s , a n d
o v e r c u r r e n t f a u l t
protection. The device
is not intended for
a u t o m o t i v e
applications.
35. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
if(byte2=='1')
{
LED7=1;
delay();
}
else if(byte2=='0')
{
LED7=0;
delay();
}
}
else
{
P2=0x00;
delay();
}
}
}
void delay()
{
unsigned int x=60000;
while (x--);
}
//Check whether the 2nd byte of
//data is '1'
//Turn ON LED7
//Wait for a small delay
//Check whether the 2nd byte of
//data is '0'
//Turn OFF LED7
//Wait for a small delay
//Set Port 2 all bits to 0 if any
//other variable has been received
//Wait for a small delay
// Delay Routine
// larger the value of x
//the more is the delay.
// executes this statement
//until x decrements to 0
Bluetooth and Relays interfacing
using 8051 Microcontroller and
Keil– AT89S52
Circuit and Working:
Fig.6 shows the circuit of simple
8051 Microcontroller interfaced
with Bluetooth and 4 relays.
Program 6 demonstrates how to
receive data through Bluetooth.
Components/modules required :
1) 8051 project board
(assembled/non assembled kit).
2) 5V and 12V DC source.
3) Bluetooth Module.
4) 12V 4 Relay board.
5) IC AT89S52.
6) 8051 IC burner.
7) Connectors and cables.
Fig .6 Circuit Diagram for Bluetooth and 4 Relay interfacing
36. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
Program 6:
#include<reg52.h>
void delay();
sbit Relay1=P2^3;
sbit Relay2=P2^2;
sbit Relay3=P2^1;
sbit Relay4=P2^0;
unsigned char byte1,byte2;
void main()
{
TMOD=0X20;
SCON=0X50;
TH1=0XFD;
TR1=1;
delay();
TI=0;
SBUF='S';
while (TI==0);
TI=0;
delay();
P2=0x00;
while(1)
{
RI=0;
while(RI==0);
byte1=SBUF; '
RI=0;
while(RI==0);
byte2=SBUF;
RI=0;
if(byte1=='1')
{
if(byte2=='N')
{
Relay1=1;
}
//special function register declarations
//for the intended 8051 derivative
//Function prototype declaration
// Relay Connections
//Relay 1 is connected to Port 2 pin 3
//Relay 2 is connected to Port 2 pin 2
//Relay 3 is connected to Port 2 pin 1
//Relay 4 is connected to Port 2 pin 0
// Variable declarations
// MAIN CODE
//Serial Initialization
//use Timer 1, mode 2
//indicating serial mode 1,where an 8-bit data
//is framed with start and stop bits
//9600 baud rate
//Start timer
//Wait for some time for serial initialization to finish
// Transmit 'S' to check whether the setup is ready
//Forcibly change the Transmit
//Interrupt Flag of 8051 to 0
//Move 'S' to serial buffer memory
//Wait until TI flag is set by hardware
//when an entire byte has been transmitted
// Forcibly clear TI flag
//A small delay for relaxation
//Set Port 2 all bits to 0
// continuous loop
//Forcibly clear the Receive
//Interrupt Flag of 8051 to 0
//Wait until RI flag is set by hardware
//when an entire byte has been received
//Move the received byte of data into variable 'byte1
//Forcibly clear RI flag
//Wait until RI flag is set by hardware
//when an entire byte has been received
//Move the received byte of data into variable 'byte2'
//Forcibly clear RI flag
//Check whether the 1st byte of data is '1'
//Check whether the 2nd byte of data is 'N'
//Turn ON Relay1
37. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
else if(byte2=='F')
{
Relay1=0;
}
}
else if(byte1=='2')
{
if(byte2=='N')
{
Relay2=1;
}
else if(byte2=='F')
{
Relay2=0;
}
}
else if(byte1=='3')
{
if(byte2=='N')
{
Relay3=1;
}
else if(byte2=='F')
{
Relay3=0;
}
}
else if(byte1=='4')
if(byte2=='N')
{
Relay4=1;
}
else if(byte2=='F')
{
Relay4=0;
}
}
else if(byte1=='X')
{
if(byte2=='N')
{
P2=0xFF;
}
else if(byte2=='F')
{
P2=0x00;
}
}
//Check whether the 2nd byte of data is 'F'
//Turn OFF Relay1
//Check whether the 1st byte of data is '2'
//Check whether the 2nd byte of data is 'N'
//Turn ON Relay2
//Check whether the 2nd byte of data is 'F'
//Turn OFF Relay2
//Check whether the 1st byte of data is '3'
//Check whether the 2nd byte of data is 'N'
//Turn ON Relay3
//Check whether the 2nd byte of data is 'F'
//Turn OFF Relay3
//Check whether the 1st byte of data is '4'
{
//Check whether the 2nd byte of data is 'N'
//Turn ON Relay4
//Check whether the 2nd byte of data is 'F'
//Turn OFF Relay4
//Check whether the 1st byte of data is 'X'
//Check whether the 2nd byte of data is 'N'
//Turn ON all the Relays
//Check whether the 2nd byte of data is 'F'
//Turn OFF all the Relays
38. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
else
{
P2=0x00;
}
}
}
void delay()
{
unsigned int x=60000;
while (x--);
}
//Clear Port 2 all bits to 0 if any other variable has been received
//Function for delay routine
//Delay Routine
// larger the value of x the more is the delay.
// executes this statement until x decrements to 0
Fig.7 shows the circuit of simple 8051 Microcontroller interfaced with XBee and 1x4 Keypad.
Program 7 demonstrates how to send data wirelessly when a key is being pressed.
Components/modules required :
1) 8051 project board (assembled/non assembled kit).
2) 5V DC source.
3) XBee(S2)
4) XBee power supply board
5) 1X4 keys keypad.
6) IC AT89S52.
7) 8051 IC burner.
8) Connectors and cables.
Fig 7. Circuit Diagram for LCD and 1x4 keypad interfacing
Keypad and XBee interfacing using 8051 Microcontroller and Keil– AT89S52
Circuit and Working:
39. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
Program 7:
#include<reg51.h>
sbit key1=P0^3;
sbit key2=P0^2;
sbit key3=P0^1;
sbit key4=P0^0;
void DELAY();
void main()
{
unsigned char flag1=0,flag2=0,flag3=0,flag4=0; //Variable declarations
TMOD=0X20;
SCON=0X50;
TH1=0XFD;
TR1=1;
DELAY();
TI=0;
SBUF='S';
while (TI==0);
TI=0;
DELAY();
P1=0X00;
DELAY();
while(1)
{
if (key1 ==0 && flag1==0)
{
SBUF='A';
while (TI==0);
TI=0;
flag1=1;
while(key1==0);
DELAY();
}
else if (key1 ==0 && flag1==1)
{
SBUF='B';
while (TI==0);
TI=0;
flag1=0;
while(key1==0);
DELAY();
}
//special function register declarations
//for the intended 8051 derivative
// Keypad connections
//Switch 1 is connected to Port 0 pin 3
//Switch 2 is connected to Port 0 pin 2
//Switch 3 is connected to Port 0 pin 1
//Switch 4 is connected to Port 0 pin 0
//Call Function declarations for delay
//Serial Initialization
//use Timer 1, mode 2
//indicating serial mode 1, where an 8-bit data is
//framed with start and stop bits
//9600 baud rate
//Start timer
//Wait for a delay for serial initialization to finish
// Transmit 'S' to check whether the setup is ready
//Forcibly clear the Transmit Interrupt Flag of 8051 to 0
//Move 'S' to serial buffer memory
//Wait until TI flag is set by hardware when an
//entire byte has been transmitted
//Forcibly clear TI flag
//A small delay for relaxation
//Set Port 1 all bits to 0
//Continuous loop
//Check whether switch 1 is being pressed
//flag1 is Low
//Move 'A' to serial buffer memory
//Wait until TI flag is set by hardware when an
//entire byte has been transmitted
// Forcibly clear TI flag
//Set flag1
//Wait until the switch has been released
//A small delay for relaxation
//Check whether switch 1 is being pressed
//and flag1 is Low
//Move 'B' to serial buffer memory
//Wait until TI flag is set by hardware when an
//entire byte has been transmitted
// Forcibly clear TI flag
//Clear flag1
//Wait until the switch has been released
//A small delay for relaxation
40. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
else if (key2 ==0 && flag2==0)
{
SBUF='C';
while (TI==0);
TI=0;
flag2=1;
while(key2==0);
DELAY();
}
else if (key2 ==0 && flag2==1)
{
SBUF='D';
while (TI==0);
TI=0;
flag2=0;
while(key2==0);
DELAY();
}
else if (key3 ==0 && flag3==0)
{
SBUF='E';
while (TI==0);
TI=0;
flag3=1;
while(key3==0);
DELAY();
}
else if (key3 ==0 && flag3==1)
{
SBUF='F';
while (TI==0);
TI=0;
flag3=0;
while(key3==0);
DELAY();
}
else if (key4 ==0 && flag4==0)
{
SBUF='G';
while (TI==0);
//Check whether switch 2 is being pressed
//and flag2 is Low
//Move 'C' to serial buffer memory
//Wait until TI flag is set by hardware
//when an entire byte has been transmitted
//Forcibly clear TI flag
//Set flag2
//Wait until the switch has been released
//A small delay for relaxation
//Check whether switch 2 is being pressed
//and flag2 is High
//Move 'D' to serial buffer memory
//Wait until TI flag is set by hardware
//when an entire byte has been transmitted
//Forcibly clear TI flag
//Clear flag2
//Wait until the switch has been released
//A small delay for relaxation
//Check whether switch 3 is being pressed
//and flag3 is Low
//Move 'E' to serial buffer memory
//Wait until TI flag is set by hardware
//when an entire byte has been transmitted
//Forcibly clear TI flag
//Set flag3
//Wait until the switch has been released
//A small delay for relaxation
//Check whether switch 3 is being pressed
//and flag3 is High
//Move 'F' to serial buffer memory
//Wait until TI flag is set by hardware
//when an entire byte has been transmitted
// Forcibly clear TI flag
//Clear flag3
//Wait until the switch has been released
//A small delay for relaxation
//Check whether switch 4 is being pressed
//and flag4 is Low
//Move 'G' to serial buffer memory
//Wait until TI flag is set by hardware
//when an entire byte has been transmitted
41. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
TI=0;
flag4=1;
while(key4==0);
DELAY();
}
else if (key4 ==0 && flag4==1)
{
SBUF='H';
while (TI==0);
TI=0;
flag4=0;
while(key4==0);
DELAY();
}
}
}
void DELAY()
{
unsigned int X=60000;
while(X--);
}
// Forcibly clear TI flag
//Set flag4
//Wait until the switch has been released
//A small delay for relaxation
//Check whether switch 4 is being pressed
//and flag4 is High
//Move 'H' to serial buffer memory
//Wait until TI flag is set by hardware
//when an entire byte has been transmitted
// Forcibly clear TI flag
//Clear flag4
//Wait until the switch has been released
//A small delay for relaxation
//Function for delay routine
// larger the value of X the more is the delay.
// executes this statement until / X decrements to 0
3 Axis Accelerometer
Quick Overview
3-axis accelerometer to now have an on-board 3.3V regulator -
making it a perfect choice for interfacing with a 5V microcontroller
such as the . This breakout comes with 3 analog outputs for X, Y and Z
axis breakout board. The ADXL335 is the latest and greatest from
Analog Devices, known for their exceptional quality MEMS devices.
The VCC takes up to 5V in and regulates it to 3.3V with an output pin.
The analog outputs are ratiometric: that means that 0g measurement
output is always at half of the 3.3V output (1.65V), -3g is at 0v and 3g
is at 3.3V with full scaling in between. Fully assembled and tested.
The XYZ filter capacitors are 0.1uF for a 50 Hz bandwidth
Tips
Code & Schematic
For more details
www.researchdesignlab.com
42. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
LED’s and XBee interfacing using 8051 Microcontroller and Keil– AT89S52
Circuit and Working:
Fig.8 shows the circuit of simple 8051 Microcontroller interfaced with XBee and 8 LED’s.
Program 8 demonstrates how to receive serial data wirelessly and toggle the state of a LED.
Components/modules required :
1) 8051 project board (assembled/non assembled kit).
2) 5V DC source.
3) XBee(S2)
4) XBee power supply board
5) 8 LED’s.
6) Resistors (1KΩx8).
7) IC AT89S52.
8) 8051 IC burner.
9) Connectors and cables.
Fig. 8 Circuit Diagram for XBee and LED interfacing
43. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
Program 8:
#include<reg52.h>
void delay();
sbit LED0=P2^0;
sbit LED1=P2^1;
sbit LED2=P2^2;
sbit LED3=P2^3;
sbit LED4=P2^4;
sbit LED5=P2^5;
sbit LED6=P2^6;
sbit LED7=P2^7;
unsigned char byte1,byte2;
void main()
{
TMOD=0X20;
SCON=0X50;
TH1=0XFD;
TR1=1;
delay();
TI=0;
SBUF='S';
while (TI==0);
TI=0;
delay();
P2=0x00;
while(1)
{
RI=0;
while(RI==0);
byte1=SBUF;
RI=0;
if(byte1=='A')
{
LED0=1;
LED4=1;
}
else if(byte1=='B')
//special function register declarations
//for the intended 8051 derivative
// Function prototype declaration
//Define Port Pin P2.0 as LED0
//Define Port Pin P2.1 as LED1
//Define Port Pin P2.2 as LED2
//Define Port Pin P2.3 as LED3
//Define Port Pin P2.4 as LED4
//Define Port Pin P2.5 as LED5
//Define Port Pin P2.6 as LED6
//Define Port Pin P2.7 as LED7
// Variable declarations
// MAIN CODE
//Serial Initialization
//use Timer 1, mode 2
//indicating serial mode 1, where an 8-bit
//data is framed with start and stop bits
//9600 baud rate
//Start timer
//Wait for some time for serial initialization to finish
// Transmit 'S' to check whether the setup is ready
//Forcibly change the Transmit Interrupt
//Flag of 8051 to 0
//Move 'S' to serial buffer memory
//Wait until TI flag is set by hardware
//when an entire byte has been transmitted
// Forcibly clear TI flag
//A small delay for relaxation
//Set Port 2 all bits to 0
// continuous loop
//Forcibly clear the Receive Interrupt
//Flag of 8051 to 0
//Wait until RI flag is set by hardware
//when an entire byte has been received
//Move the received byte of data into variable 'byte1'
//Forcibly clear RI flag
//Check whether the received byte of data is 'A'
//Turn on LED0
//Turn on LED4
//Check whether the received byte of data is 'B'
44. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
{
LED0=0;
LED4=0;
}
else if(byte1=='C')
{
LED1=1;
LED5=1;
}
else if(byte1=='D')
{
LED1=0;
LED5=0;
}
else if(byte1=='E')
{
LED2=1;
LED6=1;
}
else if(byte1=='F')
{
LED2=0;
LED6=0;
}
else if(byte1=='G')
{
LED3=1;
LED7=1;
}
else if(byte1=='H')
LED3=0;
LED7=0;
}
else
{
P2=0x00;
delay();
}
}
}
void delay()
{
unsigned int x=60000;
while (x--);
}
//Turn off LED0
//Turn off LED4
//Check whether the received byte of data is 'C'
//Turn on LED1
//Turn on LED5
//Check whether the received byte of data is 'D'
//Turn off LED1
//Turn off LED5
//Check whether the received byte of data is 'E'
//Turn on LED2
//Turn on LED6
//Check whether the received byte of data is 'F'
//Turn off LED2
//Turn off LED6
//Check whether the received byte of data is 'G'
//Turn on LED3
//Turn on LED7
//Check whether the received byte of data is 'H'
{
//Turn off LED3
//Turn off LED7
//Set Port 2 all bits to 0
//if any other variable has been received
//Wait for a small delay
// Delay Routine
// larger the value of x the more is the delay.
// executes this statement until x decrements to 0
45. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
GSM Modem and LCD interfacing using 8051 Microcontroller and Keil– AT89S52
Circuit and Working:
Fig.9 shows the circuit of simple 8051 Microcontroller interfaced with GSM Modem and LCD. The
Modem sends an SMS every time you turn on your microcontroller. Following this the modem will
be waiting for any message to be received, once a message has been received, the message will
be displayed on the LCD.
Program 9 demonstrates how to initialize GSM modem through “AT” commands via a serial
interface and send/receive a SMS through it.
Please note: GSM modem needs to be turned on at least 10 seconds before you turn on the micro
controller (GSM takes a few seconds to turn on)
Fig.9
Circuit Diagram
for GSM Modem
and 16X2 LCD
Components/modules required :
1)8051 project board (assembled/non assembled kit).
2)5V and 12V,1A DC source.
3)GSM Module.
4)16X2 LCD interfacing module.
5)IC AT89S52.
6)8051 IC burner.
7)Connectors and cables.
46. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
Program 9:
#include"reg52.h"
#define CR 0X0D
#define LF 0X0A
#define EOM 0X1A
#define LCD_PORT P2
sbit rs=P3^5;
sbit rw=P3^6;
sbit en=P3^7;
sbit D7=P2^7;
void busy();
void CMD_WRT(unsigned char);
void LCD_WRT(unsigned char *);
void DATA_WRT(unsigned char);
void TRANSMIT(unsigned char *);
void transmit_byte(unsigned char );
void READ_SMS(void);
void SEND_CMD(unsigned char *BASE_ADD,unsigned char COUNT);
void SEND_CRLF(unsigned char);
unsigned char recv_byte (void);
void RX_REPLY();
void ENTER(void);
void DELAY();
unsigned char count12=0,message[50];
unsigned char byte1,k,temp;
unsigned char Test_Text[]="GSM Testing";
unsigned char code CMD_1[]="AT";
unsigned char code CMD_3[]="AT+CMGF=1";
unsigned char code CMD_4[]="AT+CMGD=1";
unsigned char code CMD_9[]="AT+CMGS="7411001407"";
//Special function register declarations
//for the intended 8051 derivative
//Define CR as 13
//Define LF as 10
//Define EOM as CNTRL+Z
// LCD connections
//Define Port 2 as LCD Data pins
//Register Select is connected to Port 3 pin 5
//Read/Write is connected to Port 3 pin 6
//Enable is connected to Port 3 pin 7
//Data Pin D7 is connected to Port 2 pin 7
// Call function declarations
//This Function checks whether the LCD is ready to
//receive next byte
//This Function is used to write commands
//into the LCD
//This Function is used to write Strings
//into the LCD
//This Function is used to write a byte of
//data into the LCD
//This Function is used to write Strings into
//the serial Port
//This Function is used to write a byte of
//data into the serial Port
//This function separates the text message from
//the SMS received
//This function sends GSM commands via the serial interface
//This function writes a 8 bit hex value into
//the serial interface
//This function receives a byte of data
//through the serial interface
//This function waits for a character 'K'(of OK) which
//the GSM modem replies for its commands
//This function is used to hit enter into the GSM
//modem whenever required
//Call Function declarations for delay
// Global variable declaration and initialization
// GSM commands declaration
//GSM Attention command
//GSM text initialization
//command
//Delete previous SMS
//command
//Edit the 10
//digit destination number here
47. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
void main()
{
unsigned char CMD[]={0x38,0x0f,0x01,0x06,0x80};
unsigned char I,TEMP,count=0;
for(i=0;i<=4;i++)
{
TEMP=CMD[i];
CMD_WRT(TEMP);
}
CMD_WRT(0X01);
CMD_WRT(0X80);
LCD_WRT(" RDL ");
DELAY();
DELAY();
DELAY();
CMD_WRT(0X01);
CMD_WRT(0X80);
LCD_WRT("Initializing GSM");
DELAY();
DELAY();
TMOD=0X20;
SCON=0X50;
TH1=0XFD;
TR1=1;
DELAY();
SEND_CMD(CMD_1,2);
DELAY();
ENTER();
RX_REPLY();
DELAY();
CMD_WRT(0X01);
CMD_WRT(0X80);
LCD_WRT("GSM Initialized!");
DELAY();
CMD_WRT(0XC0);
LCD_WRT("Sending SMS..");
DELAY();
// MAIN CODE
//LCD Initialization
//commands, hex codes
//Local variable declarations
//Initialization of LCD
//Write the commands into the LCD
//This command clears the LCD screen
//This moves the cursor to the beginning of the 1st line
//Writes the text 'RDL' in the LCD
//These delay's will hold the above text 'RDL' for some
//time on the LCD
//This command clears the LCD screen
//This moves the cursor to the beginning of the 1st line
//Writes the text 'Initializing GSM' in the LCD
//Serial Initialization
//Use Timer 1, mode 2
//Indicating serial mode 1, where an 8-bit data is
//framed with start and stop bits
//9600 baud rate
//Start timer
//Wait for some time for serial initialization to finish
//Enter GSM Attention command
//A small delay for relaxation
//Hit enter
//Wait for GSM modem to respond
//A small delay for relaxation
//This command clears the LCD screen
//This moves the cursor to the beginning of the 1st line
//Writes the text 'GSM Initialized ' in the LCD
//A small delay for relaxation
//This moves the cursor to the beginning of the
//2nd line
//Writes the text 'Sending SMS..' from the
//current pointer of LCD
//A small delay for relaxation
48. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
SEND_CMD(CMD_3,9);
DELAY();
ENTER();
RX_REPLY();
DELAY();
SEND_CMD(CMD_4,9);
DELAY();
ENTER();
RX_REPLY();
DELAY();
SEND_CMD(CMD_9,20);
DELAY();
ENTER();
DELAY();
TRANSMIT(Test_Text);
DELAY();
transmit_byte(EOM);
RX_REPLY();
DELAY();
CMD_WRT(0X01);
CMD_WRT(0X80);
LCD_WRT("TEXT SENT!!");
DELAY();
while(1)
{
DELAY();
CMD_WRT(0XC0);
LCD_WRT("WAITING..");
DELAY();
READ_SMS();
DELAY();
}
}
void busy()
{
D7=1;
rs=0;
rw=1;
while(D7!=0)
//Enter GSM text initialization command
//A small delay for relaxation
//Hit enter
//Wait for GSM modem to respond
//A small delay for relaxation
//Enter Delete previous SMS command to free up
//space for new SMS
//A small delay for relaxation
//Hit enter
//Wait for GSM modem to respond
//A small delay for relaxation
//Enter the command for sending the SMS to a
//destination number
//A small delay for relaxation
//Hit enter
//A small delay for relaxation
//Enter the text within the previously declared
//variable Test_Text
//A small delay for relaxation
//Enter ASCII equivalent of CNTRL+Z
//Wait for GSM modem to respond
//A small delay for relaxation
//This command clears the LCD screen
//This moves the cursor to the beginning of the 1st line
//Writes the text 'TEXT SENT!!' in the LCD
//A small delay for relaxation
//Continuous loop
//A small delay for relaxation
//This moves the cursor to the beginning of the 2nd line
//Writes the text 'WAITING..' from the current pointer
//of LCD
//A small delay for relaxation
//Call 'READ_SMS()' function which waits until a SMS has been
//received and separates the text message from it
//A small delay for relaxation
//This Function checks whether the LCD is ready to receive next byte
//Keep D7 pin to High
//Keep RS to Low to select command register
// RW=1 for read
//Monitor D7 pin until it gets low
49. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
SEND_CRLF(LF);
}
void SEND_CRLF(unsigned char CRLF)
{
SBUF=CRLF;
while(TI==0);
TI=0;
}
void SEND_CMD(unsigned char *BASE_ADD,unsigned char COUNT)
{
unsigned char I;
for(I=0;I<COUNT;I++)
{
SBUF=*BASE_ADD;
while(TI==0);
TI=0;
BASE_ADD++;
}
}
void RX_REPLY()
{
unsigned char RX=0;
while(RX!='K')
{
while(RI==0);
RX=SBUF;
RI=0;
}
}
void TRANSMIT(unsigned char *string)
{
while(*string)
transmit_byte(*string++);
}
//Send the value LF(10) to the GSM modem via the
//serial interface
//Function used for sending an 8 bit value to the serial interface
//Move the contents of the variable 'CRLF' into the
//serial buffer
//Wait until TI flag is set by hardware when an entire
//byte has been transmitted
//Forcibly clear TI flag
//Function used to send a string of data at 'BASE_ADD' pointer
//having a string length of variable 'COUNT'
//Local variable declaration
//for loop till the end of the string length
//Move the byte of data to serial buffer currently
//located at the address location of the pointer
//Wait until TI flag is set by hardware when an entire
//byte has been transmitted
//Forcibly clear TI flag
//Increment the address to point the data of
//the next location
//This function waits for a character 'K'(of OK) which the GSM
//modem replies for its commands
//Local variable declaration and initialization
//Breaks this loop only when 'K' has been received, till then
//the variable 'RX' keeps waiting for 'K' to be received
//Wait until RI flag is set by hardware when an entire byte
//has been received
//Move the received byte of data into variable 'RX'
//Forcibly clear RI flag
// Function used to transmit a string of data into the serial interface
//execute the next statement till the end of the string
//Pass the 8 bit data located at the address location
//of the pointer to the function 'transmit_byte'
50. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
{
en=0;
en=1;
}
}
void CMD_WRT(unsigned char val)
{
busy();
LCD_PORT=val;
rs=0;
rw=0;
en=1;
en=0;
}
void LCD_WRT(unsigned char *string)
{
while(*string)
DATA_WRT(*string++);
}
void DATA_WRT(unsigned char ch)
{
busy();
LCD_PORT = ch;
rs=1;
rw=0;
en=1;
en=0;
}
void DELAY()
{
unsigned int X=60000,Y=60000;
while(X--);
while(Y--);
}
void ENTER(void)
{
SEND_CRLF(CR);
//Provide a latch pulse from low to high to EN
//This Function is used to write commands into the LCD
//Execute busy function to know whether the LCD is
//ready to receive any data/command
//Put the variable val into LCD_PORT which is
//connected to LCD data pins
//Keep RS to Low to select command register
// RW=0 for write
//Provide a latch pulse from High to Low to EN
//This Function is used to write Strings into the LCD
// increment from the beginning of the string until a
//null character is detected (end of the string)
// separates a single byte from the string
//This Function is used to write a byte of data into the LCD
//Execute busy function to know whether the LCD
//is ready to receive any data/command
//Put the variable val into LCD_PORT which is
//connected to LCD data pins
//Keep RS to High to select Data register
// RW=0 for write
//Provide a latch pulse from High to Low to EN
//Function for delay routine
// larger the value of X and Y the more is
//the delay.
// executes this statement until X decrements to 0;
// executes this statement until Y decrements to 0;
//Function used for sending ENTER command to the GSM Modem
//Send the value CR(13) to the GSM modem via the
//serial interface
51. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
// Function used to transmit a string of data into the serial interface
//execute the next statement till the end of the string
//Pass the 8 bit data located at the address location
// of the pointer to the function 'transmit_byte'
//Function used for sending an 8 bit data present on the variable
// 'byte' to the serial interface
//Move the contents of the variable 'byte' to serial buffer memory
//Wait until TI flag is set by hardware when an entire byte has
//been transmitted
//Forcibly clear TI flag
//This function waits until a SMS has been received and separates the text
//message from it and displays it on the LCD
//GSM read SMS command
//Local Variables declaration and initialization
//Assign any value to byte other than '+'
//Breaks this loop only when '+' has been received, till then
//the variable 'byte' keeps waiting for '+' to be received
//Keep checking for the data received in the
//call function 'recv_byte'
//A small delay for relaxation
//A small delay for relaxation
//Enter the command used for reading a SMS
//Hit enter
//The string that comes next includes quotes(") along with other
//information like time, date, number etc. of the received SMS
//Wait for at least 8 such quotes(")
//Breaks this loop only when '"' has been received, till then
//the variable 'byte' keeps waiting for '"' to be received
//Keep checking for the data received in the call
//function 'recv_byte'
//Assign any value to byte other than '"'
//Assign any value to byte other than '13'
//Breaks this loop only when '13' has been received, till then
//the variable 'byte' keeps waiting for '13' to be received
//Keep checking for the data recieved in the
//call function 'recv_byte'
void TRANSMIT(unsigned char *string)
{
while(*string)
transmit_byte(*string++);
}
void transmit_byte(unsigned char byte)
{
SBUF=byte;
while(!TI);
TI=0;
}
void READ_SMS(void)
{
unsigned char code CMD_5[]="AT+CMGR=1";
unsigned char byte,i=0, flag=0;
byte=0;
while(byte!='+')
{
byte=recv_byte();
}
DELAY();
DELAY();
SEND_CMD(CMD_5,9);
ENTER();
for(i=0;i<7;i++)
{
while(byte!='"')
{
byte=recv_byte();
}
byte=0;
}
byte=0;
while(byte!=13)
{
byte=recv_byte();
}
52. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
byte=0;
count12=0;
while(byte!=13)
{
byte=recv_byte();
message[count12]= byte;
count12++;
}
count12--;
CMD_WRT(0X01);
CMD_WRT(0X80);
DELAY();
for (k=1;k<count12;k++)
{
temp=message[k];
DATA_WRT(temp);
DELAY();
}
count12=0;
DELAY();
SEND_CMD(CMD_4,9);
DELAY();
ENTER();
RX_REPLY();
DELAY();
}
unsigned char recv_byte()
{
unsigned char D;
while(RI!=1);
D = SBUF;
RI=0;
return(D);
}
//Assign any value to byte other than '13'
//Initialize the text character counter to zero
//Breaks this loop only when '13' has been received, till then
//the variable 'byte' keeps waiting for '13' to be received
//Keep checking for the data received in the
//call function 'recv_byte'
//Move the received byte of data into the
//array 'message'
//Increment the array
//Decrement the text character counter by 1 to
//eliminate the last value received i.e '13'
//This command clears the LCD screen
//This moves the cursor to the beginning of the 1st line
//A small delay for relaxation
//Separate out individual characters of the message
//string to variable 'temp'
//Display the individual characters on the LCD 1 by 1
//A small delay for relaxation
//Clear the text character counter back to zero.
//A small delay for relaxation
//Enter Delete previous SMS command to free up
//space for new SMS
//A small delay for relaxation
//Hit enter
//Wait for GSM modem to respond
//A small delay for relaxation
//This function receives a byte of data through the serial interface
//and returns
//it back to the function where it was called
//Local variable declaration
//Wait until RI flag is set by hardware when an
//entire byte has been received
//Move the received byte of data into variable 'D'
//Forcibly clear RI flag
//Return the value to the called function where it was called
53. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
Analog to digital conversion in 8051/89c52 Microcontroller and Keil -ADC0804
Circuit and Working:
Fig 10. shows the circuit of simple 8051 Microcontroller interfaced with LCD Display and analog
to digital converter IC ADC0804. After the connections are done properly, you will be able to
view the digital value on the LCD display.
Program 10 demonstrates how to read the analog values through ICADC0804. The output of this
IC will be an 8 bit value, this 8 bit value would be connected to a microcontroller. The
microcontroller is programmed in such a way to read the port pin values and display its
equivalent decimal value on the LCD display.
Components/modules required:
1) 8051 project board (assembled/non assembled kit).
2) 5V DC source.
3) LCD interfacing Module.
4) IC ADC0804 with the circuit
connections as shown in Fig 10.2
5) IC AT89S52.
6) 8051 IC burner.
7) Connectors and cables.
Fig10.1: Circuit Diagram for LCD and ADC interfacing-Part 1.
54. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
Fig 10.2: Circuit Diagram for LCD and ADC interfacing-Part 2.
Programme 10
#include<reg52.h>
#include<intrins.h>
#define adc_port P1
#define LCD_PORT P2
sbit rs=P3^5;
sbit rw=P3^6;
sbit en=P3^7;
sbit D7=P2^7;
void busy();
void CMD_WRT(unsigned char);
void LCD_WRT(unsigned char *);
void DATA_WRT(unsigned char);
void CONVERT_DISPLAY(unsigned char);
void DELAY();
//Define Port 1 as ADC port Data pins
// LCD connections
//Define Port 2 as LCD Data pins
//Register Select is connected to Port 3 pin 5
//Read/Write is connected to Port 3 pin 6
//Enable is connected to Port 3 pin 7
//Data Pin D7 is connected to Port 2 pin 7
// Call function declarations
//This Function checks whether the LCD is ready to receive
//next byte
//This Function is used to write commands into the LCD
//This Function is used to write Strings into the LCD
//This Function is used to write a byte of data into the LCD
//This Function is used to convert Hex data to Decimal
//equivalent and write into the LCD
//Call Function declarations for delay
55. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
sbit rd=P3^0;
sbit wr=P3^1;
sbit intr=P3^3;
void read();
void conv();
unsigned int adc_value;
void main()
{
unsigned char CMD[]={0x38,0x0f,0x01,0x06,0x80};
unsigned char i,TEMP;
for(i=0;i<=4;i++)
{
TEMP=CMD[i];
CMD_WRT(TEMP);
}
CMD_WRT(0X01);
CMD_WRT(0X80);
LCD_WRT("ADC0804..RDL. ");
while(1)
{
CMD_WRT(0XC4);
conv();
read();
CONVERT_DISPLAY(adc_value);
DELAY();
DELAY();
DELAY();
}
}
void DELAY()
{
unsigned int X=60000;
while(X--);
//RD of ADC0804 IC is connected to Port 3 pin 0
//WR of ADC0804 IC is connected to Port 3 pin 1
//INTR of ADC0804 IC is connected to Port 3 pin 3
//LCD Initialization commands, hex codes
//Local variable declarations
//Initialization of lcd
//Write the commands into the LCD
//This command clears the LCD screen
//This moves the cursor to the beginning of the 1st line
//Writes the text 'ADC0804..RDL.' in the LCD
//cursor on second line
// call conv to convert anolog voltage to digtal 8 bit
// call read toi read 8 bit digtal value
//convert and display
//Function for delay routine
// larger the value of X and Y the more is the delay.
// executes this statement until X decrements to 0;
56. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
}
void busy()
{
D7=1;
rs=0;
rw=1;
while(D7!=0)
{
en=0;
en=1;
}
}
void CMD_WRT(unsigned char val)
{
busy();
LCD_PORT=val;
rs=0;
rw=0;
en=1;
en=0;
}
void LCD_WRT(unsigned char *string)
{
while(*string)
DATA_WRT(*string++);
}
void DATA_WRT(unsigned char ch)
{
busy();
LCD_PORT = ch;
rs=1;
rw=0;
en=1;
en=0;
}
//This Function checks whether the LCD is ready to receive next byte
//Keep D7 pin to High
//Keep RS to Low to select command register
// RW=1 for read
//Monitor D7 pin until it gets low
//Provide a latch pulse from low to high to EN
//This Function is used to write commands into the LCD
//Execute busy function to know whether the LCD is ready to receive any data/command
//Put the variable val into LCD_PORT which is connected to LCD data pins
//Keep RS to Low to select command register
// RW=0 for write
//Provide a latch pulse from High to Low to EN
//This Function is used to write Strings into the LCD
//increment from the beginning of the string until a
//null character is detected (end of the string)
// separates a single byte from the string
//This Function is used to write a byte of data into the LCD
//Execute busy function to know whether the LCD is ready to receive any
//data/command
//Put the variable val into LCD_PORT which is connected to LCD data pins
//Keep RS to High to select Data register
// RW=0 for write
//Provide a latch pulse from High to Low to EN
57. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
//This Function is used to convert Hex data to Decimal equivalent
//and write into the LCD
//Local variable declarations
//Local variable declarations
//Local variable declarations
//Move the Hex value 'd' to a variable 'temp'
//Get the last number
//Get the 2nd last number
//Get the first number
//Concatenate all the value into a single variable
//or'ing with 0x30 will give
//the ASCII equivalent of the decimal value
//Write the 8 bit data into the LCD
//Make WR low
//nop delay
//Make WR high
//Wait for INTR to go low
//Make RD low
//Read ADC port
//Make RD high
void CONVERT_DISPLAY(unsigned char d)
{
unsigned char dig1,dig2,dig3,dig[3];
unsigned char x;
unsigned char temp;
temp=d;
temp=temp/10;
dig1=d%10;
dig2=temp%10;
dig3=temp/10;
dig[0]=dig3;
dig[1]=dig2;
dig[2]=dig1;
CMD_WRT(0XCA);
for(x=0;x<3;x++)
{
temp=dig[x]|0x30;
DATA_WRT(temp);
}
}
void conv() {
wr = 0;
_nop_ ();
_nop_ ();
_nop_ ();
wr = 1;
while (intr);
}
void read() {
rd = 0;
_nop_ ();
_nop_ ();
_nop_ ();
adc_value = adc_port;
rd = 1;
}
60. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
1. Power supply, 5V-12V
2. 40 pin ZIF socket for IC mount.
3. ISP connector*
4. Reset
5. Node connector
6. 4x1 7 segment display
7. 26 pin raspberry connector
8. Arduino Shield footprint
9. ULN 2803 driver
10. I2C bus
11. SPI bus
12. XBEE footprint/XBEE Adaptor module
13. FT232 breakout board connector
14. DC 3.3V connectors
15. DB-9 female connector
16. 8x1 LED's
17. 8 way DIP switch
18. RTC Module
19. EEPROM
20. 2x5x2 jumper node.
21. DC 5V connectors
22. Analog to Digital output
23. 4x1 keypad
24. 16x2 LCD connectors
25. Node connector
26. 4x4 Matrix Keypad
27. DC 12V connectors
28. Power ON switch
*ISP connector can be used only if c10 capacitor (at reset) is removed.
61. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
All digital circuits require regulated power supply. Here is
a simple power supply circuit diagram used on this board.
You can use AC or DC source (12V) which converts into
regulated 5V which is required for driving the
developmentboard circuit.
Select the IC's from the given list and mount on the ZIF socket. ZIF socket pin maps out PORT1
PORT2 PORT3 PORT4 for easy making connections for the restof the circuit. Port 1 is enabled with
pull up circuit and also connected ISP for easy on board Programming.
1. Power supply, 5V-12V
1. 40 pin ZIF socket for IC mount & ISP connector*
NOTE: if you are following to on board program, the capacitor c1 should be desoldered and
removed from the port. You also need to know, if you remove the capacitor the board has to
reset manually by pressing the reset button s1 each time you burn a code.
62. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
Resets your microcontroller by pressing s1
NOTE: if you are following to on board program,
the capacitor c1 should be desoldered and
removed from the port. You also need to know,
if you remove the capacitor the board has to
reset manually by pressing the reset button s1
each time you burn a code.
2. Reset
Node connector is an additional on board
connection extender or 1 connection IN
and 1 connection out
3. Node connector
One seven segment digit consist of 7+1 LEDs which are arranged in a specific formation which
can be used to represent digits from 0 to 9 and even some letters. One additional LED is used for
marking the decimal dot, in case you want to write a decimal point in the desired segment.
4. 4 digit 7 segment display
63. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
26 Pin raspberry connector is an easy way
for making connections with raspberry pi
with this development board.
5. 26 pin raspberry connector 6. Arduino Shield footprint
Arduino Shield footprint is provided in the
board to mount different types of Arduino
compatible shields on this development board.
IC ULN2803 consists of octal high voltage, high current darlington transistor arrays. The eight NPN
Darlington connected transistors in this family of arrays are ideally suited for interfacing between
low logic level digital circuitry (such as TTL, CMOS or PMOS/NMOS) and the higher
current/voltage requirements of lamps, relays, printer hammers or other similar loads for a
broad range of computer, industrial, and consumer applications.
7. ULN 2803 driver
• Eight Darlingtons with Common Emitter.
• Open–collector outputs.
• Free wheeling clamp diodes for
transient suppression.
Features
• Output Current to 500 mA.
• Output Voltage to 50 V.
• Inputs pinned opposite outputs to
simplify board layout.
64. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
The ULN 2803 IC consists of eight NPN Darlington
connected transistors (often called a Darlington
pair). Darlington pair consists of two bipolar
transistors such that the current amplified by the
first is amplified further by the second to get a
high current gain β or hFE. The figure shown below
is one of the eight Darlington pairs of ULN 2803 IC.
Now 2 cases arise:-
Case 1: When IN is 0 volts.
Q1 and Q2 both will not conduct as there is no base current provided to them. Thus, nothing will
appear at the output (OUT).
Case 2: When IN is 5 volts.
Input current will increase and both transistors Q1 and Q2 will begin to conduct. Now, input
current of Q2 is combination of input current and emitter current of Q1, so Q2 will conduct more
than Q1 resulting in higher current gain which is very much required to meet the higher current
requirements of devices like motors, relays etc. Output current flows through Q2 providing a path
(sink) to ground for the external circuit that the output is applied to. Thus, when a 5V input is
applied to any of the input pins (1 to 8), output voltage at corresponding output pin (11 to 18)
drops down to zero providing GND for the external circuit. Thus, the external circuit gets
grounded at one end while it is provided +Vcc at its other end. So, the circuit gets completed and
starts operating.
Working
65. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
One IC that wants to talk to another must: (Protocol)
1) Wait until it sees no activity on the I2C bus. SDAand SCLare both high. The bus is 'free'.
2) Put a message on the bus that says 'its mine' - I have STARTED to use the bus. All other ICs then
LISTEN to the bus data to see whether they might be the one who will be called up (addressed).
3) Provide on the CLOCK (SCL) wire a clock signal. It will be used by all the ICs as the reference
time at which each bit of DATA on the data (SDA) wire will be correct (valid) and can be used.
The data on the data wire (SDA) must be valid at the time the clock wire (SCL) switches from
'low' to 'high' voltage.
4) Put out in serial form the unique binary 'address'(name) of the IC that it wants to communicate
with.
5) Put a message (one bit) on the bus telling whether it wants to SEND or RECEIVE data from the
other chip. (The read/write wire is gone!)
6) Ask the other IC to ACKNOWLEDGE (using one bit) that it recognized its address and is ready to
communicate.
7)After the other IC acknowledges all is OK, data can be transferred.
8) The first IC sends or receives as many 8-bit words of data as it wants. After every 8-bit data
word the sending IC expects the receiving IC to acknowledge the transfer is going OK.
9) When all the data is finished the first chip must free up the bus and it does that by a special
message called 'STOP'. It is just one bit of information transferred by a special 'wiggling' of the
SDA/SCLwires of the bus.
8. I2C bus
66. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
Serial to Peripheral Interface (SPI) is a hardware/firmware communications protocol developed
by Motorola and later adopted by others in the industry. Microwire of National Semiconductor is
same as SPI. Sometimes SPI is also called a "four wire" serial bus.
The Serial Peripheral Interface or SPI-bus is a simple 4-wire serial communications interface used
by many microprocessor/microcontroller peripheral chips that enables the controllers and
peripheral devices to communicate each other. Even though it is developed primarily for the
communication between host processor and peripherals, a connection of two processors via SPI is
just as well possible.
The SPI bus, which operates at full duplex (means, signals carrying data can go in both directions
simultaneously), is a synchronous type data link setup with a Master / Slave interface and can
support up to 1 megabaud or 10Mbps of speed. Both single-master and multi-master protocols are
possible in SPI. But the multi-master bus is rarely used and look awkward, and are usually limited
to a single slave.
The SPI Bus is usually used only on the PCB. There are many facts, which prevent us from using it
outside the PCB area. The SPI Bus was designed to transfer data between various IC chips, at very
high speeds. Due to this high-speed aspect, the bus lines cannot be too long, because their
reactance increases too much, and the Bus becomes unusable. However, its possible to use the SPI
Bus outside the PCB at low speeds, but this is not quite practical.
The peripherals can be a Real Time Clocks, converters like ADC and DAC, memory modules like
EEPROM and FLASH, sensors like temperature sensors and pressure sensors, or some other devices
like signal-mixer, potentiometer, LCD controller, UART, CAN controller, USB controller and
amplifier.
9. SPI bus
67. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
All XBeeZNet 2.5 modules can be identified by their unique 64-bit addresses or a user-
configurableASCII string identifier The 64-bit address of a module can be read using the SH and SL
commands. TheASCII string identifier is configured using the NI command.
To transmit using device addressing, only the destination address must be configured. The
destination address can be specified using either the destination device's 64-bit address or its NI-
string. The XBee modules also support coordinator and broadcast addressing modes. Device
addressing in the AT firmware is configured using the DL, DH, or DN commands. In the API
firmware, the ZigBee Transmit Request API frame (0x10) can be used to specify destination
addresses.
To address a node by its 64-bit address, the destination address must be set to match the 64-bit
address of the remote. In the AT firmware, the DH and DL commands set the destination 64-bit
address. In the API firmware, the destination 64-bit address is set in the ZigBee Transmit Request
frame. ZigBee end devices rely on a parent (router or coordinator) to remain awake and receive
any data packets destined for the end device. When the end device wakes from sleep, it sends a
transmission (poll request) to its parent asking if the parent has received any RF data destined for
the end device. The parent, upon receipt of the poll request, will send an RF response and the
buffered data (if present). If the parent has no data for the end device, the end device may
return to sleep, depending on its sleep mode configuration settings. The following figure
demonstrates how the end device uses polling to receive RF data through its parent.
10. XBEE footprint/ XBEE Adaptor module
68. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
These connectors
provide on board 3.3V DC
connections.
A standard FT232 breakout board
from researchdesignlab.com
could be used to interface on
these connectors, whose other
end is connected to a USB.
RS-232 is a standard communication protocol for linking computer and its peripheral devices to
allow serial data exchange. In simple terms RS232 defines the voltage for the path used for data
exchange between the devices. It specifies common voltage and signal level, common pin wire
configuration and minimum, amount of control signals.
13. DB-9 female connector
11. FT232 breakout
board connector
12. DC 3.3V connectors
69. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
LED's are used to indicate something,
whether any pin is high or indicating
the output for many purposes like
indicating I/O status or program
debugging running state. We have
four led outputs on board which can
be used by the programmer as per the
requirement for testing and
development.
DIP switches are an alternative to jumper blocks. Their main advantages are that they are quicker
to change and there are no parts to lose.
14. 8x1 LED's
15. 8 way DIP switch
The DS1307 Serial Real Time Clock is a low power, full BCD clock/calendar plus 56 bytes of
nonvolatile SRAM. Address and data are transferred serially via a 2-wire bi-directional bus. The
clock/calendar provides seconds, minutes, hours, day, date, month, and year information. The
end of the month date is automatically adjusted for months with less than 31 days, including
corrections for leap year. The clock operates in either the 24-hour or 12-hour format withAM/PM
indicator. The DS1307 has a built-in power sense circuit which detects power failures and
automatically switches to the battery supply.
16.RTC Module
70. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
The DS1307 operates as a slave device on the serial bus. Access is obtained by implementing a
START condition and providing a device identification code followed by a register address.
Subsequent registers can be accessed sequentially until a STOP condition is executed. When VCC
falls below 1.25 x VBAT the device terminates an access in progress and resets the device address
counter. Inputs to the device will not be recognized at this time to prevent erroneous data from
being written to the device from an out of tolerance system. When VCC falls below VBAT the
device switches into a low current battery backup mode. Upon power up, the device switches
from battery to VCC when VCC is greater than VBAT +0.2V and recognizes inputs.
Features:
1. 56 byte nonvolatile RAM for data storage
2. 2-wire serial interface
3. Programmable square wave output signal
4. Automatic power-fail detect and switch circuitry
5. Consumes less than 500 nA in battery backup mode with oscillator running
6. Optional industrial temperature range -40°C to +85°C
7. Available in 8-pin DIP or SOIC
8. Recognized by Underwriters Laboratory
Operation
PIN DESCRIPTION
1. VCC - Primary Power Supply
2. X1, X2 - 32.768 kHz Crystal Connection
3. VBAT - +3V Battery Input
4. GND - Ground
5. SDA - Serial Data
6. SCL - Serial Clock
7. SQW/OUT - Square wave/Output Driver
71. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
IC, EEPROM I2C 4K, 24C04, DIP8
Memory Size: 4Kbit
Memory Configuration: 512 x 8
Interface Type: I2C, Serial
Clock Frequency: 400kHz
Supply Voltage Range: 2.5V to 5.5V
Memory Case Style: DIP
No. of Pins: 8
Operating Temperature Range: -40°C to +85°C
SVHC: No SVHC (19-Dec-2011)
Base Number: 24
Device Marking: M24C04
IC Generic Number: 24C04
Interface: I2C
Interface Type: Serial, I2C
Logic Function Number: 24C04
Memory Configuration: 512 x 8
Memory Size: 4Kbit
Memory Type: EEPROM
Memory Voltage Vcc: 2.5V
Operating Temperature Max: +85°C
Operating Temperature Min: -40°C
Package / Case: DIP
Supply Voltage Max: 5.5V
Supply Voltage Min: 2.5V
Termination Type: Through Hole
Voltage Vcc: 2.5V
17. EEPROM
Node connector is an additional on board connection extender or 1 connection IN and 1
connection out
18. 2x5x2 jumper node
72. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
These connectors provide on
board 5V DC connections.
The ADC0804 is CMOS 8-bit successiveapproximation A/Dconverters that use a differential
potentiometric ladder similar to the 256R products. This converteris designed to allow operation
with the NSC800 and INS8080Aderivative control bus with TRI-STATEoutput latches directly
driving the data bus. These A/Ds appear like memory locations or I/O ports to the microprocessor
and no interfacing logic is needed.
Differential analog voltage inputs allow increasing the common-mode rejection and offsetting
the analog zero inputvoltage value.. In addition, the voltage reference input canbe adjusted to
allow encoding any smaller analog voltagespan to the full 8 bits of resolution.
19. DC 5V connectors
20. Analog to Digital output
Features
• Compatible with 8080 µP derivatives no
interfacing logic needed - access time - 135 ns
• Easy interface to all microprocessors,
or operates ``stand-alone''
• Differential analog voltage inputs
• Differential analog voltage inputs
• Works with 2.5V (LM336) voltage reference
• On-chip clock generator
• 0V to 5V analog input voltage range with
single 5V supply
• No zero adjust required
• 0.3× standard width 20-pin DIP package
• 20-pin molded chip carrier or small
outline package
• Operates ratio metrically or with 5 VDC,
2.5 VDC, or analog span adjusted
voltage reference
73. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
Switches are mainly used to
switch the controls of a
module. We have four
switches on board which can
be used by the programmer
as per the requirement for
testing and development.
LCD screen consists of two lines with 16 characters each. Each character consists of 5x7 dot
matrix. Contrast on display depends on the power supply voltage and whether messages are
displayed in one or two lines. For that reason, variable voltage 0-Vdd is applied on pin marked as
Vee. Trimmer potentiometer is usually used for that purpose. Some versions of displays have built
in backlight (blue or green diodes). When used during operating, a resistor for current limitation
should be used (like with any LE diode). LCD Connection Depending on how many lines are used
for connection to the microcontroller, there are 8-bit and 4-bit LCD modes. The appropriate mode
is determined at the beginning of the process in a phase called “initialization”. In the first case,
the data are transferred through outputs D0-D7 as it has been already explained. In case of 4-bit
LED mode, for the sake of saving valuable I/O pins of the microcontroller, there are only 4 higher
bits (D4-D7) used for communication, while other may be left unconnected.
Consequently, each data is sent to LCD in two steps: four higher bits are sent first (that normally
would be sent through lines D4-D7), four lower bits are sent afterwards. With the help of
initialization, LCD will correctly connect and interpret each data received. Besides, with regards
to the fact that data are rarely read from LCD (data mainly are transferred from microcontroller
to LCD) one more I/O pin may be saved by simple connecting R/W pin to the Ground. Such saving
has its price. Even though message displaying will be normally performed, it will not be possible
to read from busy flag since it is not possible to read from display.
21. 4x1 keypad
22. 16x2 LCD connectors
74. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
Features:
1. Can display 224 different symbols.
2. Low power consumption.
3. 5x7 dot matrix format.
4. Powerful command set and user produced characters.
Fig: Circuit connections of LCD
PIN DESCRIPTION
1. Gnd:- Power supply ground
2. VCC:-+5v Power supply input
3. RS:- Reset pin
4. R/W:- Read/Write pin
5. En:-Enable pin
6. D0-D7:- Data lines
10k
75. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
Node connector is an additional
on board connection extender or
1 connection IN and 1
connection out
In a 4x4 matrix keypad eight Input/Output ports are used for interfacing with any
microcontrollers. Rows are connected to Peripheral Input/Output (PIO) pins configured as
output. Columns are connected to PIO pins configured as input with interrupts. In this
configuration, four pull-up resistors must be added in order to apply a high level on the
corresponding input pins as shown in below Figure. The corresponding hexadecimal value of the
pressed key is sent on four LEDs.
WORKING
This Application Note describes programming techniques implemented on the AT91 ARM-based
microcontroller for scanning a 4x4 Keyboard matrix usually found in both consumer and industrial
applications for numeric data entry.AT91 Keyboard interface In this application, a 4x4 matrix
keypad requiring eight Input/Output ports for interfacing is used as an example. Rows are
connected to Peripheral Input/Output (PIO) pins configured as output. Columns are connected to
PIO pins configured as input with interrupts. In this configuration, four pull-up resistors must be
added in order to apply a high level on the corresponding input pins as shown in Figure 1. The
corresponding hexadecimal value of the pressed key is sent on four LEDs.
23. Node connector
24. 4x4 Matrix Keypad
FEATURES
1. Contact debouncing.
2. Easy to interface.
3. Interfaces to any microcontroller or microprocessor.
4. Data valid output signal for interrupt activation.
PIN DETAILS
pin 1-4: R0-R3:- Rows
pin 5-8: C0-C3:- Columns
76. RESEARCH DESIGN LABS | VOLUME 1, ISSUE 1 WWW.RESEARCHDESIGNLAB.COM
25.DC 12V connectors
These connectors provide on
board 12V DC connections.
In modern computers you cannot find serial port (DB-9). But most of the basic controllers work
with this protocol. To connect your system to such controllers we require USB to serial converters.
This board has the facility to be connected directly to USB using a USB cable (Ato B).
26.USB to serial converter (optional)
Programming Codes:
• LED BLINK
• LCD
• KEYPAD
• UART
http://researchdesignlab.com/8051-uart-code
http://researchdesignlab.com/8051-i/o-code
http://researchdesignlab.com/8051-lcd-code
http://researchdesignlab.com/8051-keypad-code
• RTC
• EEPROM
• ADC
• 7 Segment Display
http://researchdesignlab.com/8051-rtc-code
http://researchdesignlab.com/8051-eeprom-code
http://researchdesignlab.com/8051-adc-code.html
http://researchdesignlab.com/7-segment-atmel-code.html