SlideShare ist ein Scribd-Unternehmen logo
1 von 5
Downloaden Sie, um offline zu lesen
Date. ………………………
Name: …………………………………………………

Roll No. …………………………….

EXPERIMENT
Burn a Code on a Micro-controller
Objective
1. To burn a code on Atmel AT89C51 using G540 burner.
2. To interface LED with 8051 micro-controller
Equipment
1.
2.
3.
4.
5.
6.
7.

G540 Burner.
11.059 Mhz Crystal.
AT89C51 Mirco-controller
10µF Capacitor.
10k ohm, 330 ohm resistors
LED of any color.
DC Power Supply

Using G540 Burner




Connect G540 Burner with a computer using appropriate cable (USB/Serial) and install
the software. It is recommended to use Windows XP (32-bit) or a 32-bit based Windows
NT OS.
After the installation of the software connect the G540 to your computer and run the
installed software.

MURAD HABIB


A software window should appear like this:



Click on select on the top toolbar and select Atmel AT89C51 as shown below:



After Selection click on Load on the toolbar and locate the HEX file containing your code
generated using Keil or appropriate software. After selection a file information window
will be displayed like this:

MURAD HABIB




This gives you the option on how to fill the blank space on the controller, the offset
address, loading mode and file information.
After clicking OK click on Prog on the toolbar to begin the code burning sequence. The
code will burn in the following sequence:
-Erase
-Blank
-Program
-Verify
-Encrypt
When this sequence is completed your code is successfully burned on the
Microcontroller and is ready to be placed in the circuit.

Interface LED with AT89C51:
AT89C51 is a 40 pin microcontroller which belongs to 8051 series of microcontroller. It has four
ports each of 8 bits P0, P1, P2 and P3.The AT89C51 has 4K bytes of programmable flash. The
port P0 covers the pin 32 to pin 39, the port P1 covers the pin 1 to pin 8, the port P2 covers the
pin 21 to pin 28 and the port P3 covers the pin 10 to pin 17. Pin 9 is the reset pin. The reset is
active high. Whenever the controller is given supply, the reset pin must be given a high signal to
MURAD HABIB
reset the controller and bring the program counter to the starting address 0x0000. The
controller can be reset by manually connecting a switch or by connecting a combination of
resistor and capacitor as shown in the circuit diagram. A 11.059 MHz crystal is connected
between pin 18 pin 19. Pin 40 is Vcc and pin 20 is ground. Pin 31, is connected to Vcc as we are
using the internal memory of the controller (see Datasheet for details). LEDs are connected to
the port P0. LEDs need approximately 10mA current to flow through them in order to glow at
maximum intensity. However the output of the controller is not sufficient enough to drive
the LEDs, so LEDs are connected in the reverse order and they run on negative logic i.e.,
whenever 1 is given on any pin of the port, the LED will switch off and when logic 0 is provided
the LED will glow at full intensity. As soon as we provide supply to the controller, the LEDs start
blinking i.e., they become on for a certain time duration and then become off for the same time
duration. This delay is provided by calling the delay function. The values inside the delay
function have been set to provide a delay in multiples of millisecond (delay (100) will provide a
delay of 100 millisecond).


Build the circuit on Proteus and write the code on Keil. Also generate a HEX file using
keil.



Verify your circuit and code on software and then burn the HEX file on AT89C51 using
G540 burner as already explained.



Implement the circuit on Breadboard and show it to your Instructor.

Code:
#include <reg51.h>

//include directives for 8051 microcontroller

void delay(int time){

//Produces delay in msec

int a,b;
for (a=0;a<time;a++){
for (b=0;b<1275;b++){}

//1275 is due to 11.059 MHz crystal

}
}
void main(){
while(1){

//infinite loop

P0=0x00;

//P0 will have a 0 logic means 0 volt. LED will glow

delay(100);

//100msec delay

MURAD HABIB
P0=0xFF;

//P0 will have a 1 logic means 5 volt. LED will be off

delay(100);

//100msec delay

}
}

Circuit Diagram:

MURAD HABIB

Weitere ähnliche Inhalte

Was ist angesagt?

Digital clock presentation
Digital clock presentationDigital clock presentation
Digital clock presentationAditya Jha ✅
 
