How To Solve Chip Enable Program Error I

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Prepared by: Sanzhar Askaruly, Nazarbayev University

How to solve “chip enable program error”

During the Embedded Microcontrollers course taken at the university 3rd year we frequently
experimented with microcontroller. Specifically, we had 8051 board (Atmel AT89s51).

Atmel AT89s51

Progisp compiler
In the beginning I tried to compile the written program. After a few times of compiling, I still got
the same error message, which said "chip enable program error". 
I have written the program in Keil program and compiled it with progisp. 
After a few trials by myself and searching the Internet I finally could resolve the issue. How it
was solved (do all of them):
1. Check if the USBasp driver is properly installed (update it from settings).
2. Recheck the jumpers. Change them if they are weakly connected.
3. Try to change the port, sometimes some ports can malfunction (ex. from port 1 to port 0).
Prepared by: Sanzhar Askaruly, Nazarbayev University
4. Press reset button for 10 seconds.
5. Try to erase current program from progisp compiler, and load flash of hex file again.

Sample program that I ran on compiler:

#include <reg52.h> //definition of microcontroller library


#define LEDPORT P1 //definition of port to thich the LEDs are connected

void wait_second() //declaration of 1 sec delay


{
unsigned int x;
for(x=0;x<33000;x++);
}

main()
{
int LED;
for(;;)
{
P1=~LED;
LED=128; //7th pin is on
wait_second(); //delay

LED=64; //6th pin is on


wait_second(); //delay

LED=32; //5th pin is on


wait_second(); //delay
}
}

You might also like