-1
\$\begingroup\$

I have generated simple arbitrary function which represent UART message, but I'm having trouble when it comes to decoding it on oscilloscope.

The reason for that is because my 0 and 1 at frequency of 9600Hz (in order to match 9600 baud) does not look like digital (square) signal.

That was because when I was generating the signal for example for letter "H" (binary "01001000") and with little endian format and start and 2 stop bits "00001001011" I saved this as appropriate 0v and 5v in *.RAF file.

So, in order to get square signal I have to multiply number of 0 and 1, for example: "00001001011" to "000000000000111000000111000111111" ...

So, my question is, is this appropriate solution, or there's some other option on generator which I can use to solve this initial issue.

\$\endgroup\$
  • \$\begingroup\$ try sending U where U is Hex 55 or binary 0101 0101 or similar \$\endgroup\$ – Sunnyskyguy EE75 Apr 5 '17 at 23:34
  • 1
    \$\begingroup\$ @TonyStewart.EEsince'75 How is this related to anything in my question? \$\endgroup\$ – ShP Apr 5 '17 at 23:52
  • \$\begingroup\$ You probably don't want to set the frequency to 9600 Hz. Generally the ARB is set up to assume the whole trace is one period, and you want to play that back 9600 times per second. What you need to do is set the frequency to 9600 / (length_in_data_bits) Hz. Or set the sample rate, if the instrument lets you specify that. \$\endgroup\$ – alex.forencich Apr 6 '17 at 0:32
  • \$\begingroup\$ @Shp You ought to know how UART clock sync works with 16x clock then delays 1x clock by 1/2 bit to center sample. The ARB has a preset phase shift and external trigger so if you use a square wave character like U, you have chance of getting Scope sync with 1x clock. Once ext trigger and delay are set, inter-character delays need a start byte clock again for n bits per byte. Capiche? or a proper cct to do the Async Start bit detect for scope clock sync. It's not that hard to create a start bit and data clock for ASYNC data. \$\endgroup\$ – Sunnyskyguy EE75 Apr 6 '17 at 1:24
  • \$\begingroup\$ @alex.forencich instrument support both, frequency and sample rate, but my question was, what would be sufficient sample rate then which would be good enough to generate square signal without data overhead in *.raf file? \$\endgroup\$ – ShP Apr 6 '17 at 1:30
1
\$\begingroup\$

To get digital output from an ARB you would have to disable the output filter. I looked through the manual on the Rigol DG1022Z and there does not seem to be a way of doing that - the way you are currently doing it seems to be the best.

BTW you should put the manufacturers name and what it is in the question, other people may not know it is a Rigol Arbitrary Waveform Generator.

\$\endgroup\$
  • \$\begingroup\$ Thanks for your answer Kevin, and how about this "duplication", I couldn't find what's the "magic" number for that, what would you recommend? I mean, in the sample above I just used 3 (111 for one 1 and 000 for one 0), but I'm guessing there must be a proper way for that \$\endgroup\$ – ShP Apr 6 '17 at 0:00
  • \$\begingroup\$ The more you duplicate the values the more "square" the output will be. If it works with 3 there is little point in doing more. \$\endgroup\$ – Kevin White Apr 6 '17 at 0:08
  • \$\begingroup\$ Ok, and once I have proper (visual) look for that square, any hints on how to adjust generator so that I can be able to decode the signal on oscilloscope? I mean, beside setting the frequency to 9600Hz for 9600 baud and VHigh to 5v and VLow to 0v. \$\endgroup\$ – ShP Apr 6 '17 at 0:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.