Physical prototyping lab3-serious_serial
Physical prototyping lab3-serious_serialPhysical prototyping lab3-serious_serial
Physical prototyping lab3-serious_serialTony Olsson.
 
basics of temperature data logger (with energia and stellaris)
basics of  temperature data logger (with energia and stellaris)basics of  temperature data logger (with energia and stellaris)
basics of temperature data logger (with energia and stellaris)Zafer Genc
 
INTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCK
INTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCKINTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCK
INTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCKSantanu Chatterjee
 
Project report on the Digital clock using RTC and microcontroller 8051
Project report on the Digital clock using RTC and microcontroller 8051Project report on the Digital clock using RTC and microcontroller 8051
Project report on the Digital clock using RTC and microcontroller 8051Maulik Sanchela
 
Digital Alarm Clock (IC-TMS-8560)
Digital Alarm Clock (IC-TMS-8560)Digital Alarm Clock (IC-TMS-8560)
Digital Alarm Clock (IC-TMS-8560)Chintan Patel
 
Pt 51 kit - Peripheral self-test
Pt 51 kit - Peripheral self-testPt 51 kit - Peripheral self-test
Pt 51 kit - Peripheral self-testrajbabureliance
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalTony Olsson.
 
Digital Alarm Clock 446 project report
Digital Alarm Clock 446 project reportDigital Alarm Clock 446 project report
Digital Alarm Clock 446 project reportAkash Mhankale
 
Temperature Controller with Atmega16
Temperature Controller with Atmega16Temperature Controller with Atmega16
Temperature Controller with Atmega16Siddhant Jaiswal
 
Digital Clock Using Logic Gates
Digital Clock Using Logic GatesDigital Clock Using Logic Gates
Digital Clock Using Logic GatesJalpaMaheshwari1
 
Digital stop watch
Digital stop watchDigital stop watch
Digital stop watchviv3ksharma
 
Up and running with Teensy 3.1
Up and running with Teensy 3.1Up and running with Teensy 3.1
Up and running with Teensy 3.1yoonghm
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Aarav Soni
 

Was ist angesagt? (20)

Digital clock presentation
Digital clock presentationDigital clock presentation
Digital clock presentation
 
Physical prototyping lab3-serious_serial
Physical prototyping lab3-serious_serialPhysical prototyping lab3-serious_serial
Physical prototyping lab3-serious_serial
 
basics of temperature data logger (with energia and stellaris)
basics of  temperature data logger (with energia and stellaris)basics of  temperature data logger (with energia and stellaris)
basics of temperature data logger (with energia and stellaris)
 
INTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCK
INTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCKINTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCK
INTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCK
 
Project report on the Digital clock using RTC and microcontroller 8051
Project report on the Digital clock using RTC and microcontroller 8051Project report on the Digital clock using RTC and microcontroller 8051
Project report on the Digital clock using RTC and microcontroller 8051
 
Digital Alarm Clock (IC-TMS-8560)
Digital Alarm Clock (IC-TMS-8560)Digital Alarm Clock (IC-TMS-8560)
Digital Alarm Clock (IC-TMS-8560)
 
Pt 51 kit - Peripheral self-test
Pt 51 kit - Peripheral self-testPt 51 kit - Peripheral self-test
Pt 51 kit - Peripheral self-test
 
Digital Clock
Digital ClockDigital Clock
Digital Clock
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digital
 
Digital Alarm Clock 446 project report
Digital Alarm Clock 446 project reportDigital Alarm Clock 446 project report
Digital Alarm Clock 446 project report
 
Temperature Controller with Atmega16
Temperature Controller with Atmega16Temperature Controller with Atmega16
Temperature Controller with Atmega16
 
Digital Clock Using Logic Gates
Digital Clock Using Logic GatesDigital Clock Using Logic Gates
Digital Clock Using Logic Gates
 
Digital stop watch
Digital stop watchDigital stop watch
Digital stop watch
 
8051 ports
8051 ports8051 ports
8051 ports
 
Up and running with Teensy 3.1
Up and running with Teensy 3.1Up and running with Teensy 3.1
Up and running with Teensy 3.1
 
