flat assembler
Message board for the users of flat assembler.

Index > Windows > RS232 Communication

Author
Thread Post new topic Reply to topic
Fungos Bauux



Joined: 19 Jan 2005
Posts: 31
Location: CWB
Fungos Bauux 15 Feb 2006, 18:36
Hi, Im in need of some procs that can read/write to a RS232 port, with any bps from 300 to 19200.
Better if using direct port access (in/out), but its ok if using windows specific functions.
What I need to do, is to read a stream of 8 bytes and every time I got a call, I need read more 8 bytes.

Anybody has any snipet made that can share with me? Or give me directions on where to research.

Last time I worked with RS232 was about 8yrs, using TASM with DOS interrupts!

Thank you
Post 15 Feb 2006, 18:36
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
msmith



Joined: 22 Jun 2003
Posts: 40
Location: Missouri
msmith 18 Feb 2006, 03:39
Since Microsoft discontinued the WM_COMMNOTIFY, it is much more difficult to handle serial communications.

There are 2 ways to do serial communications. The first is overlapped I/O which does not suit me at all and the second is to do polling in a thread. This is what i am doing.

Apparently there is a third option to write your own driver and create your own events.
Post 18 Feb 2006, 03:39
View user's profile Send private message Reply with quote
0x4e71



Joined: 25 Feb 2004
Posts: 50
0x4e71 18 Feb 2006, 08:42
If you want to mess around with overlapped I/O, this article provide a decent guide:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp

Kind of tedious programming, but it works. I used the techniques described there myself when developing a small utility to get the phonebook out of my mobile phone.

Cheers,
+L
Post 18 Feb 2006, 08:42
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.