At89s52, The code does not work

Thread Starter

Missio2468

Joined Mar 18, 2022
72
I am developing a blink project in at89s52. I am using arduino uno as programmer.I have connected MISO,MOSI SCK,RST, VCC And Gnd as shown in its datasheet. The problem that i face is that I have generated hex file which is of 203 bytes. and while flashing only 58 bytes are shown which is being flashed. Also The code doesnot work accordingly. Crystal is 11.0592 with 2-30pF.
Attaching the Code:
Code:
#include <REGX52.h>
void delay(void){
int i,j;
    for(i=0;i<200;i++){  
            for(j=0;j<200;j++){  
    }
    }
}

void main (void){
while(1){
    P0 = 0x01;
    delay();
    P0 = 0x08;
    delay();
}
}
Moderators note: added code tags
 

Thread Starter

Missio2468

Joined Mar 18, 2022
72
Ok sure,
When I try to upload through USBASP Programmer, Error is PLease update usbasp firmware. And How to do that?
The Code gets uploaded via Arduino but It fails to upload through USBASP programmer and PRogramISp Software
 
Top