89c5131datasheet
89c5131datasheet89c5131datasheet
89c5131datasheet
 
Ports 0f 8051
Ports 0f 8051Ports 0f 8051
Ports 0f 8051
 
Binary to bcd
Binary to bcdBinary to bcd
Binary to bcd
 
I/O Ports
I/O Ports I/O Ports
I/O Ports
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
 

Ähnlich wie Lab burner

Bluetooth based home appliances control
Bluetooth based home appliances controlBluetooth based home appliances control
Bluetooth based home appliances controlPROJECTRONICS
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalTony Olsson.
 
Freescale Microcontroller programming
Freescale Microcontroller programmingFreescale Microcontroller programming
Freescale Microcontroller programmingShih Cheng Tung
 
Atmel.ppt
Atmel.pptAtmel.ppt
Atmel.pptDr.YNM
 
electronic voting machine by rfid
electronic voting machine by rfidelectronic voting machine by rfid
electronic voting machine by rfidSaurabh Uniyal
 
8449972 embedded-systems-and-model-of-metro-train
8449972 embedded-systems-and-model-of-metro-train8449972 embedded-systems-and-model-of-metro-train
8449972 embedded-systems-and-model-of-metro-trainJitendra Saroj
 
Pc based wire less data aquisition system using rf(1)
Pc based wire less data aquisition system using rf(1)Pc based wire less data aquisition system using rf(1)
Pc based wire less data aquisition system using rf(1)Vishalya Dulam
 
AVR_Course_Day6 external hardware interrupts and analogue to digital converter
AVR_Course_Day6 external hardware  interrupts and analogue to digital converterAVR_Course_Day6 external hardware  interrupts and analogue to digital converter
AVR_Course_Day6 external hardware interrupts and analogue to digital converterMohamed Ali
 
digitalvoltmeterusing805112b2-170214173216 (1).pdf
digitalvoltmeterusing805112b2-170214173216 (1).pdfdigitalvoltmeterusing805112b2-170214173216 (1).pdf
digitalvoltmeterusing805112b2-170214173216 (1).pdfsatyamsinha37
 
DIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLERDIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLERChirag Lakhani
 

Ähnlich wie Lab burner (20)

Bluetooth based home appliances control
Bluetooth based home appliances controlBluetooth based home appliances control
Bluetooth based home appliances control
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digital
 
Smart home
Smart homeSmart home
Smart home
 
Smart home copy
Smart home   copySmart home   copy
Smart home copy
 
Smart home
Smart homeSmart home
Smart home
 
embedded system bye Sj
embedded system bye Sjembedded system bye Sj
embedded system bye Sj
 
Freescale Microcontroller programming
Freescale Microcontroller programmingFreescale Microcontroller programming
Freescale Microcontroller programming
 
Atmel.ppt
Atmel.pptAtmel.ppt
Atmel.ppt
 
electronic voting machine by rfid
electronic voting machine by rfidelectronic voting machine by rfid
electronic voting machine by rfid
 
8449972 embedded-systems-and-model-of-metro-train
8449972 embedded-systems-and-model-of-metro-train8449972 embedded-systems-and-model-of-metro-train
8449972 embedded-systems-and-model-of-metro-train
 
Pc based wire less data aquisition system using rf(1)
Pc based wire less data aquisition system using rf(1)Pc based wire less data aquisition system using rf(1)
Pc based wire less data aquisition system using rf(1)
 
DTMF based load control
DTMF based load controlDTMF based load control
DTMF based load control
 
AVR_Course_Day6 external hardware interrupts and analogue to digital converter
AVR_Course_Day6 external hardware  interrupts and analogue to digital converterAVR_Course_Day6 external hardware  interrupts and analogue to digital converter
AVR_Course_Day6 external hardware interrupts and analogue to digital converter
 
digitalvoltmeterusing805112b2-170214173216 (1).pdf
digitalvoltmeterusing805112b2-170214173216 (1).pdfdigitalvoltmeterusing805112b2-170214173216 (1).pdf
digitalvoltmeterusing805112b2-170214173216 (1).pdf
 
DIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLERDIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLER
 
Question Bank microcontroller 8051
Question Bank microcontroller 8051Question Bank microcontroller 8051
Question Bank microcontroller 8051
 
