TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
omid omidan
NA
3
1.4k
Send/Receive with Serial Port in pc104
Sep 12 2013 4:09 AM
on pc104 i can`t send/receive data from/to pc104 by my generated application in vs2005 whit frw 2.0 compact.
these code are in my application :
this button set value for com port:
private void set_Click(object sender, EventArgs e) { serialPort1=new SerialPort(); serialPort1.PortName = comboBox1.Text; serialPort1.DtrEnable = checkBox4.Checked; serialPort1.RtsEnable = checkBox5.Checked; serialPort1.BaudRate=1200; serialPort1.StopBits= StopBits.One; serialPort1.DataBits=8; serialPort1.Parity= Parity.None; serialPort1.DataReceived += new SerialDataReceivedEventHandler(serialPort1_DataReceived); button1.Enabled = false; }
this code open com port :
serialPort1.Open();
this code receive data from com port :
private void serialPort1_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e) { textBox1.Text=serialPort1.ReadLine(); }
this code send data from comport :
private void button3_Click(object sender, EventArgs e) { serialPort1.Write(textBox2.Text); }
Reply
Answers (
2
)
Creating Pivot Table in Excel using Dynamic Range VB.Net
INSERT INTO doesn't insert data in the database