Serial port questions
- SimonLothar
- Senior Member
-
- 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: Serial port questions
Could you drop a photo like this, please?happy wrote:Cable is loose too.

This is a jack, which fits well. I am very curious, how the connectors of your cable look like.
I'll be back!
- nsg
- Senior Member
- Posts: 69
- Joined: Sat Feb 02, 2013 4:29 am
- Calculators: Casio Cfx Series, Casio fx-CG10
Re: Serial port questions
Happy,
as i wrote before I also have a problem connecting 2 casio calculators together.
Today, i figured out what i was doing wrong, same thing may be happening to you too.
I opened the case thinking to adjust springs (whatever that means) and it became immediately apparent that I do not insert connector all the way through.
I had to push it pretty hard before it went "click". The amount of force I had to apply was borderline disturbing and i was almost afraid to brek something.
After I applied similar procedure to the other calculator (I mean, inserting connector until it clicks), i had no problems establishing communication between them.
On a side note, it would really improve your close-up pictures if you learned how to use "macro" button.
as i wrote before I also have a problem connecting 2 casio calculators together.
Today, i figured out what i was doing wrong, same thing may be happening to you too.
I opened the case thinking to adjust springs (whatever that means) and it became immediately apparent that I do not insert connector all the way through.
I had to push it pretty hard before it went "click". The amount of force I had to apply was borderline disturbing and i was almost afraid to brek something.
After I applied similar procedure to the other calculator (I mean, inserting connector until it clicks), i had no problems establishing communication between them.
On a side note, it would really improve your close-up pictures if you learned how to use "macro" button.
Re: Serial port questions
nsg wrote:I had to push it pretty hard before it went "click".
...
On a side note, it would really improve your close-up pictures if you learned how to use "macro" button.
NSG, You are a saviour! That was indeed the problem, thank you! I don't have a camera, used my phone to click the pic.
Re: Serial port questions
Casimo wrote:Casimo wrote:Maybe you have to press stronger.
Thanks. The suggestion to look out for the 'click' did it though.
- gbl08ma
- Senior Member
- Posts: 141
- Joined: Wed May 16, 2012 2:50 pm
- Location: Portugal
- Calculators: Casio fx-CG20
Re: Serial port questions
Yeah... I have noticed that usually you must apply a bit of pressure, on the 3-pin female port of Prizms which never had that port used, in order for the connector to be fully inserted. That extra bit of pressure usually goes unnecessary as you use the port more. I don't know if this is true for other Casio devices with 3-pin ports.
Re: Serial port questions
Transmit buffer:
1) I should check free space by calling Serial_GetFreeTransmitSpace() before calling Serial_BufferedTransmitNBytes(), right?
2) If I keep calling Serial_BufferedTransmitNBytes() and there is no cable attached, will the buffer get full at some point? When/how is this buffer cleared?
1) I should check free space by calling Serial_GetFreeTransmitSpace() before calling Serial_BufferedTransmitNBytes(), right?
2) If I keep calling Serial_BufferedTransmitNBytes() and there is no cable attached, will the buffer get full at some point? When/how is this buffer cleared?
- SimonLothar
- Senior Member
-
- 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: Serial port questions
Serial_BufferedTransmitNBytes() returns 2 instead of 0, if there is not enough buffer space available. So it is not necessary to call Serial_GetFreeTransmitSpace() beforehand.happy wrote:1) I should check free space by calling Serial_GetFreeTransmitSpace() before calling Serial_BufferedTransmitNBytes(), right?
The serial transmit procedures are not aware of whether a cable is attached or not. Available data are sent interrupt driven until the transmit buffer is empty. Hence the buffer is cleared automatically.happy wrote:2) If I keep calling Serial_BufferedTransmitNBytes() and there is no cable attached, will the buffer get full at some point? When/how is this buffer cleared?
I'll be back!
Re: Serial port questions
SimonLothar wrote:Serial_BufferedTransmitNBytes() returns 2 instead of 0, if there is not enough buffer space available
Am I right in assuming that: 2 means that none of the data from bytes_to_transmit was written to the buffer?
If yes, don't I need to keep calling Serial_BufferedTransmitNBytes() with the same data until it returns 0? So, this can't be blocking, right? My program is in a main loop looking for user input. Whenever user enters something (say in a text box), I need to transfer it via serial, so I call Serial_BufferedTransmitNBytes(). But I can't build the retry logic here (keep calling the function till 0 is returned) because it would block the user. So I should have a queue in a timer and the main loop should write to the queue? And the function in the timer should take care of error codes, retries etc.?
Who is online
Users browsing this forum: No registered users and 19 guests