Hi,
I am using serial port in my project. I want to use simulator on Windows PC with uVision IDE simulator running my application. The input to application should be from UART. I know that I can 1. Create simulation scripts. 2. Use the following:
MODE COM2 9600, 0, 8, 1 ASSIGN COM2 <S0IN >S0OUT S0TIME = 1
to get the data from COM2.
COM2 is a virtual com port paired with other virtual com port (COM5). Application (actually python), is supplying data to COM5.
This "almost" works. The data goes through. Unfortunatelly it is not reliable. Some bytes are lost.
I have checked thoroughly that data is ok on COM5.
I am simulating LPC2378. The UART is handled in polling mode. LPC application does not do anything else at this stage.
I know that interrupt based application would be better, next thing on my todo list, but this should also work.
Doing some excersizes in simulator I discovered that it does work well only if there are programmed delays between character. I wonder if this is not a solution. Intercept the data from COM in simulation and supply it char by char with programmed delays. Is it possible to get the data from serial in script function?
Regards Hubert