Click to See Complete Forum and Search --> : About Serial Communication ...


LACHEZAR
November 7th, 2003, 02:20 AM
I’d like to build communication program between Personal Computer and Microchip PIC device. I use WIN32 API functions. But I have troubles with Receiving Part on the PC Side. I need some help to understand the action of functions and collaborations between them ! I am feeling like a blind one, when I am writing the code.

What I need and what are my questions ?
I need more information about the whole Receiving Process, about the synchronization between the Parts of the Process, and about the roles of the WIN32 API functions (in the context of the Data Receiving.

Now, some specific questions.

- Organization of stable waiting cycle – it must be endless and I must have control over it
To exit whet I want, or when some period expired, or … - what functions I need and what are the proposal parameters ?
- What is the difference between: communication event and object ?
- Is the communication event an object ?

- About WaitCommEvent:
“If hFile was not opened with FILE_FLAG_OVERLAPPED, WaitCommEvent does not return until one of the specified events or an error occurs” – I need to define some waiting time, … some ideas ?
- Can I use WaitForSingleObject ?
It allow me to define some waiting time ?

- About ReadFile functions: If I don’t know the number of receiving symbols … ?

To finish – I need something like receiving part of Microsoft Hyper Terminal ?
Any kind of information, devoted to these topics will be useful for me .
Thank You !