Aah Thank you! nice so hooking up directly to Arduino was enough.But The photometer sends in BCD and the Arduino converts to decimal.1 byte is 2, 4 bit numbers and represents the 2 7-segment displays on the photometer.What if there are 6 displays?Can I assume the 1st byte it sends is the first 2 numbers in BCD, the 2nd byte it sends shows display 3 and 4 and the third byte represents display 5 and 6?Im quite new at this.
I suggest you get more information on the protocol used by the machine. Does it continuously send bytes, or are they combines into messages? How is a message identified and how do you know the end of a message? The BCD data may be imbedded in the message, but the message has special characters in the start of the message and some other special characters to tell you this is the end of the message. Look for documents relating to "protocol".Paul
this is the only document I have been able to find from the machine itself, there was no other document explaining the BCD protocol of the machine :/
Serial.print(incomingByte, HEX); // print as an ASCII-encoded hexadecimal
Ah yes sorry for my absence.For now I had a few problems with the connection because of limited tools/wires and thanks to covid it has been delayed.Right now im awaiting some new cable/rs232 to TTL converter shield with MAX323.But I've been thinking. If Arduino converts BCD values to Decimal on the serial monitor, then values like 255 should not be possible? 153 should be the maximum value representing a 9 on 1 segment and 9 on the other or 1001 1001.On a sidenote, what should the peak voltage be when you measure it on a scope?I sent the character "o" to the arduino serial monitor and got thishttps://ibb.co/CJx99CL500mV seems awfully low but the signal form seems to be correct
The largest BCD in a single byte is 99. Anything larger than a 9 is not a BCD. So, you are correct in that. Anything you discover that is greater than 99 is likely to be some protocol indicator, like a message end or ?Your scope shows a voltage going less than zero! What are you measuring and where? Paul
It does look like a binary signal but the peak voltage is so tiny I think there's something wrong here.
If applicable to your scope: check that the probe attenuation on the probe matches that in the scope settings.
Hello,I wanted to update on my progress regarding this topic.Going back to the starting point, I hooked up everything on an oscilloscope and got the following results of a RS232 port.RxD -> -10.4VDSR -> 9.2VCTS -> 8.6VRI -> -10.4V(all other voltage levels are 0V)I concluded that my photometer is a DCE (Data Communications Equipment) because my RxD reads a value lower than -3V.I also concluded that it is in an "idle-state" because the idle state of RS232 is a logic 1 or a constant negative voltage of between -3V and -12V.The problem is, how do I get this out of the idle-state?Do I have to perform hardware handshaking?Kind regards.