reading voltage levels from serial port
reading voltage levels from serial port
reading voltage levels from serial port
reading voltage levels from serial port
reading voltage levels from serial port
reading voltage levels from serial port reading voltage levels from serial port reading voltage levels from serial port reading voltage levels from serial port reading voltage levels from serial port reading voltage levels from serial port reading voltage levels from serial port reading voltage levels from serial port
reading voltage levels from serial port reading voltage levels from serial port
reading voltage levels from serial port
Go Back  Xtreme Visual Basic Talk > > > reading voltage levels from serial port


Reply
 
Thread Tools Display Modes
  #1  
Old 04-16-2009, 10:06 AM
qtommer qtommer is offline
Freshman
 
Join Date: Feb 2009
Posts: 27
Default reading voltage levels from serial port


i would like to test the voltages coming out of my serial port and am looking for a suitable method..

for now im using a multimeter with its probes connected on one end to the transmit pin of the serial cable and the other end to the ground of the serial cable.

I havent tested this out yet as im dont have a multimeter present at the moment but ill like to know whether the following coding is appropriate to send out 'CONSTANT' signals to the port.

i know that a logic 1 state is represented by a range of negative voltages from -3V TO -12V and logic 0 , 3V-12V

Form_Load
MSComm1.CommPort=1
MSComm1.PortSettings= "9600,N,8,1"
MSComm1.Inputlen=0
MSComm1.PortOpen=True
MSComm1.SThreshold=1


MSComm1_Oncomm
while(1)
MSComm1.Output= Hex(FF) ' TO OUTPUT LOGIC 1 - EXPECTED NEGATIVE V
loop


MSComm1_Oncomm
while(1)
MSCOmm1.Output=Hex(00) ' TO OUTPUT LOGIC 0 - EXPECTED POSITIVE V



is the coding correct to send out a constant stream of HIGH bits and LOW bits respectively?
Reply With Quote
  #2  
Old 04-16-2009, 11:47 AM
webbone's Avatar
webbone webbone is offline
Hydrogen Powered

Administrator
* Expert *
 
Join Date: Jul 2003
Location: Sacramento, CA
Posts: 6,090
Default

You most likely won't be able to use a meter to measure the logic 0 voltage - even if you send continuous Chr$(0) the signal still has to produce a stop bit (1)... you'll likely end up with some variable reading depending on the sampling rate and frequency response characteristics of your meter.

An oscilliscope would really be the only sure method to use for the measurement you desire.
__________________
"With the appearance of the AddressOf operator, an entire industry has developed among authors illustrating how to do previously impossible tasks using Visual Basic. Another industry is rapidly developing among consultants helping users who have gotten into trouble attempting these tasks." -Dan Appleman
Reply With Quote
  #3  
Old 04-18-2009, 08:07 AM
qtommer qtommer is offline
Freshman
 
Join Date: Feb 2009
Posts: 27
Default

thank you for your reply..i tried it on a scope but the signal was highly distorted which i believe is due to the noise...is that normal for such a high amount of dsitortion? would there be another method where i can get the reading?
Reply With Quote
  #4  
Old 04-19-2009, 08:25 PM
mkaras's Avatar
mkarasreading voltage levels from serial port mkaras is offline
Ultimate Contributor

Retired Leader
* Expert *
 
Join Date: Mar 2004
Location: Beaverton, OR
Posts: 1,874
Default

The most likely reasons that the oscilloscope was not showing you something that "looked reasonable" could have been:

- Improper application or setup of the instrument
- Cable GND not properly connected at the PC end
- Wires in the serial cable shorted together
- Having the signal under observation being simultaneously connected to a load circuit that it was never meant to be able to drive.

= mkaras
Reply With Quote
  #5  
Old 04-21-2009, 06:20 AM
qtommer qtommer is offline
Freshman
 
Join Date: Feb 2009
Posts: 27
Default

ill look to it..thanks alot..
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

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
reading voltage levels from serial port
reading voltage levels from serial port
reading voltage levels from serial port reading voltage levels from serial port
reading voltage levels from serial port
reading voltage levels from serial port
reading voltage levels from serial port reading voltage levels from serial port reading voltage levels from serial port reading voltage levels from serial port reading voltage levels from serial port reading voltage levels from serial port reading voltage levels from serial port
reading voltage levels from serial port
reading voltage levels from serial port
 
reading voltage levels from serial port
reading voltage levels from serial port
 
-->