In the screenshot attached, you can see the settings I'm using. The settings for the decoder are: baudrate 115200, 8 bits of data per frame, no parity, 1 stop bit, LSB order. The threshold is -5 and the hysteresis is 0. I'm using channel B, btw.
The problem is that I'm not seeing anything on the decoder window (screenshot attached), I tried to delete the current decoder and create a new one, getting a new capture again, etc. I always end up getting the same result :/
Just in case, I'm running this on Windows 10 x64 2004 (build 19041).
Some hints on setting up the right way
1st set your scope to +/- 10V instead of 5 because you have overvoltage and the decoder can have problemens with overvoltages.
2nd your signal seems te be inverted so you need to setup as shown below.
thanks for your answer. I tried with the setup you suggested but I'm getting the same results. Attached goes the .psdate file and the .cvs with the decoder settings. Btw, I'm working with channel B, does it makes the difference?.
thanks for the answer and the fix. I see that the fix was to set the Stop Bit to 0 in the serial decoder. However, there is something I don't get it. Serial.begin() (in the code I wrote), according to the docs, is initialized with one stop bit: https://www.arduino.cc/reference/en/lan ... ial/begin/. See the default (SERIAL_8N1, 8 bits, no parity, one stop bit). How is this possible?.
I really need to understand what's wrong with the setup. I asked on the Arduino forum and they pointed me that the problem is in the scope but they didn't mention what's wrong so I'm like at the beginning again. Any hints?.
yes, I tried like that and the result is the same. No way to correctly decode the data with the stop bit set to 1. Could it be due to hardware problems?.
Regarding the use of the scope, I just have channel A connected to the TX pin on the Arduino, nothing special. Regarding the Picoscope software, I can't say anything more tant I have the latest available version: 6.14.23.5207.
If you setup the decoder as 7 data bits no parity and 1 stop bit, but do not tick the Invert box. Your data is decoded as "hello" , which I am guessing is correct.
I would move the trigger to 20% rather than 50% to see the remainder of the message correctly.
thanks for the answer. Yes, I think it works but, is it really the expected behavior? I mean, I'm explicitly setting the serial communication with 8 bits, no parity and 1 stop bit. Why the Picoscope is getting 7N1?. Isn't that a mismatch?.
I have just checked more carefully, and the issue is that the baud rate is not quite 115.2kB and if you opt for custom decoding with a rate of 119kB you can decode the data correctly at 8-N-1 , so your software is correct but there is a slight error in the timing. With single characters you wouldn't notice this but a string of characters causes a misalignment of the data the further you go through the string.