world leader in high performance signal processing
Trace: » setup_serial_mouse

Setup Serial Mouses on blackfin/uClinux

We choose the serial mouse with chip EC3581 as an example. EC3581 is a single chip 2IN1 mouse controller. It supports both Microsoft System and Mouse System protocal. We choose the Microsoft System as the default protocol. The serial mouse can be plugged into a RS232 interface. It is powered by the 7th PIN of a 9-PIN RS232 connector. The 2nd PIN is defined as a transfer line, while the 3rd PIN is defined as a receiving line. The serial mouse works under baud 1200 bps. The output data contain 1 start bit, 7 data bits and 2 stop bits.

Hardware Changes

The serial mouse can not work directly through the UART ports on the blackfin board. Since the mouse we used steals the power from RTS( pin 7 of PC serial connector), some changes should be done. Following change is make on UART1 daughter board.

  1. Remove R1.
  2. Connect pin 10 of ADM3202 on ADSP-BF537 UART add-on card to GND.
  3. Short pin 7 with pin 8 of ADM3202. Now there is about 6V power on RTS.
  4. Connect the mouse use a cross wire. The serial mouse is connect directly to PC, and the serial port of ADSP-BF537 UART add-on card also connect directly to PC. So we must use a cross wire to connect mouse from ADSP-BF537 UART add-on card.

Don't forget to swith DIP 3 and 4 of SW5 on BF537 stamp board to position ON before you connect the serial mouse.

Configure serial mouse

No kernel configuration is necessary. Any application that gets input from the serial mouse should configure the ttyS device in advance. You can also do the configuration manually on command line.

~> stty -F /dev/ttyS1 ispeed 1200 cs7 -icanon

Then, you can try a simple test to see if the mouse works. You will get a lot of mess data on the console.

~> cat /dev/ttyS1
XXXXXXXX............BBBBBBBB.....
......

Complete Table of Contents/Topics