Take a look at the Mini pinout found here http://www.ghielectronics.com/downloads/FEZ/Mini/Broch_FEZ_Mini.pdf. This will tell you what pins map to what COM port. You should not connect 5V to the Mini. Also, start with a low BAUD rate of 9600 and work your way up to higher speeds, testing as you go.
SerialPort uart = new SerialPort("COM3", 9600,Parity.None,8,StopBits.One);
int read_count = 0;
byte[] rxByte = new byte[1];
uart.Open();
while (true)
{
// read one byte
read_count = uart.Read(rxByte, 0, 1);
if (read_count > 0)// do we have data?
{
// create a string
string counterString =
"You typed: " + rxByte[0].ToString() + "\r\n";
// convert the string to bytes
byte[] buffer = Encoding.UTF8.GetBytes(counterString);
// send the bytes on the serial port
uart.Write(buffer, 0, buffer.Length);
//wait...
Thread.Sleep(10);
}
}
I used COM3 with pins d7 & d8 (because as you said Com1 is RS232, so u guess COM3 is TTL right?), and i use the same settings for serial speed, parity etc in windows COM1 (as mapped my ttl from the driver).
The program seems to be running good, but i can’t still receive from my pc any data.
I use hyper terminal, please advice
I found also one pic from an arduino project, that guy put the DTS or some other pin (with soldering) to ground or i don’t remember… i lost the link somewhere…
i dunno exactly what that image represents but as Ian says, make sure GNDs are connected between the Mini and the USB TTL device - you mention the brown wires, which would imply the small insert pics are of your setup? I didn’t check the mini diagram to make sure your pins were correct, that’s the other thing to check.
I’m not familiar with that board but from what I can see it appears those are alternate I2C & SPI interfaces. Get it working with UART first as you have it wired. You can look into those later if you find you need a faster interface or would rather poll the data.
If you need to dig into anything (ie it doesn’t “just work” now) then you should look at the CP2102 datasheet as this will tell you more than anything. Just one more check to make, you can see the CP2102 listed in the serial devices in device manager, and that the driver is showing installed and working?