0

I am an extreme novice trying to understand pin assignments to create a simple C# application.

The end goal is to make a very simple software that allows a weight reading from a scale, such as a Rice Lakes scale and then send that data to a CSV file. Currently following this thread I get data results of b'' I read that shorting the data pin connections while in a terminal like PuTTY you should get some gibberish & thats how you know your cable connection works properly. My issue is that shorting pins 2 & 7 creates readings, but my scale gets data readings from pins 2 & 3.

Red circled pins are the ones that produce data when shorted

Is it possible for me to reassign pin #7 to achieve my goal, or am I asking the wrong questions entirely? I am using an Oikwan DB9/USB cable and this pinout for understanding.

It is my current belief that in a properly functioning cable, shorting pins 2 & 3 would produce a data value rather than pins 2 & 7. Current next step is to get a replacement cable. Please enlighten me on what I could be missing. I've been at this for weeks.

GBann
  • 1
  • 1
  • You might have more like an electrical engineering problem then a programming problem. Did you check [EE.se](https://electronics.stackexchange.com/questions/tagged/rs232) for solutions to rs-232 weirdness? I doubt your problems are solvable in software. – rene Feb 24 '23 at 07:47
  • Simply shorting two pins together should not "*produce a data value*". A *loopback* test allows you to *receive* whatever you *transmit*. With a terminal emulation program (such as PuTTY), that means what you type on the keyboard will be (received and) displayed on the screen. (If local echo is enabled, then each keystroke would be displayed twice.) "*am I asking the wrong questions entirely?*" -- Probably, Use an oscilloscope to confirm which pins are active. – sawdust Feb 24 '23 at 21:52
  • @rene I didn't even know about the Electrical Engineering side of the site, Thank you for that! After a bit of reading I do think you're correct that I can't feasibly solve this using c#. I did see however that to test my code better I can just setup a virtual COM port that can imitate my scale settings. So that the path I'll down head next. (I'm VERY new to hardware / serial communication.) Thanks for your input! – GBann Feb 24 '23 at 22:29
  • @sawdust Unfortunately the only way for me to access any type of hardware would be for me to ask someone on the college campus near me to let a stranger come in and sit down to use their machine. ..Which thinking about might actually be a really good idea. I'll see if I can't find an email for their robotics team. As far as a "data value" I get b'\00' when I short the pins (using a small screwdriver bit to connect them), in comparison to the typical b'' value. – GBann Feb 24 '23 at 22:36
  • "*I get b'\00' when I short the pins*" -- That's just garbage. One more time: you need to send something, and expect to receive it perfectly for a proper loopback test. If "*you should get some gibberish*" then you're doing something very wrong; what you "*read*" about "*shorting the data pin connections*" is misinformation. – sawdust Feb 25 '23 at 05:50

0 Answers0