Click here to Skip to main content
16,005,162 members
Home / Discussions / C#
   

C#

 
AnswerRe: my data is not converted into string Pin
inamgul25-Jun-07 20:34
inamgul25-Jun-07 20:34 
AnswerRe: my data is not converted into string Pin
I.explore.code25-Jun-07 21:02
I.explore.code25-Jun-07 21:02 
QuestionCan't open project file after SSL enable Pin
lygine ng lee chuang25-Jun-07 20:06
lygine ng lee chuang25-Jun-07 20:06 
Questionlatch "0" and save next values to array in serialport?? Pin
Mir_As25-Jun-07 20:05
Mir_As25-Jun-07 20:05 
AnswerRe: latch "0" and save next values to array in serialport?? Pin
Vikram A Punathambekar25-Jun-07 20:19
Vikram A Punathambekar25-Jun-07 20:19 
GeneralRe: latch "0" and save next values to array in serialport?? Pin
Mir_As25-Jun-07 20:45
Mir_As25-Jun-07 20:45 
GeneralRe: latch "0" and save next values to array in serialport?? Pin
Vikram A Punathambekar26-Jun-07 1:30
Vikram A Punathambekar26-Jun-07 1:30 
GeneralRe: latch "0" and save next values to array in serialport?? Pin
Mir_As26-Jun-07 2:07
Mir_As26-Jun-07 2:07 
All of my microcontroller codes :

#include "C:\Documents and Settings\yasin\Desktop\yeni\deneme3.h"
#include <16F877.h>
#device adc=8
#use delay(clock=20000000)
#fuses NOWDT,HS, NOPUT, NOPROTECT, BROWNOUT, NOLVP, NOCPD, NOWRT, NODEBUG
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8)

void main()
{
int8 value1,value2,value3,value4,value5,value6;
int8 start;
value1=1;
value2=2;
value3=3;
value4=4;
value5=5;
value6=6;
start=0;
setup_adc_ports(NO_ANALOGS);
setup_adc(ADC_OFF);
setup_psp(PSP_DISABLED);
setup_spi(FALSE);
setup_counters(RTCC_INTERNAL,RTCC_DIV_1);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
for(;;)
{
delay_ms(10);
putc(start);
putc(value1);
putc(value2);
putc(value3);
putc(value4);
putc(value5);
putc(value6);
}

C# codes:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO.Ports;

namespace serial
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
serialPort1.DataReceived += new SerialDataReceivedEventHandler(this.serialPort1_DataReceived);

if (serialPort1.IsOpen)
serialPort1.Close();
serialPort1.ReceivedBytesThreshold = 1;
serialPort1.DataBits = 8;
serialPort1.Parity = System.IO.Ports.Parity.None;
serialPort1.StopBits = System.IO.Ports.StopBits.One;
serialPort1.BaudRate = 9600;
serialPort1.PortName = "COM4";
serialPort1.Open();

}
public delegate void updatetexboxes();
byte[] received ={ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, };
int i=0;
private void serialPort1_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e)
{
serialPort1.Read(received, i, 1);
//i dont know which codes can be written here!!!!
//than i ll update my variables.
this.Invoke(new updatetexboxes(this.updatetext));
}
private void updatetext()
{
textBox1.Text = received[1].ToString();
textBox2.Text = received[2].ToString();
textBox3.Text = received[3].ToString();
textBox4.Text = received[4].ToString();
textBox5.Text = received[5].ToString();
textBox6.Text = received[6].ToString();
}

}
}
GeneralRe: latch "0" and save next values to array in serialport?? Pin
Vikram A Punathambekar26-Jun-07 4:31
Vikram A Punathambekar26-Jun-07 4:31 
GeneralRe: latch "0" and save next values to array in serialport?? Pin
Mir_As26-Jun-07 5:26
Mir_As26-Jun-07 5:26 
QuestionPick up a file Pin
Hum Dum25-Jun-07 19:26
Hum Dum25-Jun-07 19:26 
AnswerRe: Pick up a file Pin
Manas Bhardwaj25-Jun-07 20:05
professionalManas Bhardwaj25-Jun-07 20:05 
AnswerRe: Pick up a file Pin
I.explore.code25-Jun-07 20:30
I.explore.code25-Jun-07 20:30 
QuestionAdding property to a control Pin
anujose25-Jun-07 18:53
anujose25-Jun-07 18:53 
AnswerRe: Adding property to a control Pin
originSH25-Jun-07 22:11
originSH25-Jun-07 22:11 
Questionhow to check the valid username and password from database? Pin
help as an alias25-Jun-07 18:22
help as an alias25-Jun-07 18:22 
AnswerRe: how to check the valid username and password from database? Pin
Manas Bhardwaj25-Jun-07 19:05
professionalManas Bhardwaj25-Jun-07 19:05 
AnswerRe: how to check the valid username and password from database? Pin
Manas Bhardwaj25-Jun-07 19:06
professionalManas Bhardwaj25-Jun-07 19:06 
QuestionRe: how to check the valid username and password from database? Pin
Vikram A Punathambekar25-Jun-07 19:53
Vikram A Punathambekar25-Jun-07 19:53 
AnswerRe: how to check the valid username and password from database? Pin
Manas Bhardwaj25-Jun-07 20:24
professionalManas Bhardwaj25-Jun-07 20:24 
GeneralRe: how to check the valid username and password from database? Pin
Brady Kelly25-Jun-07 21:06
Brady Kelly25-Jun-07 21:06 
GeneralRe: how to check the valid username and password from database? Pin
Vasudevan Deepak Kumar25-Jun-07 21:50
Vasudevan Deepak Kumar25-Jun-07 21:50 
GeneralRe: how to check the valid username and password from database? Pin
help as an alias25-Jun-07 21:00
help as an alias25-Jun-07 21:00 
QuestionUsing Delegates To Communicate Pin
DavidNelson25-Jun-07 17:58
DavidNelson25-Jun-07 17:58 
AnswerRe: Using Delegates To Communicate Pin
Leslie Sanford25-Jun-07 18:47
Leslie Sanford25-Jun-07 18:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.