need help getting started

I have been studying the tutorial for the 8051 at http://www.8052.com. For starters, I am writing a simple assembler code for an AT89S8253 microcontroller which will read inputs on Port1 and output it to Port3. I am using the demo C51 software from KEIL and am also using the AT89ISP cable to download the hex file onto my device. I am running the XTAL1 input at 4 MHz and have the device setup on a Teradyne J750 tester. I wrote a simple program, but I am getting timer or clock-like outputs from Port2. I am not sure how to proceed (whether I need an include file, the correct syntax, etc.). Also, can you recommend good references (books, websites)? I am new at this, so I would really appreciate the help.

Parents
  • "I ... have the device setup on a Teradyne J750 tester"

    A what?

    "I am using the demo C51 software from KEIL"

    Are you writing in 'C' or assmbler?
    Have you tried any of the examples that come with the Keil installation?

    "I wrote a simple program"

    Why not show it?
    It's just blind guessing trying to comment on unseen code!

    Be sure to follow the instructions for posting code:
    http://www.keil.com/forum/tips.asp

    "I am getting timer or clock-like outputs from Port2"

    What do you mean by that?
    What's happenning on Ports 1 & 3?

    "I am not sure how to proceed (whether I need an include file, the correct syntax, etc.)."

    You always need the correct syntax!
    If you were missing an include file, or had incorrect syntax, you would get error messages.

    Did your program build correctly without errors or warnings?
    (this is a necessary condition, but not sufficient: code can be syntacticallly error-free but logically flawed and, hence, not work).

    "Also, can you recommend good references (books, websites)?"

    http://www.keil.com/books/8051books.asp
    www.8052.com/books.phtml

    The ACCU (Association of C & C++ Users) also has a whole load of book reviews - including a section on embedded:

    brian.accu.org/.../

Reply
  • "I ... have the device setup on a Teradyne J750 tester"

    A what?

    "I am using the demo C51 software from KEIL"

    Are you writing in 'C' or assmbler?
    Have you tried any of the examples that come with the Keil installation?

    "I wrote a simple program"

    Why not show it?
    It's just blind guessing trying to comment on unseen code!

    Be sure to follow the instructions for posting code:
    http://www.keil.com/forum/tips.asp

    "I am getting timer or clock-like outputs from Port2"

    What do you mean by that?
    What's happenning on Ports 1 & 3?

    "I am not sure how to proceed (whether I need an include file, the correct syntax, etc.)."

    You always need the correct syntax!
    If you were missing an include file, or had incorrect syntax, you would get error messages.

    Did your program build correctly without errors or warnings?
    (this is a necessary condition, but not sufficient: code can be syntacticallly error-free but logically flawed and, hence, not work).

    "Also, can you recommend good references (books, websites)?"

    http://www.keil.com/books/8051books.asp
    www.8052.com/books.phtml

    The ACCU (Association of C & C++ Users) also has a whole load of book reviews - including a section on embedded:

    brian.accu.org/.../

Children
More questions in this forum