Register

fxMouse - Control your pc with casio fx9860

Topics on released projects. Only the author of a program should start a topic on it.
Senior Member
Posts: 369
Joined: Tue Jan 03, 2012 11:24 pm
Calculators: Casio Afx 1.0, Casio fx-9860GII SD, Casio Classpad 330, Casio fx-CG20, Casio Classpad fx-CP400

fxMouse - Control your pc with casio fx9860

Postby helder7 » Sat Feb 23, 2013 9:08 pm

I wrote an add-in for I can control my pc with Casio Fx9860GII.

Image

This add-in allows:
-Move the mouse and click with left and right mouse buttons
-Easy scroll web pages
-Increase, decrease, mute the sound of pc

Extra hardware required:
For you use it, you need a cable 3pin to serial.

Demo:
[youtube]http://www.youtube.com/watch?v=Kr_K6Ql0kzA[/youtube]

Instructions:
1-Download fxmouse package here
Download and install EventGhost in your pc.

2-Copy FXMOUSE.G1A for your calculator

3-In EventGhost, click File>Open and import the config file fxmouse.xml
By default it is set to work with with com1. If you need to change, click on "Plugin: Serial Port", and you can do it (but do not change other settings).

Image

4-Connect your calc to pc via 3pin - serial cable, open the add-in on calc and Eventghost on your pc and you can control your pc with a calculator.

This is a proof of concept of the possibilities and uses that the serial port can have.
Feel free to download, test and comment.
SiO2 + CaCO3 ----------> CaSiO3 + CO2

Senior Member
Posts: 141
Joined: Wed May 16, 2012 2:50 pm
Location: Portugal
Calculators: Casio fx-CG20

Re: fxMouse - Control your pc with casio fx9860

Postby gbl08ma » Sun Feb 24, 2013 12:59 am

If we ever get to understand the USB port of the Prizm or the fx9860 then we may be able to make them act as a mouse/keyboard (meaning no extra software required on the PC to make it work).

Senior Member
User avatar
Posts: 113
Joined: Sun Dec 16, 2012 2:59 pm
Calculators: None

Re: fxMouse - Control your pc with casio fx9860

Postby Casimo » Sun Feb 24, 2013 8:31 am

I don't have a 3pin to serial cable. Is it possible to change the program so you can use the USB cable?
Maybe we could make the calculator send the same protocol like a mouse so it is possible to plug it only in :D.
Image

Senior Member
Posts: 369
Joined: Tue Jan 03, 2012 11:24 pm
Calculators: Casio Afx 1.0, Casio fx-9860GII SD, Casio Classpad 330, Casio fx-CG20, Casio Classpad fx-CP400

Re: fxMouse - Control your pc with casio fx9860

Postby helder7 » Sun Feb 24, 2013 1:20 pm

Casimo wrote:I don't have a 3pin to serial cable. Is it possible to change the program so you can use the USB cable?

I do not know how to control the usb port with an add-in :cry:.
SiO2 + CaCO3 ----------> CaSiO3 + CO2

Senior Member
User avatar
Posts: 113
Joined: Sun Dec 16, 2012 2:59 pm
Calculators: None

Re: fxMouse - Control your pc with casio fx9860

Postby Casimo » Sun Feb 24, 2013 3:04 pm

Taken from Simon's docs.

Most of the Comm-functions should work like the corresponding serial functions.
The Comm-Functions are heavily used in the CommunicationsProtocol.

Syscalls for USB communication: Show
0x028D: int Comm_Open( unsigned short parameters );

If parameters ANDed with 0xF0 is 0x20, the USB communication channel will be opened,
else syscall 0x02AB (Serial_Open) is called with parameters.

0x0290: int Comm_ReadOneByte( unsigned char*result );

Fetches one byte from the actual opened communication pipe into result.
The function waits for 1000 ms max.
returns
0 if successful
5 if the channel is not open.
6 a timeout occurred

0x0299: int Comm_GetCurrentSelector( void );
returns the currently selected communicaton channel (0=serial, 1=USB)

typedef struct{
unsigned char type;
unsigned char subtype;
unsigned short datasize;
void*databuffer;
char checksum;
} TReceivePacketDesc;

0x02E7: int Comm_PrepareDataPacket( TReceivePacketDesc*rpd, unsigned char subtype, void*datapointer, unsigned short datasize );
Prepares the fields of rpd as Data packet.
type = 0x02
subtype = subtype
datasize = datasize
datapointer = datapointer
checksum = 0

returns 0 if sucessful
returns 0x09 if datapointer is null.
returns 0x17 if datasize > 0x808.
(02.06.2012 15:39:06)


Maybe we should ask him how to send specific data and not only packets so you don't have to care about the communication protocol.
Image

Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

Re: fxMouse - Control your pc with casio fx9860

Postby SimonLothar » Sun Feb 24, 2013 5:59 pm

Once successfully opened with Comm_Open, the USB-channel can be used to send/receive single bytes with Comm_TransmitOneByte/Comm_ReadOneByte.
I'll be back!

Senior Member
User avatar
Posts: 113
Joined: Sun Dec 16, 2012 2:59 pm
Calculators: None

Re: fxMouse - Control your pc with casio fx9860

Postby Casimo » Sun Feb 24, 2013 6:48 pm

I can't find Comm_TransmitOneByte in the documentation - what are the syscall adresses?
Image

Senior Member
Posts: 369
Joined: Tue Jan 03, 2012 11:24 pm
Calculators: Casio Afx 1.0, Casio fx-9860GII SD, Casio Classpad 330, Casio fx-CG20, Casio Classpad fx-CP400

Re: fxMouse - Control your pc with casio fx9860

Postby helder7 » Sun Feb 24, 2013 7:05 pm

Comm_TransmitOneByte is the syscall 0x291. It is on the table only.

I'm having problems opening usb port with syscall Comm_Open, I do not understand the parameters. Any help?
SiO2 + CaCO3 ----------> CaSiO3 + CO2

Senior Member
User avatar
Posts: 113
Joined: Sun Dec 16, 2012 2:59 pm
Calculators: None

Re: fxMouse - Control your pc with casio fx9860

Postby Casimo » Sun Feb 24, 2013 7:34 pm

I'm not sure but maybe you could try to open the port with parameters = 0x20?
(0x20 & 0xF0 = 0x20)

It could also be like Serial_Open() with a char-array as short...
Image

Senior Member
Posts: 369
Joined: Tue Jan 03, 2012 11:24 pm
Calculators: Casio Afx 1.0, Casio fx-9860GII SD, Casio Classpad 330, Casio fx-CG20, Casio Classpad fx-CP400

Re: fxMouse - Control your pc with casio fx9860

Postby helder7 » Sun Feb 24, 2013 9:50 pm

I tried to compile the add-in with:
Comm_Open(0x20 & 0xF0);
and
Comm_Open(0x20);

and when i open it on calc (connected via usb) , appears a new device "CESG502" in the computer. This means that I opened the usb port successfully?
SiO2 + CaCO3 ----------> CaSiO3 + CO2

Next

Return to Released Projects

Who is online

Users browsing this forum: No registered users and 17 guests