Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Communications > Serial Port Communications


Reply
 
Thread Tools Display Modes
  #1  
Old 12-29-2003, 07:43 PM
Hayden123 Hayden123 is offline
Newcomer
 
Join Date: Dec 2003
Posts: 1
Default Serial Port Communications


I am trying to create GUI to work with the interigation of Microprocessor with a LCD readout. The processor does not have a buffer so it can only handle one character at a time. I could use some help writing a statement that would separate the characters Sent with about a 1000 of a sec pause.
Reply With Quote
  #2  
Old 12-29-2003, 09:44 PM
BugMan BugMan is offline
Regular
 
Join Date: Oct 2003
Posts: 55
Default

Quote:
Originally Posted by Hayden123
I am trying to create GUI to work with the interigation of Microprocessor with a LCD readout. The processor does not have a buffer so it can only handle one character at a time. I could use some help writing a statement that would separate the characters Sent with about a 1000 of a sec pause.


There are many other posts that address this issue. After reading, if you have additional questions then it may be beneficial to give the details (model#s) of the processor and/or the emulator kit/board. I have several different processors and emulation boards and it would help to know with which you are referring to.
Reply With Quote
  #3  
Old 12-30-2003, 03:33 PM
BillSoo's Avatar
BillSoo BillSoo is offline
Code Meister

Retired Moderator
* Guru *
 
Join Date: Aug 2000
Location: Vancouver, BC, Canada
Posts: 10,441
Default

So you wish to send characters to your microprocessor one at a time with a 1ms delay between each char.

It's easy enough to put in a delay; just use the QueryPerformanceCounter API (see my tutorial on "A brief history of Time and Date" in Tutors Corner)....

One possible problem lies with the nature of windows communication routines. As I understand it, windows *may* buffer any data you send via the API (the mscomm control is just a wrapper for the API) and then blow it out the port in one go. This is not good for you....

*IF* this is the case, then you will need to send the characters out the port yourself without using windows API. The way to do this is to use the INP and OUT commands from the INPOUT32.DLL module (check the FAQ at the top of the communications forum) to send data directly to the port address.

It may be that mscomm will work for you, if so, great. But if it doesn't, then try the inpout32.dll method.
__________________
"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you set up a serial port MScomm object? vbad Communications 2 12-12-2002 10:42 AM
Any possible way to set/reset PC serial port logic level via VB code? Flash Communications 4 09-06-2002 11:24 AM
Serial port communications dwfvb Communications 1 07-05-2002 10:12 AM
Listen to a open port, found a vb Ip port blocker visualbasic700e General 3 12-04-2000 08:45 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->