OSDev.org

The Place to Start for Operating System Developers
It is currently Wed Apr 24, 2024 5:41 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Serial Mouse programming
PostPosted: Mon Jul 23, 2001 11:00 pm 
Hello

I've made some routines to use the serial port.
I've managed to use my modem on COM2 but failed
to init correctly the COM1 MS Mouse.

Here is my code for mouse init. Where is the
mistake ? I assume that the INT gate is correctly set
and that UART_init() works. All this stuff works
in PMODE.

//First I set 1200 bps - 1 stop bit - no parity
//and +12V - I put 4 in MCR
enable_irq(4);
UART_init(0x3F8, 0x60, comprotocol7bits + comprotocolSOUTTXD12V, 4);
//I enable the COM1 RX int
outportb(0x3F8 + 1, 1);
//Don't know why these 2 lines
inportb(cominitaddr+5);
inportb(cominitaddr+6);
//Set DTR
outportb(0x3F8+4, 7);

Thanks for explanation


Top
  
 
 Post subject: RE:Serial Mouse programming
PostPosted: Wed Jul 25, 2001 11:00 pm 
>On 2001-07-24 06:06:09, [email protected] wrote:
>Hello
>
>I've made some routines to use the serial port.
>I've managed to use my modem on COM2 but failed
>to init correctly the COM1 MS Mouse.

1. Do you enable IRQ 4 at the 8259
interrupt controller chip?

2. To get serial interrupts on my system,
I had to turn on the Out2 signal:
//Set DTR
//outportb(0x3F8+4, 7);
outportb(0x3F8+4, 0x0F);

3. If you have a 16c550 serial chip,
turn off the FIFO for the mouse:
outportb(0x3F8+2, 0);

4. Some mice send a string of PnP bytes
when they are powered -- you should
either read these or ignore them.
For information on serial PnP, get
PNPCOM.RTF from
http://www.microsoft.com/hwdev/respec/pnpspecs.htm


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot], SemrushBot [Bot] and 156 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group