All 3 UART on WinCE

Kay 2009-10-05 21:16:00 Link
Hello,

can i use with WinCE 5 and the Mini2440 Board all 3 UART ? Is there any
German Forum about the Mini2440 ?

Greetings Kay

mohazzab 2009-10-06 12:24:10 Link
yes obviously you can use all three uart i have used it and i dont think
there is any german forum on mini2440

Kay 2009-10-06 21:42:22 Link
Hello mohazzab,

thank you for your answer. I want to use the mini2440 with WinCE 5.0 in
Landscape Mode. For controlling RS485 Devices and a GSM Modem i want to use
all 3 UARTS. Now i will try this.

Thanks and Greetings
Kay

wanderer 2009-10-06 23:00:41 Link
Do you have a c# example on where to use those 3 UARTs?!

Mathias Tantau 2010-03-24 09:45:18 Link
Whould you please publish your code results, Kay

NothinRandom 2011-11-20 07:43:49 Link
I would like to know how to access UART as well on WINCE. If you guys can
help, that'd be great!

Cheers!

fictionde 2011-12-02 14:12:52 Link
This is a part of my projekt in VB.Net homebus RS485 2 wire.
 

SerialPort1.Open()                 'open com-port1
SerialPort1.Read(buffer, 0, 7)     'read com-port1  7 byte
        SYNC = buffer(0)           ' 1. bytes...
        HDB2 = buffer(1)           '...
        HDB1 = buffer(2)
        DAB1 = buffer(3)
        SAB1 = buffer(4)
        DB2 = buffer(5)
        DB1 = buffer(6)            '7. byte 

transmit 7 byte over com-port1

Dim txbuffer() As Byte = {84, 85, 2, 193, 3, 255, 255}
        SerialPort1.Write(txbuffer, 0, 7)
        Threading.Thread.Sleep(50)  'waiting that all transmit

Cheers!

NothinRandom 2011-12-02 21:40:33 Link
Ok. So after playing around, I was able to read and write to all 3 UARTs in
C#. 

private void button1_Click(object sender, EventArgs e)
{
  if(serialPort1.isOpen)
  {
    serialPort1.Close(); //if port is already opened, end connection
    label1.Text = "Start"; 
  }
  try
  {
    serialPort1.Open(); //attempt to start serial 
  }
  catch //catch normal exceptions
  {
    MessageBox.Show("Port Error!", "Port Error!",  
MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation,
MessageBoxDefaultButton.Button1); 
  }
}

string serialRead(int length) //parse and read defined length
{
  int bcBytes = serialPort1.BytesToRead;
  byte[] bcbuffer = new byte[length];
  serialPort1.Read(bcbuffer, 0, length);
  return (new ASCIIEncoding()).GetString(bcbuffer, 0, length);
}

These two items should help you guys started. This code works with Arduino
with ease. Since Arduinos operate on UART as well, hook TX of arduino to RX
of mini2440, TX of arduino to a voltage divider to lower to 3.3V and output
to TX of mini2440. Set up same settings on both sides: 9600 baud (default),
8 data bits, no parity, 1 stop bit. Do Serial.begin(9600); on Arduino and
you're good to go.

George 2011-12-26 08:44:45 Link
how do I configure 3 UART ports for RS485 for Windows CE 5.0?

iman 2012-01-20 14:48:05 Link
hi to all
i must set pin 4 of port H as gpio (output) and set it to high for 3
senconds then open it as serial port but when i send data via it (serial
port), not worked !
can help me how set this pin to gpio and then use it as serial port ?
sp thanks

Reply

Name
eMail (not visible)
Subject (no text only in upper case; no HELP, URGENT...)
Text
HTML tags are not supported and links are generated automatically if they start with http or ftp.
Please submit long source code or log files as attachment (only registered users).
Please enter the number 7779