Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: 89s52 problem ..

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2005
    Posts
    14

    Default 89s52 problem ..

    Hi ..

    I wrote a code in Keil for a 89s52 and downloaded it to the chip..

    It is only for the bot to move straight..I am using a L298HN ..the code compiled successfully .. But the bot does not move .. I am getting a voltage reading of 3-4 volts at the Port 2 pins .. PLzz help me out ..
    i have a ckt hat i am using .. can some one plzz look it up and tell me if is wrong ??i

  2. #2
    Senior Member T-1000
    Join Date
    Mar 2005
    Location
    Bangalore
    Posts
    728
    Blog Entries
    7

    Default

    the info you gave is insufficient.

    the reasons why it ddnt work could be...

    1) Wiring problems with 52.... check crystal,its capacitors, reset circuitry
    2) L298 wiring..
    3) Hex file format
    4) Programmer error
    5) Algorithm error
    6) Incorrect circuit diagram
    7) Unregulated Power supply
    8 ) Defective chips
    9) Ungeared motors (or insufficient torque)
    10) motor not working
    11) insufficient supply current


    and hundreds of reasons to think of.

    so do explain in detail, what you have done..(very detail)
    we may not be able to help if we dont know the question.

    all the best!!
    .... I didnt do it ! ....

  3. #3
    Junior Member Newbie
    Join Date
    Sep 2005
    Posts
    14

    Default

    hmm allbits .. there is no visible provision here to upload the ckt here ... can u help me ??

  4. #4
    Junior Member User
    Join Date
    Aug 2006
    Location
    chennai
    Posts
    15

    Default Re: 89s52 problem ..

    Quote Originally Posted by jagz
    Hi ..

    I wrote a code in Keil for a 89s52 and downloaded it to the chip..

    It is only for the bot to move straight..I am using a L298HN ..the code compiled successfully .. But the bot does not move .. I am getting a voltage reading of 3-4 volts at the Port 2 pins .. PLzz help me out ..
    i have a ckt hat i am using .. can some one plzz look it up and tell me if is wrong ??i
    hey jagz mail me the circuit i will try to sort it out.
    kjkumaresh@gmail.com

  5. #5

    Default

    I have checked this IC's datasheet:

    http://www.datasheetcatalog.com/data...8/L298HN.shtml

    It semms likely that it need PWM at correctly duty circle.
    Microcontroller Programming:
    http://mcu-programming.blogspot.com
    uC - News, Resources and Tutorials

  6. #6
    Senior Member T-1000
    Join Date
    Mar 2005
    Location
    Bangalore
    Posts
    728
    Blog Entries
    7

    Default

    if you have not found a solution,

    post your circuit at imageshack or some free image hosting services..

    post a link to your photos here ..
    .... I didnt do it ! ....

  7. #7
    Junior Member Newbie
    Join Date
    Sep 2005
    Posts
    14

    Default Posting the circuit

    Hi guys .. thanks for a reply .. I havent yet found a solution .. i'll just get on with drawing the ckt .. and post it .. or mail it .. Had my semesters .. till today ..


    Done here it is

    http://img296.imageshack.us/img296/127/89c52cktql4.png

    plzz help me guys ...

  8. #8
    Senior Member T-1000
    Join Date
    Mar 2005
    Location
    Bangalore
    Posts
    728
    Blog Entries
    7

    Default

    ok now.

    1)Connect a resistor between pin no 9 and ground. (normally 8.2 K - 10K) Connect s1 the way which you have drawn in the diagram.


    2) make sure that pin no 31 is pulled up to vcc.

    3) Remove L298 connections. check the logic levels at P2.0-P2.3 and check if its correct

    4) It that is correct, Give logic levels to input of L298 and see if the motor is working

    5) if it works, there wont be much of a problem.

    6) if step (3) doesnt work, it could be that chip is damaged, or the programming was not successful

    7) Use a simulator.. Keil has a good one. Check if you simulated it right.

    8 ) Check if the motor is rated at 5V..
    .... I didnt do it ! ....

  9. #9
    Junior Member Newbie
    Join Date
    Jan 2006
    Location
    nagpur
    Posts
    7

    Default

    hey..
    i was getting the same problem
    while interfacing my stepper motor..
    probably the 89c52 is not able to source the
    current required by the driver input..
    you can try connecting a 10k pull up at the mc
    pins 21,.. 24(between 5v and the pin)..
    check out the datasheet for the internal
    pin diagram of the 8051..
    all the best for your project..

  10. #10

    Default

    As from the above discussions nd the diagram i see tht the Vs is used here 5V ... i would prefer going for 9V as current is drawn from this voltage source

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •