VS 2008 - Getting Signal From PIC16F877A To VB 2008 Through Rs232 Serial Port

Mar 5, 2010

What i need to write is i get different signal from PIC16F877A and through serial port, i need to display diffrent text from different signal, Such as: Signal from portB.1 display 1, signal from portb.2 display 2. Between the microcontroller and serial port im using MAX232.

View 2 Replies


ADVERTISEMENT

IDE :: Serial Port Communation Using Usb To Rs232. In Collage

Mar 18, 2011

i have some code here that is used for a project, the code is used in visual basic 6 and i am using visual studio 2008 in the project i have to communicate with a PIC micro controller, i do not know what to do because in visual basic 6 w use MS comms and in visual studio 2008 uses a serial port thing code below.[code]

View 3 Replies

Read All Data From Serial Port (Com1 / RS232)

Nov 2, 2009

I am trying to make a program in vb 2005 to real all the data from a device connected on Serial Port (Com 1).i did this: [code]and this is how i want to reciveit.when i lounch the program i only receive first line "410001+00000001" and after that i get on the device rs232 error.

View 6 Replies

Rs232 Serial Programming - Port To C# - .net Code Works Correctly - C# NOT?

Nov 5, 2009

The vb.net code is functioning correctly as it talks to a device through COM1 serial port.What I was hoping was the equivalent c# code is not creating the same string and as a result, the serial 'packet' is not correct. Check this illustration of my problem [URL]...

My goal is to eliminate the addition of the extra characters '/0' and '/b' that what I hoped was the c# equivalent to the correctly functioning vb.net code. It just occurred to me I should change the code to employ Stringbuilder. The 'packetbuilder' method/function builds a string and keeps concatenating things to itself.

[Code]...

View 5 Replies

VB In A Laptop Through USB Port And A USB-RS232 Converter To Communicate With A Microprocessor Using RS232 Protocol

Oct 18, 2010

I have developed a microprocessor based devise. It can communicate with laptop through RS232 as a VB application. Now most of laptops have USB port only. So I want to use USB replacing RS232 port on laptop side but not change anything on the device side. Can I do this using a USB-RS232 converter? How to change the VB software?

View 1 Replies

Serial Port In VB 2008

Apr 9, 2011

I am trying to make my own hyper terminal. I have used the serial port component and after setting all the configuration for the com port I press the button Enable ComPORT. The problem is that, when I press the enable com port button the program goes unstable untill the reception starts from the COM port. After the reception is start the program starts working fine.

[Code]...

View 6 Replies

Access Serial Port In 2008?

May 25, 2008

[Code]...

m really not sure in here because this code is for vb .net 2003.. are they the same?

View 2 Replies

Reading Serial Port Using .net 2008?

Oct 2, 2011

I have microcontroller interfaced with serial port of my computer. In my microcontroller I have 2000 sample data and my primary target is to read those data. Now I can read those data in hyper terminal, but when it comes to my application it doesnt show anything.

Private Sub sp1_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles sp1.DataReceived
sp1.Open()
MsgBox(sp1.ReadExisting())
End Sub

this simple code block should show me the data.But it doesnt.data format coming Microcontroller is in this following formate :

nitialization successful !,1023
Starting sampling process... 1023,1023 1023,1023
0,2 1023,1023 1023,1023 1023,1023 212,686 1023,1023 1023,1023
1,5 1023,1023 1023,1023 1023,1023,659 213,689 1023,1023 1023,1023

now, I dont understand why it doesn't read anything :NB: SP1 has a baudrate of 19200,Databits 8 and no parity,COM1 port. I aisnt sure whether I will be needing a buffer or not

View 1 Replies

VS 2008 Read Serial Port?

Jul 20, 2011

This code was published a few years ago by stanav. I have it reading my Com1 db9 port but having some issues.i have tried adjusting some timeouts, but then, it may just sit there.Jarbled Text - I should be getting results like "SOHEM709US17946US1114US62RST12345678920110714170301" etc., instead I am getting "3B?B?B?????99?F?F?3B?B?B?CAD?1???2?8?3?0??0?1?6"I/O Error - The I/O Operation has been aborted because of either a thread exit or an application request.

