Serial interface communication

This program enables communication via the serial interface on the opensensor.

 

The jumpers  J5 and J6 must be set on the opensensor board in order to use the serial interface.

 

The settings for the Terminal program e.g. Hyper Terminal are:

  • Com port of your serial or USB to serial port
  • 57600 bit/s
  • 8 databits
  • No parity
  • 1 stopbit
  • Flow-control: None
  • Ascii settings: Send new line and show written characters locally

 

To test the program you can write:

  • Test - Will print "Test was written"
  • on - Turns the green LED on
  • off - Turns the green LED off

The function to print on the serial interface is USBsend(x) , where x must be some text string e.g. USBsend("test\n\r");

 

main.c

serial.c

led.h

 

 

Department of Electronic Systems | Aalborg University | Niels Jernes Vej 12 | DK-9220 Aalborg | Denmark
Phone: (+45) 9635 8695 | Fax (+45) 9815 1583 | E-mail ies(at)ies.aau.dk
Copyright © 2006 Department of Electronic Systems

Last update:16-02-2009