Write An Application For Receiving Data (ascii Characters) From Microcontroller Through The Serial Port In Three Separate Parts

Jul 18, 2009

I need to write an application for receiving data (ascii characters) from microcontroller through the serial port in three separate parts. I've created three RichTextBoxes, but I do not know which commands I need to type. In first textbox I need to receive one byte... next six bytes need to be placed in second text box, and finally last seven bytes need to be placed in third textbox.

View 11 Replies


ADVERTISEMENT

Serial Port To Read Data From Microcontroller?

Aug 9, 2010

<!-- /* Font Definitions */ @font-face {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0; mso-font-charset:2; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 268435456 0 0 -2147483648 0;} @font-face {font-family:"Cambria
Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-

[code]....

View 9 Replies

Receiving Data From Serial Port?

Nov 30, 2008

i was not getting o/p properly when i tried to receive data from serial port using the following code.

Public Class form1
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If SerialPort1.IsOpen Then

[code]....

View 4 Replies

Sending / Receiving Data To Serial Port

Aug 13, 2009

I'm trying to control a serial port device that both send and receives data. I can receive data quite happily from the serial port but I don't appear to be able to send data to the device. The device works perfectly as I can test it using putty, I open putty select serial and select 1200 baud, the device immediately lights up and can send and receive. However when the port is set up and opened in VB the device doesn't light up so I can't send data to it but can receive data from it. According to the instructions I need to send either ASCII 'X' Hex '$58' or Decimal '88' to make the device ready.

Code (VB Studio 2005) :-
Public Sub New(ByVal synchronisingObject As ISynchronizeInvoke)
ComPortUsed = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINESoftwareNJB", "COMUSED", Nothing)
PricePerTrack = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINESoftwareNJB", "PRICETRACK", Nothing)
Me.synchronisingObject = synchronisingObject
[Code] .....

View 11 Replies

Sending/receiving Serial Port Data?

Feb 22, 2011

Opening and closing the port works fine, and as far as i can tell, the serial.write("blahblah") should be writing to the output buffer, but I am unable to test or verify this by reading it in. the commented "Receive data from serial port" and subsequent DoUpdate() function are where i am having trouble. It doesnt seem to actually be reading in the data if it is in fact writing it correctly.

[Code]...

View 9 Replies

Check When Serial Port Has Stopped Receiving Data?

Dec 20, 2009

What I am doing is creating an app to send and receive CNC programs to machine tools via the RS232 interface. At the moment I am testing the software with 2 laptops linked together through a cable I have made up. which all works. I have added a serial port to my form 1 and using the code below I can send and receive data. However with the send button I can open the comm port send the data and then close the comm port (No Problems there). With the receive button I want to open the comm port receive the data and close the comm port. The problem I have is checking when the app has finished receiving data so I can then close the comm port

Private Sub Btn_Send_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn_Send.Click
Try

[Code]....

View 2 Replies

Forms :: Serial Port, Continuously Receiving Data?

May 11, 2011

I have serial port object which continuously receiving data from weighing device, which sends data in 0001450= format (8 Bytes). I read about datareceived event, and implement that, but i must use Thred.Sleep to get all data and read with serial.ReadExisting. Does the ReadBytesTreshold=8 raised DataReceived event after 8 bytes of data??

Is there any way to cancel, abort, stop DataReceived event?

View 4 Replies

VS 2010 Receiving Data From Serial Port Monitor 4.0

May 30, 2012

i'm using serial port monitor 4.0. i need to know how to received the data and show in a textbox.

here is how my data look like in the serial port monitor:

40 03 04 05 00 00 00 80 05 04 01 00 00 00 11 00 @......�........
80 07 04 05 00 10 00 01 02 02 14 80 07 04 05 00 �..........�....
10 00 01 02 02 14 80 07 04 05 00 10 00 01 02 02 ......�.........

[Code].....

View 9 Replies

Changing Form Controls After Receiving Serial Port Data?

Feb 13, 2009

first post here at the forums. I am a complete noob when it comes to VB .Net, but I have done a lot of VBA programming and some VB6 back in the day. I have posted this question on two other forums (including the MSDN forums) and no one has responded so please let me know if I need to clarify the question.

I am (trying) to write my first .net app which reads/writes data to a device connected over the serial port. I have manged to get it to work to send commands to the device and receive the reply back, mainly using the info from this article: Beth Massi - Sharing the goodness that is VB : Reading from a Serial Port and Saving to a Database

However, I am having problems with updating the controls on the main form based on the received data from the serial port. Basically I want the user to click a button (one of six on the form) which will send data to the device, then based on the response from the device, the BackColor of that particular button, will be changed accordingly. I just am missing something b/c the button click is a different sub than the sub that handles the form controls update and I can't get the two to talk

[Code]...

View 5 Replies

Continuously Receiving Data From Serial Port And Display In Textbox

Apr 28, 2012

I ve been reading forums all over the net for 2 weeks and I failed to find solution for my problem. here is my problem;

I am able to receive data from serial port in to richtextbox and its working fine .. what i wanna do is dislay data in textbox by spliting string[code]...

View 5 Replies

Receiving Invalid Data From Serial Port Using SerialPort.ReadExisting

Jan 16, 2010

Recently we have connected one bluetooth device which receive data from our serial device. The bluetooth device further transmite this data to a Windows Mobile which is bluetooth enable. Baud rate of whole system is 19200 with 7 data bit and 1 stop bit.When we send command to serial device through bluetooth device it is accepting the command and respond accordingly. but some of data byte of string is desplay as question mark (?).But in case we connect the serial device directly to PC, the string received is correct.[code]Response given by Serial Port is "?09?D03?A D?

View 1 Replies

Receiving Invalid Data From Serial Port Using SerialPort.ReadExisting()

Jan 16, 2010

Recently we have connected one bluetooth device which receive data from our serial device. The bluetooth device further transmite this data to a Windows Mobile which is bluetooth enable. Baud rate of whole system is 19200 with 7 data bit and 1 stop bit.When we send command to serial device through bluetooth device it is accepting the command and respond accordingly. but some of data byte of string is desplay as question mark (?).[code]...

View 4 Replies

Invalid Characters In Serial Port Data

Jun 10, 2010

I am developing an test application to read the data coming on serial port sent by the pabx. It is working fine. But, for some reason , i don't know why, some invalid characters are coming in the data, something like '?'

[Code]...

View 1 Replies

Any Way To Write Data To Serial Port To Control Toy Car?

Feb 6, 2012

I just need to write data to serial port to control a toy car
Moving left, right, forward, back.

View 2 Replies

Receiving Sms Using Serial Port?

Aug 5, 2009

I don't really quite understand how the receiving works but could anyone please help me on how does the receive sms works when using serial port and AT-commands? Here is how I use my code:

Imports System.Windows.Forms.Form
Imports System.Text.Encoding
Imports System.Threading
Imports System.IO.Ports

[Code]...

View 21 Replies

Receiving The Sms From The Serial Port?

Jun 28, 2010

I am doing a project on receiving the serial port. but the problem is that I am a lost now because I am in the dead end because my project is near the dateline. I am at blank now. Can anyone help me to teach me step by step on how to do the part on receiving sms using the modem?

View 10 Replies

Serial Port Not Receiving?

Sep 19, 2011

If I touch the Power & Send wires together on a serial cable the program needs to count up by one. It is just acting as a counter is all.I have some code, but I cannot get it to count....It doesn't even appear to be getting to the SerialPort1_DataRecieved event....ok at this and see what I'm missing? I'm using VB 2010 Express. The serial port properties are all left at default.

Code
Public Class frmMain
Private Sub frmMain_FormClosing(ByVal sender As Object, ByVal e As

[code].....

View 1 Replies

Write-read Data From Serial Port But It Don't Work?

Mar 11, 2010

i am trying to write-read data from serial port but it don't work my code look like this

[Code]...

View 2 Replies

Serial Port In Receiving File

Sep 10, 2011

I am using VB studio 2010 now. What I want to do is to receive data from another port and save it in my directory. However the port can receive my buffer from another port but could not save the file. [Code]

View 14 Replies

Receiving Command Codes Via Serial Port?

Jul 14, 2010

I am currently writing a console code that I will eventually create with a GUI. The problem I am currently having is that when a message I received to the port is an ASCII command code i.e. <BEL> <CR> then rather than printing these messages
it performs the command and I am unable to respond as per when the command is received. Is there a way to alter the code so I can see these messages or at least determine its been sent so I can respond to it?

View 5 Replies

VS 2008 - Program In Vb To Serial In Data From My Microcontroller

May 18, 2010

I have written a program in vb to serial in data from my microcontroller and it is working good except for one thing. When I try to send the number 26 to vb it just reads a blank I dont know what is going on? The data that I am reading is being converted to int16, and I am using Encoding 28591 and have also tried Encoding 1252. I have also tried a new microcontroller with no success. I dont know if this is a VB problem or a microcontroller program problem.

Dim ReceiveBuffer As String
Dim portname1 As String = "Com5" ' Serial in through this port
Dim portspeed1 As Integer = 19200
Dim WithEvents COMPort As New System.IO.Ports.SerialPort

[CODE]...

View 13 Replies

HSD 32 Bit Data Bus To Serial Converter Via A Microcontroller - Data Sniffer To Read The Data Bus (32Bit)

Sep 3, 2008

Im working on a HSD 32 bit data bus to serial converter via a microcontroller. Now first I want to make a sort of data sniffer to read the data bus (32Bit) .All on the controller side is working and the stream of bytes are coming in via RS232 as 4 bytes in HEX like FD,A5,45,8B . I already converted the bytes in Dec and ASCII to determine what is passed true the bus and how fast and stuff.. Now that is all correct and working very well if the LSB (least significant bit) of the 32 data bus is Data line 0 and the MSB (most significant bit) is Data line 31 but if that is not the case I need to invert the 32Bits (like as I would invert the connector on the bus) . How do I best do this using the 4 bytes I send from the micro controller.

Example:

(MSB) 01001000 01100101 01101100 01110000 (LSB)
HEX= 48 65 6C 70
DEC= 72,101,108,112
ASCII= H E L P

I need to invert it with a button to:

(MSB) 00001110 00110110 10100110 00010010 (LSB)
HEX= 0E 36 A6 12
DEC= 14,54,166,18
ASCII= (SO) 6 : (DC2)

View 3 Replies

Asp.net - Character Support - Translate Higher ASCII Characters To Lower ASCII Characters?

Aug 7, 2009

So I have an ASP.Net (vb.net) application. It has a textbox and the user is pasting text from Microsoft Word into it. So things like the long dash (charcode 150) are coming through as input. Other examples would be the smart quotes or accented characters. In my app I'm encoding them in xml and passing that to the database as an xml parameter to a sql stored procedure. It gets inserted in the database just as the user entered it.

The problem is the app that reads this data doesn't like these characters. So I need to translate them into the lower ascii (7bit I think) character set. How do I do that? How do I determine what encoding they are in so I can do something like the following. And would just requesting the ASCII equivalent translate them intelligently or do I have to write some code for that?

Also maybe it might be easier to solve this problem in the web page to begin with. When you copy the selection of characters from Word it puts several formats in the clipboard. The straight text one is the one I want. Is there a way to have the html textbox get that text when the user pastes into it? Do I have to set the encoding of the web page somehow?

[Code]...

View 4 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

Activate Robotic Parts Using A Pic Microcontroller With Vb?

Sep 21, 2009

i want to activate robotic parts using a pic microcontroller with vb.basically i want to use the thechniques shawn in this video :

[URL]

here are my questions :

1 what activex do i add ?

2 are there any references i need to add ?

3 are there any imports statements i need to add ?

4 are there classes i can add ?

5 what commands do i use for output ?

6 what commands do i use for input ?

7 can you recomend a specific microcontroller ?

8 how do i add hardware to the device ?

9 what commands do i need to add so the software doesn't glitch ?

View 37 Replies

Forms :: Create Separate Parts/winforms Of The Same Application?

Sep 19, 2011

is it a bad idea to create separate parts/winforms of the same application (using the same SQL Server DB) in different executable files. For example for a School IS: A Receptionist App, A Teacher App, A Principal App and so on.

View 2 Replies

Catching And Removing Escape Characters In A Serial Comm Port Program?

May 18, 2010

I have recently developed a serial port communication program to access my hardware firewall and its connected to the device via a converter usb to rs232head plugged to a rs232 to an ethernet cable. this ethernet cable then plugs into the device console port.

my program functions similar to that of TeraTerm. an opensource hyperterminal program written in C++ but i decided to do one for vb.net

Alright to cut the story short, i have successfully coded out the program to accept incomming data from the device but however, i'm also receiving ansi escape sequence along with it and i have no idea how i could implement codes to remove these. i have spend 3 weeks trying to look for vt100 emulation codes written in vb.net but i found none so far. most are written in c++. here's an image to illustrate the problem which im facing.

The image below is a screenshot taken when the i ran both the programs together. The bottom is tera term 3.1 and the top is my vb project which i made using msdn's example and improved on the codes. basically tera term was able to interpret those escape sequence and display accordingly to that of the vt100 terminal display. I have spent time reading on regular expressions using the inbuilt function regex in visual basic and tried parsing some strings but its not working. i guess its far more complex than i thought.

View 6 Replies

Read The Data From Barcode Weight Scales By Serial Port And TcpIp Port?

Nov 27, 2010

I'm mohammed from Oman ,I'm visual studio.net programmer How I can Read the Data From Barcode Weight scales By Serial port and TcpIp port

View 7 Replies

Receiving Wrong Serial Data?

Dec 13, 2009

I have a program that receives serial data from a microcontroller and displays it.If I use windows terminal I get the right data.For some reason my program is not displaying the right data.What is sent is temperature.So the actual data is 24 degreesC and my program is showing 10 degreesC.

Private
Sub SerialPort1_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived

[code]....

View 8 Replies

Write A Signed Byte To A Serial Port

May 3, 2012

I need to be able to write signed bytes to a serial port using SerialPort.Write() method, except that method only takes byte[] arrays of unsigned bytes, how would i write a signed byte to the serial port?For what I'm working on the particular command takes values from -1700 to 1700.

View 1 Replies







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