Skip to content

Commit

Permalink
Added arbitrary waveform support. Arbitrary waveforms can be loaded f…
Browse files Browse the repository at this point in the history
…rom a file that contains 2048 lines of samples in the range -1.0 to 1.0.

Added built-in sinc and normsinc waveforms using the arbitrary waveform machinery. They are generated on the fly and stored in slot 15.
Improved reliability of serial communications by implementing our own serial read loop that supports multiple reads and custom timeouts. This was needed because setting an arbitrary waveform slows down the instrument and it can take up to 300ms to respond.
  • Loading branch information
peterska committed Feb 5, 2021
1 parent 4754b14 commit 659960f
Show file tree
Hide file tree
Showing 13 changed files with 18,925 additions and 59 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ options can be zero or more of the following:
verbose level
command can be one or more of the following:
help - show command usage
showconfig - show the configuration of the current channel
on - turn output on
off - turn output off
Expand All @@ -60,6 +63,9 @@ command can be one or more of the following:
sweepon - turn sweep function on
sweepoff - turn sweep function off
slot N - set the arbitrary waveform slot to write to
arbwaveform file - set arbitrary waveform from file. The file should contain 2048 lines, 1 sample per line in the -1.0 to 1.0 range
measure cmd - measure values from waveform on ext-input. cmd can be one of frequency, count, period, pulsewidth, duty, negativepulsewidth, stop
sleep N - delay N seconds before executing the next command
Expand Down Expand Up @@ -206,6 +212,8 @@ Additional Links
Credit for all of the hard work goes to user `wd5gnr` from [EEV Blog](https://www.eevblog.com/) for reverse engineering the protcol and documenting it here: [MHS5200A Protocol](https://docs.google.com/document/d/1HbLQ4u87RJkD3Ktyw7k9U7Zh5BPNzbrhMlszNGdXiiY/edit)
Credit for the sample arbitrary waveforms included in the waves directory got to user `wd5gnr` and can be found at his github repo here: [wd5gnr/mhs5200a](https://github.com/wd5gnr/mhs5200a)
- [MHS-5200A Serial Protocol Reverse Engineered](https://www.eevblog.com/forum/testgear/mhs-5200a-serial-protocol-reverse-engineered/)
- [MHS-5200A function generator teardown / review / reverse engineering](https://www.eevblog.com/forum/testgear/mhs-5200a-function-generator-teardown-review-reverse-engineering/)
Expand Down
Loading

0 comments on commit 659960f

Please sign in to comment.