Chip's DAC (ADC Scope) Examples from P2 Live Forum(12/29/2020)
Francis Bauer
Posts: 365
There are a few things I discovered you will need to do in order to run Chip's new examples.
In the "Simple_SCOPE.spin2" file you will most likely need to change the position(pos) of the debug scope display.
Since Chip has a very large vertical computer monitor, he used some large position values, which are probably beyond most of our displays, the scope display window will most likely be drawn off-screen.
Change: debug(`SCOPE s pos 710 1000 size 512 276 samples 512 rate 512 longs_8bit `dly(200))
To: debug(`SCOPE s pos 0 0 size 512 276 samples 512 rate 512 longs_8bit `dly(200))
Also in the "Simple_DAC.spin2" file, there is a missing parameter.
Change: scope.start(0 addpins 0, $0040_0000)
To: scope.start(0 addpins 0, $0040_0000, p_adc_1x)
The above issues are minor, but they are enough to throw you off when trying something new.
Chip's examples are a great learning experience for working with both DACs and ADCs on the P2.
In the "Simple_SCOPE.spin2" file you will most likely need to change the position(pos) of the debug scope display.
Since Chip has a very large vertical computer monitor, he used some large position values, which are probably beyond most of our displays, the scope display window will most likely be drawn off-screen.
Change: debug(`SCOPE s pos 710 1000 size 512 276 samples 512 rate 512 longs_8bit `dly(200))
To: debug(`SCOPE s pos 0 0 size 512 276 samples 512 rate 512 longs_8bit `dly(200))
Also in the "Simple_DAC.spin2" file, there is a missing parameter.
Change: scope.start(0 addpins 0, $0040_0000)
To: scope.start(0 addpins 0, $0040_0000, p_adc_1x)
The above issues are minor, but they are enough to throw you off when trying something new.
Chip's examples are a great learning experience for working with both DACs and ADCs on the P2.
Comments
Additional should be mentioned that one need to connect pin 8 - 11 to pin 0 - 3, otherwise the examples doesn't show what would be expected. A comment in the code is missing for that.
The scope code is reading on pin 0 - 3 and the example code drives pin 8 - 11, some only pin 8.
The latest file I sent Ken had those comments added to jumper pins 8 through 11 down to zero to three, but I still need to fix the DEBUG Scope window position, because people won't see it.
https://drive.google.com/file/d/1Zl3YInF3J4KvyAvaJfOdDFXhxysxnZmL/view?usp=sharing