programming tools for Windows applications development
  Home  |   SwiftForth Archive  |   SwiftX Archive  |

Re: Serial Terminal IO with commdriver.f

From: Mike Ghan <MikeGhan_at_logix-controls.com>
Date: Wed, 21 Dec 2005 10:42:22 -0800

 Pedro,

I too do not have Commextend.f. My example does not require it.

Mike

----------------------------

REQUIRES CommResource
REQUIRES CommDriver

SERIAL-PORT BUILDS COM-PORT \ Our Com Port Object

: COMSET: ( StopBits Parity ByteSize DCBflags2ndByte DCBflags1stByte --
)
   CREATE C, C, C, C, C,
   DOES> ( -- ) COM-PORT COMMSTATE DCB-SETTINGS 5 CMOVE ;

0 0 8 $10 $11 COMSET: N,8,1 0 0 7 $10 $11 COMSET: N,7,1
0 1 8 $10 $13 COMSET: O,8,1 0 1 7 $10 $13 COMSET: O,7,1
0 2 8 $10 $13 COMSET: E,8,1 0 2 7 $10 $13 COMSET: E,7,1

: OPEN-COM-PORT1 ( -- )
   Z" \\.\COM1" COM-PORT OPEN ( ior ) 0<> THROW
   COM-PORT GET-COMMSTATE
   N,8,1
   9600 COM-PORT COMMSTATE BaudRate !
   COM-PORT COMMSTATE SET-DCB
   COM-PORT SET-COMMSTATE
   COM-PORT ACTIVATE ;

> -----Original Message-----
> From: sftalk-bounce_at_forth.com
> [mailto:sftalk-bounce_at_forth.com] On Behalf Of Pedro Monteiro
> Sent: Wednesday, December 21, 2005 8:58 AM
> To: sftalk_at_forth.com
> Subject: [sftalk] Serial Terminal IO with commdriver.f
>
> Content-Type: text/plain;
> charset="us-ascii"
> Content-Transfer-Encoding: 7bit
> Does anyone have a version of Terminal.f that uses
> Commdriver.f instead of SIO.f?
>
> I am trying to open COM ports, check for errors, read/write
> to that port, then close the port, all using commdriver.f
> instead of SIO.f. Sample code would be very helpful.
>
> Earlier this month there was an SFTalk post that used
> Commextend.f . Does anyone have that file? I could not
> replicate the example, presumably because I do not have that file.
>
>
>
> I'm using SF 2.2.2.9.
>
>
>
> Thanks,
>
> Pedro
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Wed Dec 21 2005 - 10:43:12 PST

This archive was generated by hypermail 2.2.0 : Thu Dec 04 2008 - 03:04:20 PST