| Details | Message |
|---|
Read-Only Author matthias laquai Posted 15-Sep-2004 12:17 GMT Toolset C166 |  does the INTSIO.ZIP work with C166? matthias laquai 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 |
|
Read-Only Author Mike Kleshov Posted 15-Sep-2004 13:07 GMT Toolset C166 |  RE: does the INTSIO.ZIP work with C166? Mike Kleshov 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 |
|
Read-Only Author Stefan Fricke Posted 16-Sep-2004 06:37 GMT Toolset C166 |  RE: does the INTSIO.ZIP work with C166? Stefan Fricke 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 |
|
Read-Only Author Andy Neil Posted 16-Sep-2004 08:29 GMT Toolset C166 |  RE: does the INTSIO.ZIP work with C166? Andy Neil "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 |
|
Read-Only Author Andy Neil Posted 16-Sep-2004 08:22 GMT Toolset C166 |  RE: does the INTSIO.ZIP work with C166? Andy Neil "I would like to use the interrupt driven serial I/O. see http://www.keil.com/download/docs/intsio2.zip.asp"
That very page that you cited clearly states,
"This example works with any 8051-compatible device" (my empahasis)
If you want to adapt it to a non-8051 device (eg, a C16x or ST10), you will obviously have to change all references to 8051-specific features - such as bit names like EA! |
|
Read-Only Author Andy Neil Posted 16-Sep-2004 08:39 GMT Toolset C166 |  RE: does the INTSIO.ZIP work with C166? Andy Neil There are two main elements to the INTSIO examples:
1. Handling the UART hardware & interrupts;
2. Handling the circular buffers.
Obviously, the handling of the UART hardware & interrupts is specific to the 8051 UART and cannot be used on the C16x. You will need to re-write this part for your particular processor and/or UART - see your Data Sheet.
However, the handling of the circular buffers is perfectly generic 'C' - so you can use this bit on other processors and/or other UARTs.
In fact, I have done exactly that to drive "external" UARTs implemented in the programmable logic of Triscend E5 (RIP) devices. |
|
Read-Only Author Keil Support, Intl. Posted 20-Sep-2004 12:31 GMT Toolset C166 |  RE: does the INTSIO.ZIP work with C166? Keil Support, Intl. There seems to be some confusion here. EA is the 'Enable All interrupts' bit on 8051. It has notthing to do with the EA I/O pin of the C166.
For 166 we provide interrrupt driven serial I/O in the Keil\C166\Examples\Traffic folder. There is another interrupt driver I/O routine in the Getting Started User's Guide (GS166.PDF), Using On-Chip Peripherals, Serial Interface.
It looks like these days users expect examples for all kind of peripherals in all kind of processors. Keep in mind that we are supporting 700+ devices which would required about 5.000 example projects. |
|
Read-Only Author matthias laquai Posted 21-Sep-2004 11:21 GMT Toolset C166 |  RE: does the INTSIO.ZIP work with C166? matthias laquai thank you for your great help!
I have found somthing in the example code!
greetings
matthias |
|