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

How to declare ECS1???

hi... i am using ECS1 as external data n the port i haf connected it to is D0 - D7...

how do i set bit for D0 -D7???

Parents
  • ECS1 is one of the pins in the 40pins of 8051 kitset.

    which is an external data for more useage of i/o port. As of other pins have been used up.

    so i'm now using ECS1 connection of external data which starts at address 0x4000, to connect to 74HC574 ic chip and the chip is connected to the D port (D0 to D7).

    the problem now is that i do not know how to declare the D port. which is sbit something.

    any please enlighten me. thanks alot.

Reply
  • ECS1 is one of the pins in the 40pins of 8051 kitset.

    which is an external data for more useage of i/o port. As of other pins have been used up.

    so i'm now using ECS1 connection of external data which starts at address 0x4000, to connect to 74HC574 ic chip and the chip is connected to the D port (D0 to D7).

    the problem now is that i do not know how to declare the D port. which is sbit something.

    any please enlighten me. thanks alot.

Children
  • "the 40pins of 8051 kitset."

    Still no idea what that means.
    Who makes this thing?
    Does it have a proper product name?
    Can you post a link?

    "the D port"

    What D port?
    What does this mean in terms of the 8051's ports?

    "i do not know how to declare the D port. which is sbit something."

    So read the Manual and find out!

    Have you read the uVision Getting Started Guide, and worked through the example Projects?
    This will show you how the Keil tools work.

    Have you read the following essential documents?
    http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_ARCH_1.pdf
    http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_PROG_GUIDE_1.pdf
    http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_HARDWARE_1.pdf
    These will show you how the 8051 architecture works.

    You must also read the Datasheet for the specific 8051 variant you're using.

  • Presumably, it's some part that comes in a 40-pin package. "ECS1" sounds like some sort of programmable chip select to me.

    If someone referred to D0-D7, normally I'd think they were talking about the data bus. Those pins are also port 0, if you're not actually accessing external databut using the I/O port. But it sounds more like this device is memory-mapped into the external address space at address 0x4000. In that case, you should configure the chip to allow external data access, and just read or write to that address.

    The ports should already be defined in the header file Keil supplies for your particular 8051 variant. (Which chip are you using, by the way?) Port 0 is usually called "P0" and is SFR 0x80.

    I suppose it's also possible someone decided to call the ports A, B, C, and D, instead of P0, P1, P2, and P3. In that case, P3 would be 0xB0.

    As Andy said, the data sheet for your particular 8051 variant should tell you for sure.