User Profile

Collapse

Profile Sidebar

Collapse
mayaanu
mayaanu
Last Activity: May 26 '10, 07:00 AM
Joined: May 10 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • the code snippet is as follows
    Code:
    //for opening the port on a button click
    
    if (serialPort3.IsOpen)
         {
             serialPort3.Close();    
         }
         else
         {          
                 serialPort3.Open();
         }
    
    
    private void serialPort3_DataReceived(object sender, SerialDataReceivedEventArgs e)
     {
         Control.CheckForIllegalCrossThreadCalls
    ...
    See more | Go to post
    Last edited by tlhintoq; May 26 '10, 08:52 AM. Reason: [CODE] your code here [/CODE] tags added

    Leave a comment:


  • Serial port buffer is having old data(data from the previous run)

    I have developed a GUI based application in C# for communicating with a 16 bit littleendian microcontroller device .the device has a serial port interface.

    1.my appplication opens a COM port on which the device is connected with proper settings for the device.
    2.It writes a command to the port.
    3.datareceived event of the serial port reads the data in to a byte array.
    3.i have closed the serialport using close() method...
    See more | Go to post

  • converting a 2 bytes hexadecimal value to an integer

    Hai
    I am writing an application that reads the data from the serial port in to a byte array(example bf).I had converted the byte array to string using
    string s=Bitconverter. Tostring(bf)
    Now i want to get an integer value from 0th and 1st bytes in bytearray.
    the values that comes in my bytearray are
    bf[0]=165
    bf[1]=03
    when it is converted to string it will be A503
    i need an integer from bf[0]...
    See more | Go to post
No activity results to display
Show More
Working...