I got the chip running using rs232 port for download. I would like to use the usart for talking to a serial display at the same time.
Can this be done? I tried some netduino code. "s1=new(serialports(com1)); " but got an error.
ttl serial port
Started by skywalker, Dec 10 2010 07:14 PM
3 replies to this topic
#1
Posted 10 December 2010 - 07:14 PM
#2
Posted 11 December 2010 - 04:39 AM
I got the chip running using rs232 port for download. I would like to use the usart for talking to a serial display at the same time.
Can this be done? I tried some netduino code. "s1=new(serialports(com1)); " but got an error.
Hi skywalker,
Welcome to the Netduino community.
You can use the 3.3V TTL UART on pins 11 and 12 to communicate with a serial display (as long as the serial display uses 3.3V/5V signals). The port on pins 11 and 12 is COM1.
As far as your code, it should look something like "SerialPort s1 = new SerialPort("COM1", 115200...)". Can you post a snippet of your code?
Chris
#3
Posted 11 December 2010 - 03:10 PM
I apologize for stupidty. I am new to this.
I must be missing a reference. The project automaticaly added
using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.NetduinoMini;
namespace NetduinoMiniApplication1
{
public class Program
{
public static void Main()
{
// write your code here
SerialPort s1 = new SerialPort("COM1", 115200);
}
}
}
I still get an error"missing a reference". When I look at the Microsoft.spot.hardware.system.io.ports.
I dont see SerialPort, although there is a serial class listed.
#4
Posted 11 December 2010 - 05:44 PM
I must be missing a reference. The project automaticaly added
Hi skywalker,
Be sure to add Microsoft.SPOT.Hardware.SerialPort.dll as a reference to your project.
Chris
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users