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

does the INTSIO.ZIP work with C166?

Hello,

I would like to use the interrupt driven serial I/O. see http://www.keil.com/download/docs/intsio2.zip.asp


but if I use this code I receive following msg:

Code:

 EA=1;                 /* Enable Interrupts */

compiler:

error C67: 'EA': undefined identifier


thank you

matthias

Parents
  • does the INTSIO.ZIP work with C166?

    No, it does not.

    EA=1; /* Enable Interrupts */

    There is not a register named EA. It's called IE.

    For an example of interrupt-driven serial I/O see the Traffic example program in your Keil\C166\EXAMPLES folder.

    - mike

Reply
  • does the INTSIO.ZIP work with C166?

    No, it does not.

    EA=1; /* Enable Interrupts */

    There is not a register named EA. It's called IE.

    For an example of interrupt-driven serial I/O see the Traffic example program in your Keil\C166\EXAMPLES folder.

    - mike

Children
  • Hi Matthias,

    concerning the EA:

    EA is a VTREG ( a virtual CPU register for simulator purposes).
    It stands for External Access.
    If you write

    EA=1;
    in e.g. simulator.ini file this will instruct the simulator to simulate the behaviour of internal access a memory.
    EA=0;
    means the memory is accessed outside the controller via a bus.
    This, if you need it, you can tell the simulator. But it must be in your *.ini file and, as Mike says (because it is not a instruction of CPU), not inside the C-code.

    Stefan

  • "EA is a VTREG ( a virtual CPU register for simulator purposes).
    It stands for External Access."


    That may well be true for the C16x tools, but the OP was actually talking about the 8051 serial IO example code:
    http://www.keil.com/download/docs/intsio2.zip.asp

    In this context, EA is the "Enable All" global interrupt enable flag.

    As previously mentioned, expecting 8051-specific low-level code like this to even compile for a non-8051 target is folly!

    Unfortunately, there doesn't seem to be a corresponding C16x example in the C16x downloads area. :-(
    http://www.keil.com/download/list/c166.htm