I did the original post nearly 20 years ago for classroom use of Casio FX-9750G connected to a Picaxe microcontroller for ultra low cost data logging. Others have used this information but I had not finished testing an idea I had at the time until now.
My new RECEIVE() algorithm overcomes a known timeout COM error limitation.
Until now, the wider community interpreted the Casio 3-pin serial link protocol as synchronous and blocking: once a transfer begins, both connected devices must complete it.
This prohibited real-time interval sampling because Casio BASIC lacks timing functions like PAUSE, WAIT, or a real-time clock. Timestamped time interval sensor recording was not possible.
Instead, data acquisition units like the EA-100, EA-200 and CLAB handled timed interval sampling independently of the FX-9750 and FX-9860. However they cost $400 - $900.
My new RECEIVE() algorithm uses a previously undocumented and unknown exploit that permits pausing the RECEIVE() transmission without generating a COM timeout error.
This enables the Casio to make non-blocking requests for sensor data, wait a period, and receive the reading with a time stamp.
I have completed a single universal Picaxe Basic program for 08M2 and 14M2 chips. For simple sensor units for younger learners the 08M2 chip connected to a single analog sensor (e.g. Temperature, light, sound, heartbeat) and/or a single digital input. For rates of change or more complex experiments in chemistry, physics or biology, a 14M2 which permits logging up to 3 sensors simultaneously with time stamps with pauses from 1 second to 5 minutes (possibly longer).
The simple 3-pin serial protocol likely works with FX-9860 and FX-CG50 calculators. My algorithm is accurate to 1 second in 1 hour of logging.
This saves $$$$ having to purchase EA-200 or CLAB data acquisition units to enable data logging on the calculators.
The Casio BASIC program is also universal: It works with any connected microcontroller or board; Picaxe, ESP8266, ESP32 and others.
As a proof of concept, I have a working Wemos D1 mini running my new RECEIVE() algorithm.


