All 3 UART on WinCE

Kay
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
yes obviously you can use all three uart i have used it and i dont think
there is any german forum on mini2440

Kay
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
Do you have a c# example on where to use those 3 UARTs?!

Mathias Tantau
Whould you please publish your code results, Kay

NothinRandom
I would like to know how to access UART as well on WINCE. If you guys can
help, that'd be great!

Cheers!

fictionde
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
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
how do I configure 3 UART ports for RS485 for Windows CE 5.0?

iman
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