Hi All, I am new to the µVision2 environment, so I don't know all the ropes yet. My question is this: I have a long text file which represents a data stream. Can I somehow feed this file to a program being debugged in the IDE and save its output? I cannot debug the program on the actual device because it doesn't exist yet. Thank you
I'll assume you are talking about serial data for the serial port. If that's the case, you could hook the debugger simulated serial port to a PC COM port (http://www.keil.com/support/docs/1981.htm) and then hook HyperTerm to another COM port, wire the 2 COM ports together and send the data from HyperTerm to the uVision Simulator. Another way to do this is shown at http://www.keil.com/support/docs/2262.htm. If this is the way you want to go, also take a look at http://www.keil.com/support/docs/2218.htm. Jon
Is it possible to simulate CAN in some similar way? My device is based on a T89C51CC01(02) and will be communicating with the outer world by means of CAN.
To simulate CAN input, I think there's no other chance but to use a SIGNAL function and/or invidual debugger functions that inject single messages on request. CAN message frames are sufficiently more complicated than simple serial line input to make it all but impossible to read them from a file.
The part of the program I am currently working on treats CAN messages as a sequence of data blocks. This sequence can be represented as a HEX or binary file. The problem is how to get this file into the program running in the IDE. I think I'll have to set up a COM device to emulate a CAN message stream. Cheers
Use one of the user memory types (S: T: U: V:). See http://www.keil.com/support/docs/2397.htm You can read/write the CAN messages with signal functions. This space can be loaded/saved with the LOAD/SAVE command of the debugger.
On some devices like the Atmel 89C51RD2 and Analog Devices ADuC812, the user-defined memory space V: simulates the on-chip EEPROM memory. In my knowledge, 89C51CC01 belong to 89C51RD2 family. So we can simulate EEPROM memory on this chip using V: memory space. Is this afirmation corect?!!