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

How to control Uart transmission by AGSI

Hi..

I write a DLL to simulate communication between an Serial instrument and 8051.

my work is:
1.DefineSFR SCON
2.DefineVTR SIN, SOUT
3.Add WatchSFR(SCON..., ReadWrite)
4.Add WatchVTR(SIN, Read)

in Watch SCON function:
if the condition "TI.CurrentValue=True and TI.PreviousValue=False"
i think the 8051 send a char to my DLL, then read the VTR SOUT as the char.
Does this idea right?

and also in watch SCON function:
if the condition "RI.CurrentValue=False and RI.PreviousValue=True"
I consider 8051 received a char from Uart(sended by my DLL).Does this idea right? then after this function call, I can write VTR SIN value in my dll as send a new char to 8051?

in Watch SIN Read function
I read VTR SIN Value . Is this Value 8051 has received from Uart?

at my DLL, Send a char to 8051, by write char value to VTR SIN. does this write?
my program sometimes will lost data. I ask for the reason may be?
And can anyone give me a sample of AGSI serial instrument?

Sorry for my poor English.