[Code]...

View 17 Replies

VS 2008 Serial Port Control?

Nov 18, 2009

All these days i used to program in Vb6.0. Now since from last 15 days I have been using Vb2008. In Vb6.0 I used MSCOMM for serial communications. Here in Vb2008 I found Serial port control equivalent to it. I somehow managed to learn how to send data using serial port control and set parameters like baudrate , stopbits , etc. But I' not getting how to get the received data. In VB 6.0 we used to use comEvReceive in OnComm event and used MSCOM1.Input to get the received data. But I'm not getting how to do the same in vb2008.

View 2 Replies

VS 2008 Serial Port Read?

Mar 11, 2010

I have written a sketch to an arduino board to send data to the serial port. How can I tell VB to only read from the serial port when data is sent to it? I have been using the timer.tick and tried to sink it with the delay I set in the arduino

View 2 Replies

VS 2008 : Serial Port And Index Out Of Range?

Aug 13, 2011

the program works fine but there is the possibility of a problem because this error message did pop up.I'm gathering my data bytes in an array --

dim rcvdata(19) as byte
serialport.read (rcvdata,0,20)
serialport.close

(Then decipher the array).But Should I go further with this? Could the error be related to my serialport.read?What if there were NOT 20 bytes read into the array?I think this may be it? I should poll the array for 20 bytes before proceeding?Yes? -- (It's a given and that's standard procedure).No? -- Don't worry, they're going to be there (the read will try again if it has to?) It won't proceed without the 20 bytes?

View 12 Replies

VS 2008 Connect A Photocell To Serial Port?

Apr 23, 2010

I'm trying design an aplication, who receive inputs from a Photocell omron.

I will connect this photocell at serial port, and it, when detect movement, close the circuit.

How can I verifi in the serial port, if the circuit is closed ou opened?

View 6 Replies

VS 2008 Control Laser Via Serial Port?

Mar 23, 2011

I have created a laser that can be controlled via the serial port. I've written the code to switch it on/off and it works fine. How do i make it strobe? Here's the code to switch it on, to switch it off is similar (don't ask why it is like this...i think it's the transistor from the circuit board that switches the signal):

[Code]...

View 4 Replies

VS 2008 Serial Port - Data Type?

Aug 22, 2009

seems to be quite easy but i'm stuck I'm reading a hex string from serial port (f.e. 20FD05C4), but can't read it proper in VS:/ . I've been trying with serialPort.ReadExisting(), serialPort.Read, etc

Is there any way to just read that String or convert it easyly bin/hex ?

View 8 Replies

VS 2008 Serial Port Can't Get To Send Strings

Dec 8, 2010

I've set up two computers, with a null modem serial cable. When trying the connection in two Realterm windows it works ok to send strings.I'm trying to write a simple project that sends the timestring over the same port.One button sends the timestring. I've created one other sub "AppendLabel" that just updates a label.text so I can see what's happening.[code]

View 8 Replies

VS 2008 Serial Port Program Hogging CPU?

Feb 18, 2011

i have the following code which runs ok, but it hogs upto 95% of the CPU.program outline: a timer tick event = 1000ms scans through 30 readlines of data on the comport for a specific line of hex, and then extracts information from the next line and converts it to decimal for viewing on the screen.i've only included the main part of the code to try and keep it simple.

Public Class Form1
Private WithEvents serial As New IO.Ports.SerialPort
Public grab As String
Public cardIndex As Integer

[code]....

View 9 Replies

VS 2008 Serial Port Read RI Line?

Nov 3, 2011

Till drawer, connected to Com1, 9600,0,N,1 and a windows forms appThe drawer uses the RI line to show if the drawer is open or closed, but I cant find a way to read this line from the SerialPort control.. Been working on this for a while, but no dice!

View 4 Replies

VS 2008 Using Serial Port To Read String?

Jun 9, 2009

I have an application in Electronics to communicate with serial port. With using VB I have succesfully read a character using

Serialport1.ReadByte
or
Serialport1.ReadChar

[code].....

View 5 Replies

