Potentiometer to A/D converter

I'm designing a little frequency generator board to use as a signal source for my RF experiments, using the DS1077 frequency synthesizer chip:

formatting link

To keep the board small and the project simple I'd like to use an 8 pin AVR, but after doing some preliminary work it turns out I'll only have 1 pin left on the AVR to use as the "frequency control" input. This seems to preclude using rotary encoders.

The ATTiny25 has a 10 bit DAC, and the DS1077 has a 10 bit frequency control register, and I'd like to be able to access the full range of frequencies in whatever DS0177 prescale range I select (this will be pre-programmed and not selectable from the UI of the device itself). I think it's unlikely that one will be able to move a pot to "hit" all

1024 steps accurately enough without some kind of vernier dial. The best idea I could come up with is to use a "coarse" and a "fine" potentiometer, but I'm still not sure that will give precise enough control. Any methods I'm overlooking? Should I just cave and go for the AVR with more pins? Thanks.
Reply to
Bitrex
Loading thread data ...

s
e

I guess you could do something with i2c, but that'll be more parts and then you might as well go for a bigger AVR

something like attiny24 in 14 pin soic or dip ?

-Lasse

Reply to
langwadt

^^^ ADC

Reply to
Bitrex

That syn chip is pretty bad for RF work. Why not use a real PLL synthesizer, or a DDS chip?

Besides, it violates the First Rule of electronic design: Don't Use Maxim.

John

Reply to
John Larkin

Is there a reasonably-priced DDS chip that uses i2c and would be better for RF work that you would recommend? I would prefer i2c as I have a library already written for that protocol, and SPI is a nightmare to get working on AVRs without dedicated hardware. The DS1077 does have the advantage that a) they're cheap, and b) I have a couple!

Reply to
Bitrex

Use the spare pin as an input to increment a counter in the TINY.... hold it, and the count goes fast....You could also use scl/sda whilst they are not being used for the synth chip. Seems the synth chip only needs 4 bits,leaving 2 bits in the TINY free.... how do you arrive at 1 pin free ??

Reply to
TTman

Step up a chip to get hardware SPI on board and your problems are all solved....... A few setup bytes and just a read/write to sort the data....

Reply to
TTman

--
I've used them and made money in the bargain.

What's _your_ problem?
Reply to
John Fields

Just go for more pins -- 18 pins isn't really that much, and you'll have all sorts of drift and nastiness to contend with if you use a pot/ADC. Why go to all the trouble of digital frequency generation if you're going to mess it up with analog input?

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" was written for you.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

That's a good idea - kind of like setting a digital alarm clock. I get

1 pin free because 2 pins are used for i2c to drive the frequency generating IC and three pins are used for a small display. I suppose if I just upgraded to an ATMega I could ditch the shift register driving the display and have SPI and more pins for control, etc...but I kind of wanted to do the project with an inexpensive 8 pin AVR that I have on hand like the ATTiny.
Reply to
Bitrex

If you have a frequency display, put a pot on the input pin and A/D convert it. Center is 'dead zone', a third above center is 'increment', all the way up is 'increment fast', below center is 'decrement', all the way down is 'decrement fast'. Kinda like an alarm clock setting function. When you center the control, it locks on the displayed value.

Reply to
whit3rd

t
.

many hardware SPIs can be lot more trouble than it is worth unless you need the speed.

when you deal with devices that have strange word lengths, does funny thinks with clock polarity and pin directions when reading and such, it can be a real hassle to get the setup right and maybe change it several time during a frame of data to get it to work

bit banging is so much easier, just sit down with the timing diagram and toggle the pins in the right order

-Lasse

Reply to
langwadt

Perfect. That does away with the drift problems mentioned by Mr. Wescott above, and allows me to use a pot instead of a button. I think that's the arrangement I'll use - thanks!

Reply to
Bitrex

How much money?

Availability, and the fact that they make their parts pin-incompatible with industry standards, by policy.

We had to make a few thousand adapter boards when Maxim discontinued the MAX9690 without warning. We had parts on order and they kept pushing out the promised delivery date until one day they just said we'd never get them. Other people have similar stories.

ftp://jjlarkin.lmi.net/Break2.jpg

ftp://jjlarkin.lmi.net/OnBoard.jpg

*Your* problem is that you will bitch and cluck over anything that I say.

John

Reply to
John Larkin

It's sometimes hard to give them money even when you want to: I've been trying for the past week to purchase an evaluation board from them, and at first didn't get any response whatsoever -- turned out I'd typed in the part number incorrectly, but shouldn't the system then kick that back or at least alert a human somewhere instead of just sending the quote request into a black hole? -- and then they rejected the quote request with the reason, "more information needed." Sheesh! I just want one lousy eval board that I'm more than willing to pay for -- how much information do you need to know to make that happen?!

Did you guys place all those patch boards in-house? Or get a contract manufacturer to do it? ...seems like it wouldn't be particularly cheap either way...

---Joel

Reply to
Joel Koltner

The Avnet rep had the Maxim FAE in tow earlier in the week. He asked if I used any Max part. I said that we did in some legacy stuff, but I didn't design their stuff into new products. He promised that they'd changed their ways. So why should I trust them now where there are so many reliable vendors out there?

Reply to
krw

Once we needed 100 pieces of a part and Max wouldn't ship them. But they had lots of samples available. So I had a bunch of students each order the maximum of 8 samples, and paid them the list price, so each got about $100 for filling out a sample form.

We did them all in-house. We had hundreds of boards in the field, at NIF, and they were beginning to fail. So we had to cycle them through our plant in small batches, replace the 9690s with the kluge boards, retest and recal.

The mode was interesting. The parts failed at high temperature, and as time went on, the failure temp crept down, taking roughly a year to reach room temp. Baking a few hours at 120C would anneal them and fix them for a while. This confused us for a while, because the very same temperature testing that looked for failures was fixing the failures!

Maxim replaced the 9690s with the "drop-in replacement" MAX9691, which wasn't a drop-in at all. So we had to make the adapters, using tiny

9691s and a bunch of discretes. At least Maxim sampled us 3500 pieces of the 9691.

John

Reply to
John Larkin

I'm perfectly happy to reconsider them, as long as somebody else verifies the change. For a few years.

LTC is great. Ditto TI and Analog Devices.

John Fields still likes Maxim.

John

Reply to
John Larkin

Why bother? They made their bed.

LTC is quite proud of their parts. TI shafted us a couple of years ago (DSP), though we still use a lot of their stuff. ADI is top-notch also. I have no need for Maxim.

Because you don't.

Reply to
krw

That saves him a lot of thinking.

John

Reply to
John Larkin

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.