Searching \ for '[OT] Re: Visual Basic and Port Control' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/ios.htm?key=port
Search entire site for: 'Re: Visual Basic and Port Control'.

Exact match. Not showing close matches.
PICList Thread
'[OT] Re: Visual Basic and Port Control'
2002\07\26@132527 by mark

flavicon
face
I wrote a Visual Basic program to sample an IO port every 10 mS.
The program seems to miss samples when other programs are running
in Windows.

Is there a way of reading an IO port in VB without missing samples ?

Thanks.

On 26 Jul 2002 at 10:30, Tim McDonough wrote:

> I just finished a project where I needed to provide a Windows based
> utility that would in-circuit program the EEProm in a non-PIC device. I
> wrote the PC application using VB6 and an IO Active X control from JS
> Payne (http://www.jspayne.com). The IO control gives you all sorts of
> individual control of the serial and parallel port lines and is quite
> well documented.
>

--------------------
Marcelo Puhl
spam_OUTmarkTakeThisOuTspamcpovo.net
http://py3ss.cjb.net
--------------------

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\07\26@135824 by Tim McDonough

flavicon
face
On Fri, 26 Jul 2002 14:25:44 -0300, Marcelo Puhl wrote:
>I wrote a Visual Basic program to sample an IO port every 10 mS.
>The program seems to miss samples when other programs are running in
>Windows.
>
>Is there a way of reading an IO port in VB without missing samples ?

The IO Control I used will sample the state of the serial ports or the
parallel port each time the appropriate function is called. It also
includes it's own Timer-like object that works down to 1mS.

Windows is far from a real-time operating system. You have little
control over how long other programs hog the CPU when they are running.

In my experience an I/O card or external device with its own micro is
the best way to collect/control time critical things. Then you can hand
the data or results off to Windows when it decides it's ready to talk
with your device.

Tim

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\07\26@140445 by Shawn Yates

flavicon
face
If you just use the built in COM control, you dont have to sample at any
rate, you will just get an MS_COMM event when anything is received from the
port.  Then, you can use the CTR/DTR lines as a control if you realy need
one.  I have a device at the other side of a VB program and just shoot
serial data back and forth (use the interupt in the PIC to know when the PC
sent something).  I use 19.2 and have no problems with synch or missed chars
(not that i know of anyway ;)   )

Shawn

{Original Message removed}

2002\07\26@145258 by Tim McDonough

flavicon
face
On Fri, 26 Jul 2002 14:02:52 -0400, Shawn Yates wrote:
>If you just use the built in COM control, you dont have to sample at
>any rate, you will just get an MS_COMM event when anything is
>received from the port.  Then, you can use the CTR/DTR lines as a
>control if you realy need one.  I have a device at the other side of
>a VB program and just shoot serial data back and forth (use the
>interupt in the PIC to know when the PC sent something).  I use 19.2
>and have no problems with synch or missed chars (not that i know of
>anyway ;)   )

I hope I haven't confused anyone here. In my application I am not using
the serial port for any of its "normal" features. In conjunction with
the IO control I mentioned it's an easy way to have a few individually
controllable I/O lines on the host PC. The PC isn't hooked to a
conventional RS232 port.

Tim

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\07\26@194323 by ISO-8859-1?Q?Ruben_J=F6nsson?=
flavicon
face
I don't know about VB but for VC++ you have to use multimedia timers to get high resolution timer events (down to 1ms).

Ruben

{Quote hidden}

==============================
Ruben Jönsson
AB Liros Elektronik
Box 9124, 200 39 Malmö, Sweden
TEL INT +46 40142078
FAX INT +46 40947388
rubenspamKILLspampp.sbbs.se
==============================

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\07\26@213626 by mark

flavicon
face
High resolution timer isn't the issue. Missed events are.

On 27 Jul 2002 at 1:42, Ruben Jönsson wrote:

{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...