Jump to content



Photo
- - - - -

Connection Program


  • Please log in to reply
5 replies to this topic

#1 E_net4

E_net4

    Casio Freak

  • Members
  • PipPipPipPip
  • 189 posts
  • Gender:Male
  • Location:Output("Error: Coord type not specified");
  • Interests:Programming 'n' stuff...

  • Calculators:
    CASIO fx 9860G SD

Posted 16 March 2007 - 06:23 PM

I intended to make a program for 2 calcs (fx 9860G) to send/receive a value via 3pin cable from/to each other. Here's the code:

0 :arrow: A
0 :arrow: B
"1. Calc 1"
"2.Calc 2"
For 1 :arrow: L To 500
Next
While Getkey/=72 And Getkey/=62
WhileEnd
Getkey :arrow: K
If K=72
Then OpenComport38k
1 :arrow: C
"Connection On."
"Number"? :arrow: A
"Sending..."
Send38k A
For 1 :arrow: L to 20
Receive38k B
B=>Break
Next
Locate 14,1,B
CloseComport38k
"FINISHED"
IfEnd
If K=62
Then For 1 :arrow: L To 100
Next
OpenComport38k
"Connection On."
"Receiving..."
For 1 :arrow: L To 20
Receive38k A
A=>Break
Next
Locate 14,5,A
"Number"? :arrow: B
Send38k B
CloseComport38k
"FINISHED"
IfEnd

Unfortunately, I didn't work. It passed through all steps, but both calculators return 0.

#2 The_AFX_Master

The_AFX_Master

    Casio Overlord

  • [Legends]
  • PipPipPipPipPipPipPip
  • 519 posts
  • Gender:Male
  • Location:Black Mesa Research Facility (sector C)
  • Interests:BASIC +FORTRAN 90+ C++.....and HALF LIFE

  • Calculators:
    Casio Algebra FX 2.0 Plus, Casio fx 570 ms, Classpad 300, And a crowbar

Posted 16 March 2007 - 06:38 PM

Welcome to the UCF

unfortunately, the Send() and receive() commands only work with a PC or a data logging peripheral (EA 200), not with another calculator

#3 E_net4

E_net4

    Casio Freak

  • Members
  • PipPipPipPip
  • 189 posts
  • Gender:Male
  • Location:Output("Error: Coord type not specified");
  • Interests:Programming 'n' stuff...

  • Calculators:
    CASIO fx 9860G SD

Posted 18 March 2007 - 12:04 PM

Are you sure? I didn't use Send() and Receive(), I used Send38k and Receive38k.

#4 E_net4

E_net4

    Casio Freak

  • Members
  • PipPipPipPip
  • 189 posts
  • Gender:Male
  • Location:Output("Error: Coord type not specified");
  • Interests:Programming 'n' stuff...

  • Calculators:
    CASIO fx 9860G SD

Posted 18 March 2007 - 09:16 PM

So what's the difference between them? :unsure:

#5 Horrowind

Horrowind

    Newbie

  • Members
  • Pip
  • 29 posts
  • Gender:Male

  • Calculators:
    9860G SD
    9850GB+

Posted 18 March 2007 - 09:28 PM

I'm not sure, but I think that the 38k commands use the USB Port and the Send/receive commands uses the COM port.

#6 Manuel Naranjo

Manuel Naranjo

    Casio Addict

  • Members
  • PipPipPip
  • 65 posts
  • Gender:Male
  • Location:Rosario, Argentina

Posted 18 March 2007 - 10:20 PM

I don't think that's the difference. Mostly sure both commands use the Serial Port (USB port is a mess to use, you can't use it from BASIC code). I would say the difference is related to the speed. 38k = 38000 bauds per second.

I'm not sure, but I would say you can connect two calcs with just a wire, you should just cross the RX TX lines. You have three wires, one is GND (ground). Then you have one wire for TX and one wire for RX. You should make the TX from one calc match the RX of the other and viceversa.


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users