Skip to main content

Interface with a Stanford Research Systems CG635 Synthesized Clock Generator

Project description

SRS-CG635 Synthesized Clock Generator Interface

Interface with a Stanford Research Systems CG635 Synthesized Clock Generator.

Installation

$ pip install cg635-clock-generator

Supported Features

  • Frequency control
  • Phase control
  • CMOS output levels and standards control
  • Q/*Q outputs levels and standards control
  • RS-232 communication

Usage

from cg635_clock_generator import CG635ClockGenerator, CG635Communication

clock_generator = CG635ClockGenerator(
        communication_type=CG635Communication.RS232,
        serial_device='/dev/ttyUSB0',
)

print(clock_generator.get_identification())

FREQ = 10e6
PHASE = 90.0

clock_generator.set_frequency(FREQ)

frequency = clock_generator.get_frequency()
print(f"Frequency is {frequency} Hz")

clock_generator.set_phase(PHASE)

phase = clock_generator.get_phase()
print(f"Phase is {phase} degrees")

Running tests on hardware

During normal development and for the CI the unit test suite is executed on a mock device using pyvisa-mock. It is also possible to run tests on real hardware connected to your system. Just call:

$ uv run poe test_hil

By default it will try to connect to /dev/ttyUSB0, but you can specify a different device using the --hil_serial_device option:

$ uv run poe test_hil --hil_serial_device /dev/ttyUSB1

Status

Currently only the RS-232 communication has been tested on the device.

Documentation

For more details of the module API, check the online documentation.

Feeling like contributing?

Great! Check the Contributing Guide to get started.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cg635_clock_generator-1.1.2.tar.gz (420.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cg635_clock_generator-1.1.2-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file cg635_clock_generator-1.1.2.tar.gz.

File metadata

  • Download URL: cg635_clock_generator-1.1.2.tar.gz
  • Upload date:
  • Size: 420.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cg635_clock_generator-1.1.2.tar.gz
Algorithm Hash digest
SHA256 054dbafbd43ae3d4eb80867c611052574a10b094e3b9533b58ae048dc0bc90b1
MD5 e480c29e0850e69c470ff09668292889
BLAKE2b-256 661324f634cbcdfd872a6cc8836a854afd6da8261ccc6a7dc67c655a6d085657

See more details on using hashes here.

Provenance

The following attestation bundles were made for cg635_clock_generator-1.1.2.tar.gz:

Publisher: ci.yml on leandrolanzieri/cg635-clock-generator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cg635_clock_generator-1.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for cg635_clock_generator-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5934cc23989ab30a66891840edb954cbb97f0b7402335e72a6f85ca5c60f5d44
MD5 abdfe1b11360bcd0947a3c336cb4b169
BLAKE2b-256 891ab787b823fb85eb4643bc6a4aff47ed22d8fbcac71495ee7ac82b62a12260

See more details on using hashes here.

Provenance

The following attestation bundles were made for cg635_clock_generator-1.1.2-py3-none-any.whl:

Publisher: ci.yml on leandrolanzieri/cg635-clock-generator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page