1. RE: Driving COM ports

Andy Drummond wrote:
> Hello there you Euphoric people.
> I have just written a moderately big database program in Euphoria with 
> Win32Lib using the IDE. So far so good. But there seems to be no support 
> 
> for driving the serial ports of the PC. I have some code I have got off 
> the EU site but that is just giving me access to the 16550 UARTs so I 
> can push and pull bytes to it. I have to use a timer interrupt to test 
> for received bytes. Not nice.
> Does anyone have a clean-ish package to drive the COM ports with 
> interrupt I/O, so it can be driven as if a system character device? Or 
> does anyone know where I can get one .... etc etc.
> Thanks
> Andy
> 
> 
Andy:

  Here's how to do Serial Communications in windows.

http://msdn.microsoft.com/library/devprods/vs6/visualc/vcsample/vcsmpserialsampleforcommunicationsdemonstration.htm


Bernie

new topic     » topic index » view message » categorize

2. RE: Driving COM ports

Gee, Bernie!
That looks great. I've just downloaded and we'll see what we can do with 
it...
Thanks!
Andy

Bernie Ryan wrote:
> 
> Andy Drummond wrote:
> > Hello there you Euphoric people.
> > I have just written a moderately big database program in Euphoria with 
> > Win32Lib using the IDE. So far so good. But there seems to be no support 
> > 
> > 
> > for driving the serial ports of the PC. I have some code I have got off 
> > the EU site but that is just giving me access to the 16550 UARTs so I 
> > can push and pull bytes to it. I have to use a timer interrupt to test 
> > for received bytes. Not nice.
> > Does anyone have a clean-ish package to drive the COM ports with 
> > interrupt I/O, so it can be driven as if a system character device? Or 
> > does anyone know where I can get one .... etc etc.
> > Thanks
> > Andy
> > 
> > 
> Andy:
> 
>   Here's how to do Serial Communications in windows.
> 
>
> http://msdn.microsoft.com/library/devprods/vs6/visualc/vcsample/vcsmpserialsampleforcommunicationsdemonstration.htm
> 
> 
> 
> Bernie
> 
>

new topic     » goto parent     » topic index » view message » categorize

3. RE: Driving COM ports

OK, let's cut the laughs.  I program in Euphoria because it's easy and I 
can forget all the nausea of Windows C++ coding.  This lot you recommend 
does show how to make a simple teletype to demonstrate driving COM 
ports. But the basic program is 2000 lines long, and you have the .rc 
and .h and so on too. It would take me ages to convert that to Euphoria, 
and I would hardly be Euphoric doing it.  No, what I need is a EU 
package to do it, nice and easy. Give it a port, baud, etc, and a 
callback id for handlers to TXBE and RBF interrupts, is all I need. When 
I want to get back into C++ Windows coding I'll shoot myself first. 
Thanks anyway.

Anybody else out there listening?

Andy


Bernie Ryan wrote:
> 
> Andy Drummond wrote:
> > Hello there you Euphoric people.
> > I have just written a moderately big database program in Euphoria with 
> > Win32Lib using the IDE. So far so good. But there seems to be no support 
> > 
> > 
> > for driving the serial ports of the PC. I have some code I have got off 
> > the EU site but that is just giving me access to the 16550 UARTs so I 
> > can push and pull bytes to it. I have to use a timer interrupt to test 
> > for received bytes. Not nice.
> > Does anyone have a clean-ish package to drive the COM ports with 
> > interrupt I/O, so it can be driven as if a system character device? Or 
> > does anyone know where I can get one .... etc etc.
> > Thanks
> > Andy
> > 
> > 
> Andy:
> 
>   Here's how to do Serial Communications in windows.
> 
>
> http://msdn.microsoft.com/library/devprods/vs6/visualc/vcsample/vcsmpserialsampleforcommunicationsdemonstration.htm
> 
> 
> 
> Bernie
> 
>

new topic     » goto parent     » topic index » view message » categorize

4. RE: Driving COM ports

> -----Original Message-----

> OK, let's cut the laughs.  I program in Euphoria because it's 
> easy and I 
> can forget all the nausea of Windows C++ coding.  This lot 
> you recommend 
> does show how to make a simple teletype to demonstrate driving COM 
> ports. But the basic program is 2000 lines long, and you have the .rc 
> and .h and so on too. It would take me ages to convert that 
> to Euphoria, 
> and I would hardly be Euphoric doing it.  No, what I need is a EU 
> package to do it, nice and easy. Give it a port, baud, etc, and a 
> callback id for handlers to TXBE and RBF interrupts, is all I 
> need. When 
> I want to get back into C++ Windows coding I'll shoot myself first. 
> Thanks anyway.

I don't think anyone's done a lot of work on wrapping this for windows.  The
first thing I'd try (and I'm real shaky here) is simply using Eu's open() to
do stuff on the ports.  There was a discussion a bit ago about that (maybe
you were part of it).

Failing that, I'd recommend downloading the win32.hlp file off the archives,
and check out the Communications section in the contents.  You should be
able to do everything there.  It won't be as messy as the VC++ sample Bernie
directed you to, but you will have to do some interfacing with C (namely,
kernel32.dll).

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

5. RE: Driving COM ports

Andy Drummond wrote:
> I want to get back into C++ Windows coding I'll shoot myself first. 
> Thanks anyway.
> 
> Anybody else out there listening?
> 

 Andy:

  That was not meant as a joke, I only meant it as a example that
  you could get some ideas from. You said that you want to use
  interrupts which means that you want to be sure that you don't
  miss any data that you receive ( no easy task ). Windows does not
  want you messing with the ports directly  ( another problem )
  because of security, etc. In other words, port I/O in Euphoria
  may be difficult to do. Thats why I think that nobody has tackled
  the task in euphoria windows. 

Bernie

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu