Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

LMX2592: Cannot change frequency, chip always outputs the same frequency

$
0
0

Part Number: LMX2592

I am trying to program the chip so that it outputs frequency at 1.8 GHz, this is the code I used to program it. After programming the registers, there will always be a signal at 2.8 GHz which never changes no matter what frequency I intend to set.

from gpiozero import LED, Button
from time import sleep
import spidev
import sys

assert sys.version_info >= (3,0)

# Constants here
XTAL_EN_PIN = 27
VCO_EN_PIN = 22
VCO_SYNC_OUT_PIN = 17
VCO_SPI_BUS = 0
VCO_SPI_DEVICE = 0
DELAY = 0.1 # orig val is 0.1

xtal_en = LED(XTAL_EN_PIN)

vco_en = LED(VCO_EN_PIN)
vco = spidev.SpiDev()
vco.open(VCO_SPI_BUS, VCO_SPI_DEVICE)
vco.max_speed_hz = 1953000

running = True

print("initiation")
xtal_en.on()
sleep(DELAY)
vco_en.on()
sleep(DELAY)

init_sequence = [0x002216, 0x00221c, 0x010808,0x020500,0x041943, 0x0728b2,0x081084,0x090302, 0x0a10d8,0x0b0018,0x0c7001,0x0d4000,0x0e018c,0x130965,0x14012c,0x162300,0x178842,0x180509,0x190000,0x1c2924,0x1d0084,0x1e0034,0x1f0401,0x20210a,0x212a0a,0x22c3ea,0x2302af,0x2404aa,0x254000,0x260036,0x278204,0x280000,0x2903e8,0x2a0000,0x2b0000,0x2c0000,0x2d0000,0x2e0fa3,0x2f00cf,0x3003fc,0x3b0000,0x3d0001,0x3e00000,0x400077,0x00221c]

init_sequence = init_sequence 

for cmd in init_sequence:
    vco.xfer2([(cmd>>16)&0xff, (cmd>>8)&0xff, (cmd&0xff)]);
    sleep(DELAY)


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>