Shop OBEX P1 Docs P2 Docs Learn Events
Chip's DAC (ADC Scope) Examples from P2 Live Forum(12/29/2020) — Parallax Forums

Chip's DAC (ADC Scope) Examples from P2 Live Forum(12/29/2020)

Francis BauerFrancis Bauer Posts: 353
edited 2020-12-30 09:31 in Propeller 2
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.

Comments

  • cgraceycgracey Posts: 14,133
    Thanks for posting these corrections.
  • Thanks for pointing this out.
    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.
  • cgraceycgracey Posts: 14,133
    edited 2020-12-30 14:53
    Kaio wrote: »
    Thanks for pointing this out.
    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.
  • cgraceycgracey Posts: 14,133
    This file has all the fixes in it for ADC and DAC presentations:

    https://drive.google.com/file/d/1Zl3YInF3J4KvyAvaJfOdDFXhxysxnZmL/view?usp=sharing
Sign In or Register to comment.