![]() | ![]() | ![]() |
| | |||||||
| General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion? |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| I want to build an interface for standar PS/2 mouse, in order to make a converter to an old computer mouse interface. I have detailed info about protocols, so I know how to translate one protocol into the other. the problem is.. how ca I use a PIC or other device, to "listen" to serial data from Ps/2 mouse, process it, and send it to another serial data out, that goes into the old computer?? Both data channels have to be syncronized with a clock. Data comunication clock is about 10-20Khz. Thank you! | |
| |
| | (permalink) | |
| Quote:
By choosing a PIC with a hardware USART (like the 16F628) you can receive the PS2 data using software routines, then simply transfer it to the UART transmit register (where the hardware will do the rest). The UK magazine EPE did a series about PS2 interfacing, you can download the software from their website. However, quite a lot of mice were already designed to work with either PS2 or serial, they automatically detect which by the connections in the adaptor. | ||
| |
| | (permalink) |
| I don't want to interface PS2 with an RS-232. I want to connect PS2 mouse to a non-standar mouse protocol, designed for an old videoconsole system. This protocol has a clock signal, and all data sent to it, must be syncronized with this clock. This is a summary http://repairfaq.ece.drexel.edu/REPA....html#SNES_007 How can I read/store the data bits from PS2 in the PIC, in an efficient way, in order to process them, and then send them bit by bit trought an output pin?? thank you | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) |
| Yes, that might be great idea, as I could use the hardware capabilities of PIC. By the way... how can I output data correctly, bit by bit, to SNES?? loading a register with an 8bit value and then rotating it?? I never did these things with PICs. also, where can I find info about rs-232 mouse protocol?? I can only find PS/2... thanks. | |
| |
| | (permalink) | ||
| Quote:
Quote:
Do you mean you have to convert the data to something completely different in your program as well?. | |||
| |
| | (permalink) | |
| I see your tutorial. This can be done by any PIC I suppose. What is the difference if you use a USARt capable PIC?? What are the advantages?? A Max232 is always needed I suppose. Quote:
the problem about serial mouse protocol, is that I see no way of sending data to mouse (PS/2 mouse can accept lots of commands to set resolution, etc..). Serial mouse seems to work all the time at 1200 bps... and I can't find such complete info as for the Ps/2 protocol. | ||
| |
| | (permalink) | |||
| Quote:
Quote:
| ||||
| |
| | (permalink) |
| A PIC with UART capabilities (16F628, for example) is just what I need. Could you tell me where I can find an easy sample of how to use the UART capabilities. I mean, there are different data types and speeds used for RS232. Can you select 7N1, 8N1, etc..? and also, does bit rate affect?? In your tutorial, you talk about 9600, but most rs232 mice use 1200. Thank you very much, you're helping me a lot! | |
| |
| | (permalink) | ||
| Quote:
Quote:
| |||
| |
| | (permalink) |
| Ok, I understand now. But according to datasheet, it can only be set as 8 or 9 databits. What if I need to recieve 7 databits?? could this be done? If only 7 bits for data are sent, the following bit would be stop bit, but PIC would be waiting for 1 or 2 more bits... am I messing something around?? http://users.tkk.fi/~then/mytexts/mouse.html according to this web, microsoft mouse sends 7 databits + 1 stop bit... thank you | |
| |
| | (permalink) | |
| Quote:
As far as I'm aware, you can't set the UART for 7 bits?, personally I'd set it for 8 bits and see what happens :lol: it depends on how fast the bytes from the mouse follow each other!. | ||
| |