473,395 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Serial communicaation

32
Hi.....help...somebody can help??i am a newbie in VB and currently i have working on a project which is using two pcs and connect with the RS232...
I have no idea how to start the program and I hope that i can seek from some advice from all Genius....I ll b very appreciate if somebody can help me...thanks in advance...
May 12 '07 #1
3 1070
Killer42
8,435 Expert 8TB
Hi.....help...somebody can help??i am a newbie in VB and currently i have working on a project which is using two pcs and connect with the RS232...
I have no idea how to start the program and I hope that i can seek from some advice from all Genius....I ll b very appreciate if somebody can help me...thanks in advance...
Sorry, no geniuses here that I'm aware of - just people who have a bit more experience. :)

I'd suggest you look into the MSComm control.
May 12 '07 #2
dyc
32
Sorry, no geniuses here that I'm aware of - just people who have a bit more experience. :)

I'd suggest you look into the MSComm control.

So r..thanks

There is one more question,that's i need to display some data from a sensor...so i need to retrive the data from a data packet and the it have divided into three section which are start byte,follow by the byte expecting and lastly follow by the information that i wanted..
the start byte is for differentiate the different level of data...the byte is needed for the first data is 1 byte,follow by 1 byte and lastly is 3 bytes..
how should I do the conversion to make it to become binary ? the start byte address is 0xAA in Hex...

thanks for the helping !! :-)
May 24 '07 #3
Killer42
8,435 Expert 8TB
I'm afraid I didn't really understand the question.

However, this simple routine will convert a byte to a binary string, which may be part of what you need.

Expand|Select|Wrap|Line Numbers
  1. Public Function Bin(ByVal ByteValue As Byte) As String
  2.   Dim I As Long, BitValue As Long, BitWeight As Long
  3.   For I = 0 To 7
  4.     BitWeight = 2 ^ (7 - I)
  5.     BitValue = ByteValue \ BitWeight
  6.     Bin = Bin & Format(BitValue)
  7.     ByteValue = ByteValue - BitValue * BitWeight
  8.   Next
  9. End Function
Note, if you'd like to copy and paste the code, we're having a little trouble with this stuff just now. You may find that the line numbers get copied too. If so, just hit the Reply button, then copy the code from within the reply window.
May 24 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: ^CeFoS^ | last post by:
Hello to everybody, I've done an application that draws in a frame the trajectory of a robot. The robot position is readed through the serial port, and several commands are wrote through the...
3
by: Niy | last post by:
what does that mean? what for? I searched a lot but failed to find explanation. Sometimes I really have difficulty finding documentation for some views.
15
by: tom | last post by:
Hi, How do I get the serial number of the harddisk in .NET? I want this to be the same number even if the user has reformatted, so I do not want the volume serial number. Thanx, t
3
by: Stewart Allen | last post by:
Hi there I'm trying to find part serial numbers between 2 numbers. The user selects a part number from a combo box and then enters a range of serial numbers into 2 text boxes and the resulting...
13
by: Al the programmer | last post by:
I need to access the serial ports on my webserver from an asp.net page. I have no problem accessing the serial ports from a windows form application, but the code doesn't work in asp.net. I have...
13
by: Rob | last post by:
Hi all, I am fairly new to python, but not programming and embedded. I am having an issue which I believe is related to the hardware, triggered by the software read I am doing in pySerial. I...
2
by: joaquimfpinto | last post by:
Dear All, I made an app in c# that uses several serial ports. For the serial ports I use a pnp Sunix board, some with 8 serial ports other with 4 or even 2 serial ports. Whenever I use the...
4
by: rowan | last post by:
I'm writing a driver in Python for an old fashioned piece of serial equipment. Currently I'm using the USPP serial module. From what I can see all the serial modules seem to set the timeout when...
3
by: naveen.sabapathy | last post by:
Hi, I am trying to use virtual serial ports to develop/test my serial communication program. Running in to trouble... I am using com0com to create the virtual ports. The virtual ports seem to...
6
by: terry | last post by:
Hi, I am trying to send a character to '/dev/ttyS0' and expect the same character and upon receipt I want to send another character. I tired with Pyserial but in vain. Test Set up: 1. Send...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.