This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

AT89S52 doesn't work as exected.

Hi,

I am working on a small project, for which i have created chip code, which i have tested and it works fine in Keil IDE. But the same when uploaded to chip behaves partly expected or totally unexpected. Some times the chip doesn't reset even done hardware reset.

I have checked it with 3 chips, but no success. My programmer seems fine as it is detecting attached chip and programming chip correctly.

In my project I need serial communication, which is also not working fine. Sometime the MCU skips sending or receiving characters, or doesn't respond to command event after hardware resets.

Could you please suggest me how to resolve this?

Let me know if any further information is required.

Details
AT89S52, USB Programmer, C Programming language,

Regards,

Bhagirath

Parents
  • Hi Andrew,

    "As already noted, the physical construction does matter!"
    I would have posted actual image of my board, but I am out of city for 2 days so, as soon as I am there I will post the image of it.

    "How much study & research have you done into electronics in general, and the 8051 in particular?"
    Although my electronics knowledge is limited but I have basic knowledge to make my things work.

    "There are plenty of books,..."
    I have referred those articles related to 8051 in assembly as well as in c(I prefer c). Mainly I refer "8051 microcontroller and embedded system by Mazidi".

    "Alternatively, have you considered buying a ready-made board?"
    I prefer making it myself, the present one I am using is made by me(copy of one ready made special purpose board), If this doesn't resolve, I will buy one.

    "Before moving on to a project like that, have you done the basic stuff like blinking an LED, sending "Hello, World" to the serial port, receiving data from the serial port, etc,...?"

    Yes off-course, I have done that, and prior to stepper motor I have successfully control 2 dc geared motors via my laptop.

    "Your schematic doesn't show how you intend to connect to the laptop."

    I do have USB-Serial cable (pl2303), via which I send signals. I have tested the cable it is working fine.

    "As a software developer, you should know to take frequent copies of your work - so that you can always go back to the last working version..."

    I have all the versions with me, although the current version for stepper motor is the same, but added a method to control steps.

    "Have you looked at the link provided earlier?
    Have you studied the Datasheets for the devices mentioned there?
    Have you looked for examples, application notes, etc provided by the manufacturers of those devices?
    Have you googled for examples of using those chips?

    Note that none of this has anything specifically to do with Keil."

    Yes, I have gone though the link, from where I found MAX810 befitting my board.
    For me Datasheets provide too technical information to understand but still I try to get as much as i can.
    Yes its seems that my code is working fine, but some thing is wrong with board.

    Thanks

Reply
  • Hi Andrew,

    "As already noted, the physical construction does matter!"
    I would have posted actual image of my board, but I am out of city for 2 days so, as soon as I am there I will post the image of it.

    "How much study & research have you done into electronics in general, and the 8051 in particular?"
    Although my electronics knowledge is limited but I have basic knowledge to make my things work.

    "There are plenty of books,..."
    I have referred those articles related to 8051 in assembly as well as in c(I prefer c). Mainly I refer "8051 microcontroller and embedded system by Mazidi".

    "Alternatively, have you considered buying a ready-made board?"
    I prefer making it myself, the present one I am using is made by me(copy of one ready made special purpose board), If this doesn't resolve, I will buy one.

    "Before moving on to a project like that, have you done the basic stuff like blinking an LED, sending "Hello, World" to the serial port, receiving data from the serial port, etc,...?"

    Yes off-course, I have done that, and prior to stepper motor I have successfully control 2 dc geared motors via my laptop.

    "Your schematic doesn't show how you intend to connect to the laptop."

    I do have USB-Serial cable (pl2303), via which I send signals. I have tested the cable it is working fine.

    "As a software developer, you should know to take frequent copies of your work - so that you can always go back to the last working version..."

    I have all the versions with me, although the current version for stepper motor is the same, but added a method to control steps.

    "Have you looked at the link provided earlier?
    Have you studied the Datasheets for the devices mentioned there?
    Have you looked for examples, application notes, etc provided by the manufacturers of those devices?
    Have you googled for examples of using those chips?

    Note that none of this has anything specifically to do with Keil."

    Yes, I have gone though the link, from where I found MAX810 befitting my board.
    For me Datasheets provide too technical information to understand but still I try to get as much as i can.
    Yes its seems that my code is working fine, but some thing is wrong with board.

    Thanks

Children