Quantcast
Channel: interfacing – Hackaday
Viewing all articles
Browse latest Browse all 8

Parts: 133MHz-16.2kHz programmable oscillator (DS1077)

$
0
0

cover

The DS1077 is a 5volt, 133MHz to 16kHz programmable clock source. The internal frequency divider is configured over a simple I2C interface, and the chip requires no external parts. Not bad for under $2. We used the Bus Pirate to test this chip before using it in a project. Grab the datasheet (PDF) and follow along.

DS1077, $1.69 direct from Maxim + $10 shipping.

This chip isn’t available at any major distributors yet, but Maxim has them for under $2/each with a flat $10 shipping charge. This is an 8pin SOIC surface mount chip, so we made a small breakout board for testing.

Test circuit

schematic-450

Pin connections

Bus Pirate DS1077 (pin)
SCL SCL (8)
SDA SDA(7)
AUX OUT1 (1)
+5volts Vcc (3)
GND GND, CTRL (4,5,6)

We powered the DS1077 from the Bus Pirate’s 5volt power supply. Two resistors, R1 and R2, pull-up the I2C bus to 5volts when it’s not in use. Capacitor C1 is 0.01uF and C2 is 0.1uF, as recommended by the datasheet. Control pins provide some additional functions, but we bypassed them to ground during our test. Output1 is the primary clock signal pin.

Interfacing

Address Purpose
0b10110000 Default base address (0xB0)
0xB0 Write address
0xB1 Read address

We put the Bus Pirate into I2C mode (M, options: I2C, 100kHz). The external pull-up resistors hold the bus at 5volts, so it’s important to leave the on-board 3.3volt pull-up resistors off (default).

I2C>{0b10110000} <– DS1077 write address
210 I2C START CONDITION
220 I2C WRITE: 0xB0 GOT ACK: YES <– got ACK
240 I2C STOP CONDITION
I2C>

First, we broadcast the DS1077’s address and see if it acknowledges. The address of the DS1077 is 1011, plus three programmable bits (000 by default), and the read (1) or write (0) bit. We got an ACK, so we know that the circuit is working and our connections are good.

Address Bytes Register
0x01 2 10 bit clock divider, n+2 (DIV)
0x02 2 Prescaler, CTRL pin functions. (MUX)
0x0D 1 Address select, EEPROM write control. (BUS)
0x3F 0 Save settings to EEPROM (E2)

The DS1077 is controlled by writing values to the locations shown in the table.

I2C>{0xb0 0x0d 0b00001000} , <–write to BUS register
210 I2C START CONDITION
220 I2C WRITE: 0xB0 GOT ACK: YES <–DS1077 write address
220 I2C WRITE: 0x0D GOT ACK: YES <– BUS register
220 I2C WRITE: 0x08 GOT ACK: YES <– BUS register setting
240 I2C STOP CONDITION
I2C>

By default, the DS1077 saves all changes to the EEPROM. We don’t need this during testing, so we disable it by setting bit 3 (0b1000) of the BUS register (0x0d). The first four bits must be left as 0, the last three bits select the address to accommodate multiple DS1077s on the same I2C bus. See datasheet page 7.

I2C>{0xb0 0x02 0b00011000 0b00000000} <–set the 16bit MUX value
210 I2C START CONDITION
220 I2C WRITE: 0xB0 GOT ACK: YES <–DS1077 write address
220 I2C WRITE: 0x02 GOT ACK: YES <–MUX register
220 I2C WRITE: 0x18 GOT ACK: YES <–data byte 1
220 I2C WRITE: 0x00 GOT ACK: YES <–data byte 2
240 I2C STOP CONDITION
I2C>

The MUX register controls the prescalers, CTRL pin functions, and frequency divider.  We disable the prescaler and CTRL pins, and enable the 10bit frequency divider.  The MUX register is explained on page 5 of the datasheet.

Specific frequencies are generated by dividing the 133MHz reference frequency through the prescalers and a 10bit (1025 level) programmable divider.  The clock is divided by the amount specified in the DIV register, plus two. When DIV=0, the output is 133MHz/2=66MHz.

graph

This scheme gives the best frequency resolution in low ranges, and no steps between 133MHz and 66MHz.

I2C>{0xb0 1 0b11111111 0b11000000} <–DIV=1025
210 I2C START CONDITION
220 I2C WRITE: 0xB0 GOT ACK: YES <–DS1077 write address
220 I2C WRITE: 0x01 GOT ACK: YES <– DIV register
220 I2C WRITE: 0xFF GOT ACK: YES <– bits 9:2
220 I2C WRITE: 0xC0 GOT ACK: YES <– bits 1:0
240 I2C STOP CONDITION
I2C>f  <–do a frequency count
9xx FREQ COUNT ON AUX: 16128Hz (16kHz) <– DS1077 frequency
I2C>

We set all the bits in the DIV register to 1 for maximum frequency division. ‘F’ measures the frequency on the AUX pin, which is connected to the DS1077 clock output. With DIV=1025, the frequency is about 16kHz.

I2C>{0xb0 1 0 0} <– DIV=0, 133MHz divide by 2

9xx FREQ COUNT ON AUX: 0Hz <–66MHz, too fast to count

————-

I2C>{0xb0 1 0 0b10000000} <– DIV=2

9xx FREQ COUNT ON AUX: 3339696Hz (33MHz) <–133MHz/4

————-

I2C>{0xb0 1 0b00000001 0b00000000} <–DIV=4

9xx FREQ COUNT ON AUX: 22192384Hz (22MHz) <–133MHz/6

We can play with the divider and generate a range of frequencies. The output is always equal to the reference frequency (133MHz) divided by DIV+2. The Bus Pirate’s input pin is only capable of measuring about 50MHz, so the highest speeds don’t register. A future version of the Bus Pirate should include a gigahertz prescaler for high frequency measurement.

I2C>{0xb0 0x3f} <–write E2 register

Finally, we can write the E2 register (0x3f) to save these setting in the EEPROM. The DS1077 will now return to these settings at power-on.

Conclusion

The DS1077 simplifies complex clock sources by moving a programmable oscillator and frequency divider into a single chip. It isn’t available from distributors, but you can buy it directly from Maxim. If you need better control of high frequencies, check out the DS1085 with 10kHz steps from 133MHz to 8kHz. The DS1085L is a 3.3volt, 66MHz version available at Digikey.

bread-450


Viewing all articles
Browse latest Browse all 8

Latest Images

Trending Articles





Latest Images