Connect Simulated System to Physical System with COMPIM Model in Proteus
Simulation tools have developed for many years. Actually system level simulators are powerful enough to communicate with external components via TCP/IP and many native interfaces (RS232, Bluetooth, and USB). For example, the ARMulator, QEMU, Symbian and Windows CE emulators can fully leverage the local resources for simulated target machine. The application software engineers can do their jobs with such simulators. However, this handy tool is not widely available in low-level microcontroller based systems. In another word, there are no complete simulated environment which covers the microcontroller and its application environment. We can list many reasons for it. This means that if you want to simulate part of a bigger system of interconnected units, one had to either create simulations of the other units, or create files containing test data. However, some software vendors have offered some solutions.

After investigating the microcontroller simulators, Tina Pro, Proteus and EWB, I found an interesting feature from Proteus, so-called COMPIM serial port model. The Virtual System Modeling capabilities of Proteus VSM allow the creation of models that can actually interact with the physical world. Such models are called Physical Interface Models or PIMs for short.
The COMPIM model is a Physical Interface Model of a serial port. Incoming serial data is buffered and presented to the circuit as a digital signal, whilst serial digital data generated by a CPU or UART model appears at the PC's physical COM port. The physical COM part also includes virtual COM port over USB and Bluetooth with some work-around. The COMPIM model also provides for baud rate translation, and for optional hardware or software handshaking on both the physical and virtual sides of the device.
This allows any real world hardware equipped with a serial port to interact with a Proteus VSM simulation. For example, you could use it to develop a program for a microprocessor within Proteus VSM that would operate a real physical modem, perhaps as part of a security or home automation system. By default, the COMPIM supports 4 physical ports. However, you can connect one of the ports to other virtual port by virtual port driver. If you have problem in communication between COMPIM and virtual port, you can try out the Virtual Serial Port Driver XP from http://www.eltima.com/. It is commercial software. Please comment if there is any alternative free software.
The feature is very helpful tools to develop a communication project with serial port. I expect more PIMs from Proteus and other simulation software.
- allankliu's blog
- 1254 reads





COMPIM
From what I know, this feature has been available in Proteus from some of the earliest versions. It is quite usefull in some circumstances, but just geting the microcontroller simulators (which are embedded in Proteus) to run is a headache. Viewing one of the examples is one thing, making an example yourself is another thing. Just too painfull for me so I dropped it.
Cristian
Post new comment