3 Replies - 2752 Views - Last Post: 03 July 2010 - 10:17 AM Rate Topic: -----

#1 ehaitham  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 03-July 10

serial port problem

Posted 03 July 2010 - 07:52 AM

I use the serial port at c# to read from micro controller.
the micro has analog to digital program .
i micro has two input pins to receive analog signal from function generator and has outpot serial to my pc .
my programe able to drow serial port signal correctely only for 30seconed and then it do not work correctely.
i aske tou to help me to built srial port class to solve thise problem
Is This A Good Question/Topic? 0
  • +

Replies To: serial port problem

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6107
  • View blog
  • Posts: 23,659
  • Joined: 23-August 08

Re: serial port problem

Posted 03 July 2010 - 07:56 AM

We have a tutorial on Serial Port Communication in C#, written by the brilliant PsychoCoder. I'd suggest you check it out.
Was This Post Helpful? 0
  • +
  • -

#3 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1642
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: serial port problem

Posted 03 July 2010 - 07:59 AM

Well you're going to have to show us the code you've written so we can help you debug it and find a solution :)
Was This Post Helpful? 0
  • +
  • -

#4 tlhIn`toq  Icon User is online

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5675
  • View blog
  • Posts: 12,191
  • Joined: 02-June 10

Re: serial port problem

Posted 03 July 2010 - 10:17 AM

Quote

micro has two input pins to receive analog signal

When you say "an analog signal" are you saying "a voltage level" ?
You are directly reading the voltage level on a pin?
The C# SerialPort pinchanged event is of course dependent on your PC's serial port. Most are 0-3 volts is negative, 5-24 is positive, 3-5 is undetermined.

So what is the output of your micro really sending? Maybe it is falling into the 'undetermined' range of your PC's serial port hardware, and thus the pinchanged event is not being fired as yo would expect.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1