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

Problem setting the port value

I have the following code lines that worked well with SDCC compiler:

data at 0x90 unsigned char motor1 = 0; // PORT 1 (90h)
data at 0xB0 unsigned char motor2; // PORT 3 (B0h)

But, when it does't compile with Keil. I'm trying to control a step motor by setting the values of these ports. How can I declare these variables in a way Keil compiles OK?

Thank you.

Parents
  • "the following code lines that worked well with SDCC compiler ... it does't compile with Keil"

    Of course it doesn't - that's because it's SDCC-specifc syntax; not Keil syntax.

    If you want to compile with Keil, you must use Keil syntax!

    "How can I declare these variables in a way Keil compiles OK?"

    Read the Manual!
    Do the tutorials.

Reply
  • "the following code lines that worked well with SDCC compiler ... it does't compile with Keil"

    Of course it doesn't - that's because it's SDCC-specifc syntax; not Keil syntax.

    If you want to compile with Keil, you must use Keil syntax!

    "How can I declare these variables in a way Keil compiles OK?"

    Read the Manual!
    Do the tutorials.

Children
No data