Badal sharma
Badal sharmaBadal sharma
Badal sharma
 
project 3 full report
project 3 full reportproject 3 full report
project 3 full report
 
Home automation
Home automationHome automation
Home automation
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 

Kürzlich hochgeladen

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 

Kürzlich hochgeladen (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 

Lab burner

  • 1. Date. ……………………… Name: ………………………………………………… Roll No. ……………………………. EXPERIMENT Burn a Code on a Micro-controller Objective 1. To burn a code on Atmel AT89C51 using G540 burner. 2. To interface LED with 8051 micro-controller Equipment 1. 2. 3. 4. 5. 6. 7. G540 Burner. 11.059 Mhz Crystal. AT89C51 Mirco-controller 10µF Capacitor. 10k ohm, 330 ohm resistors LED of any color. DC Power Supply Using G540 Burner   Connect G540 Burner with a computer using appropriate cable (USB/Serial) and install the software. It is recommended to use Windows XP (32-bit) or a 32-bit based Windows NT OS. After the installation of the software connect the G540 to your computer and run the installed software. MURAD HABIB
  • 2.  A software window should appear like this:  Click on select on the top toolbar and select Atmel AT89C51 as shown below:  After Selection click on Load on the toolbar and locate the HEX file containing your code generated using Keil or appropriate software. After selection a file information window will be displayed like this: MURAD HABIB
  • 3.   This gives you the option on how to fill the blank space on the controller, the offset address, loading mode and file information. After clicking OK click on Prog on the toolbar to begin the code burning sequence. The code will burn in the following sequence: -Erase -Blank -Program -Verify -Encrypt When this sequence is completed your code is successfully burned on the Microcontroller and is ready to be placed in the circuit. Interface LED with AT89C51: AT89C51 is a 40 pin microcontroller which belongs to 8051 series of microcontroller. It has four ports each of 8 bits P0, P1, P2 and P3.The AT89C51 has 4K bytes of programmable flash. The port P0 covers the pin 32 to pin 39, the port P1 covers the pin 1 to pin 8, the port P2 covers the pin 21 to pin 28 and the port P3 covers the pin 10 to pin 17. Pin 9 is the reset pin. The reset is active high. Whenever the controller is given supply, the reset pin must be given a high signal to MURAD HABIB
  • 4. reset the controller and bring the program counter to the starting address 0x0000. The controller can be reset by manually connecting a switch or by connecting a combination of resistor and capacitor as shown in the circuit diagram. A 11.059 MHz crystal is connected between pin 18 pin 19. Pin 40 is Vcc and pin 20 is ground. Pin 31, is connected to Vcc as we are using the internal memory of the controller (see Datasheet for details). LEDs are connected to the port P0. LEDs need approximately 10mA current to flow through them in order to glow at maximum intensity. However the output of the controller is not sufficient enough to drive the LEDs, so LEDs are connected in the reverse order and they run on negative logic i.e., whenever 1 is given on any pin of the port, the LED will switch off and when logic 0 is provided the LED will glow at full intensity. As soon as we provide supply to the controller, the LEDs start blinking i.e., they become on for a certain time duration and then become off for the same time duration. This delay is provided by calling the delay function. The values inside the delay function have been set to provide a delay in multiples of millisecond (delay (100) will provide a delay of 100 millisecond).  Build the circuit on Proteus and write the code on Keil. Also generate a HEX file using keil.  Verify your circuit and code on software and then burn the HEX file on AT89C51 using G540 burner as already explained.  Implement the circuit on Breadboard and show it to your Instructor. Code: #include <reg51.h> //include directives for 8051 microcontroller void delay(int time){ //Produces delay in msec int a,b; for (a=0;a<time;a++){ for (b=0;b<1275;b++){} //1275 is due to 11.059 MHz crystal } } void main(){ while(1){ //infinite loop P0=0x00; //P0 will have a 0 logic means 0 volt. LED will glow delay(100); //100msec delay MURAD HABIB
  • 5. P0=0xFF; //P0 will have a 1 logic means 5 volt. LED will be off delay(100); //100msec delay } } Circuit Diagram: MURAD HABIB