[2008] Serial Port Received Bytes Is Zero?

Mar 12, 2009

In my serial port application, I have my code -

Private Sub SerialPort_DataReceived(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort.DataReceived
Dim cnt2 As Byte

[code]....

For some packets I sent, "Error Data Received" came up. I checked BytesReceived, it was 0. My question is: since SerialPort_DataReceived processes data received, data was supposed to be received. Why the number of bytes I read was zero? BTW, when is this event accessed? it is accessed when any number of bytes received or the whole packet received?

View 2 Replies

VS 2008 Reading And Writing Data To A Serial Port

May 25, 2009

reading and writing data to a serial port. the settings for the port are correct (from manual of device):

[Code]...

View 1 Replies

VS 2008 Serial PORT - Operation Is Timed Out (use TIMER)?

Nov 4, 2009

"The operation is timed out " in use with timer and reading serial buffer.I read every 50msec (timer) serial buffer and when are not data in serial buffer, then VB2008 write "The operation is timed out" and program stopped.When are data in serial buffer, then is all OK.PLEASE what can I do, when I want NOT stop program, when are not data in serial buffer.I use this code in timer:

[Code]...

View 14 Replies

[2008] Show A Processing Message For Opening Serial Port After Program Running?

Feb 12, 2009

In Form1 there are a lot of boxes like checkbox, label....I want to show a processing message for opening serial port after program running. So I created Form2 specifically showing "Opening Port...". So in Form1_Load() I used Form2.Show(). However this message showed behind of Form1. I think this was executed before all the other tool boxes loading. So where should I put Form2.Show()?

View 2 Replies

Reading Serial Port Read Data From Serial Port?

Aug 16, 2011

i am a absolute beginner and i want to use vb to receive data from micro controller through serial port using rs232 standards, i found this code to receive the data serially, can any one tell me where should i paste this code, so that the data received will be displayed in message box.Private Sub DataReceived(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) HandlesSerialPort1.DataReceived

[Code]...

View 9 Replies

Serial Port Example Code - Connect To A Modem Thru The Serial Port

Oct 26, 2011

The link below has code to connect to a modem thru the serial port but it is for an earlier version of VB. when I convert the code, it does not fully convert and has 4 errors that prevent building the project. can someone tell me what needs to be changed or added?

[URL]

Note: the error: not CLS-Compliant

View 8 Replies

Serial / USB Signal To Read Out?

Mar 11, 2010

I want to get the data coming from a weighing scale (rs232 signal) to a vb.net prgram, to a text box

View 1 Replies

Take Signal And Telegram From Serial Input?

May 17, 2010

I'm trying to build a form with 2 textbox where I can display latitude and longitude taken from serial input from serial port with a gps ($..GGA or $..GLL telegram)

View 1 Replies

VS 2008 Writing Some VB2008 Code To Control Four 7-seg LED's / Serial Port Control?

Nov 10, 2010

I'm writing some VB2008 code to control four 7-seg LEDs I bought from Velleman. They came with some example code in VB 5.0, and with instructions telling me to input 5 bytes at a time in the format Chr$() & Chr$() & etc. for the rest of the 5 bytes. When I try to do this using VB2008, it rejects the $ sign, so I've tried it using the Chr() format, which VB2008 allows. However, it doesn't work. Is Chr() the new version of Chr$() or are they different entities? In sending data to the LEDs, I'm using LiveComPort.WriteLine() as my command. (My serial port is called LiveComPort) I also tried it with LiveComPort.Write() asthe command. I know that my serial port and the LEDs are working, because they respond to the demo program provided by Velleman.

View 7 Replies

Send Byte,signal,string Or Puls Usb Port?

Feb 14, 2010

How can i send byte/signal/puls usb port?i want to this

View 3 Replies

Hooking The Comm Port (RS232)?

Nov 2, 2011

I currently have software that sends out plain text(i.e. 'X') to comm 1 port and was wondering if there was any way to capture that plain text and also respond to that port on the same compute as the port without having anything plugged into the machine (i.e. 9 pin serial cable). I am trying to avoid buy any more hardware as this is an objective to acutally cut down on hardware.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved