Skip to content

P8X32A/Propeller, P2X8C4M64P/Propeller 2 driver object for the Analog Devices AD799x-series ADCs

License

Notifications You must be signed in to change notification settings

avsa242/ad799x-spin

Repository files navigation

ad799x-spin


This is a P8X32A/Propeller, P2X8C4M64P/Propeller 2 driver object for Analog Devices AD799x-series ADCs.

IMPORTANT: This software is meant to be used with the spin-standard-library (P8X32A) or p2-spin-standard-library (P2X8C4M64P). Please install the applicable library first before attempting to use this code, otherwise you will be missing several files required to build the project.

Salient Features

  • I2C connection at up to 400kHz (maximum is not enforced)
  • Read ADC word or voltage in micro-volts
  • Set active channel mask
  • Set function of BUSY/ALERT pin
  • Set ADC data rate (currently interval between measurements)

Requirements

P1/SPIN1:

  • spin-standard-library
  • signal.adc_common.spinh (provided by spin-standard-library)

P2/SPIN2:

  • p2-spin-standard-library
  • signal.adc_common.spin2h (provided by p2-spin-standard-library) (NOTE: untested on P2)

Compiler Compatibility

Processor Language Compiler Backend Status
P1 SPIN1 FlexSpin (6.9.4) Bytecode OK
P1 SPIN1 FlexSpin (6.9.4) Native/PASM OK
P2 SPIN2 FlexSpin (6.9.4) NuCode Untested (build OK)
P2 SPIN2 FlexSpin (6.9.4) Native/PASM2 Untested (build OK)

(other versions or toolchains not listed are not supported, and may or may not work)

Hardware compatibility

  • Supports AD7993, AD7994, AD7997, AD7998
  • Tested with AD7993-1 (Parallax Propeller Board of Education)
  • Untested with P2

Limitations

  • Very early in development - may malfunction, or outright fail to build
  • Channels other than first aren't fully implemented yet
  • SCL/SDA on-chip filtering not yet implemented
  • BUSY/ALERT active state not yet implemented
  • Interrupts not yet implemented
  • I2C high-speed mode not yet implemented

About

P8X32A/Propeller, P2X8C4M64P/Propeller 2 driver object for the Analog Devices AD799x-series ADCs

Topics

Resources

License

Stars

Watchers

Forks