Introduction: PROGRAMMING AT89S52 USING ARDUINO
In-System Programming (ISP) aka In-Circuit Serial Programming (ICSP) is the ability of some programmable logic devices, microcontrollers, and other embedded devices to be programmed while installed in a complete system, rather than requiring the chip to be programmed prior to installing it into the system.
In this tutorial the AT89S52 microcontroller is programmed by using Arduino as an In-Circuit Serial Programmer.
2x 33pF Disc Capacitors
1x 11.0592MHz Crystal Oscillator
1x 0.1uF Capacitor
1x 10kOhm Resistor
1x Push Button
1x Bread Board
Jumper Wires - as Required
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: CIRCUIT CONNECTIONS
Connect the components in a breadboard as shown in the figure.
*Note: pin 31 should be pulled to +5v since we're using internal program memory.
Step 2: CONVERTING ARDUINO INTO ISP
1. Connect the Arduino to PC.
2. Select the appropriate board and the port.
3. Upload the code from the file attached below.
Now the arduino is ready for programming 89S52 microcontroller.
Note* Don't remove the USB cable from PC to Arduino after uploading this arduino code.
Step 3: CREATING HEX FILE
1. Open the Keil uVision software.
2. Type the program and save it as .c file.
3. Double click on 'Source Group ' and click on the .c file you created.
4. Right click on 'Target 1'.
5. Set the Crystal frequency as 11.0592MHz.
6. Check 'Use On-chip ROM'
7. Click on 'Output' tab then check the 'Create HEX file' and click OK
Step 4: PROGRAMMING AT89S52
1. Open the 89S52 programmer software in your PC.
2. Select the COM port in which the Arduino is connected.
3. Click Identify. This will result in a message saying 'atmel AT89S52 detected'.
4. Click Open hex file and select the hex file.
5. Click upload. It will write the hex file into the microcontroller.
6. It's finished. Now you can upload any code to the 89S52 by using Arduino by following this tutorial.