Basic Stamp

I have posted several threads about converting 24Hz pulses to 60Hz basically a 5/2 ratio. I tried a phase locked loop, it sorta works, but my chip count is getting high, and I am thinking about making more of these and selling them if I can write a computer program to resolve wave sound files.

Therefore, since I am not very familiar with micro controllers, I was not planning on using one. However, I remember an engineer friend of mine mentioning the BASIC stamp. I have dabbled in BASIC so, I might approach the problem with this as a solution, especially if I can do it with one or two chips.

I would think that I could sample the 24Hz side for one second. Take that number and use it to divide a much higher frequency quartz reference by some large value of N so that I can get it back down to

60Hz. Therefore my lock time would be one second. I can have an easy lock indication and a fairly fast response to any changes in frequency.

What do you guys/gals think?

Regards, Chris Maness

Reply to
Chris
Loading thread data ...

y

Holy crap, I did not realize that these things are $80 for a one off.

Chris

Reply to
Chris

On a sunny day (Fri, 5 Mar 2010 11:11:38 -0800 (PST)) it happened Chris wrote in :

Years ago I posted a PIC 50 Hz PLL asm code here. Or maybe it was 25 Hz. I would not bother with BASIC, likely way too slow, and way too much resources hungry. A 1$50 12 pin PIC should do...

Reply to
Jan Panteltje

Chris wibbled on Friday 05 March 2010 19:11

Look at the Atmel AVRs (Tiny for smallness or Mega for more pins/features/Memory). Cheap, programmable in C or ASM from a variety of platforms.

I'm an embedded newbie and I have *no* trouble getting them to dance (in C, with which I am familiar), so I reckon anyone could ;->

--
Tim Watts

Managers, politicians and environmentalists: Nature's carbon buffer.
Reply to
Tim Watts

sy

urces hungry.

What are some models that would be good for that application. I see some 8 pin models that are only $2. The only problem is that I have NO clue how to start programming them.

Regards, Chris

Reply to
Chris

On a sunny day (Fri, 5 Mar 2010 12:32:47 -0800 (PST)) it happened Chris wrote in :

I dunno, how many I/O pins, what clock speed, do you need any thing else like an ADC or comparators, EEPROM? I used a 12F629. You need a programmer, can be made yourself for a few $, or buy one for a lot of dollars, like 50$ even. Then you need MPLAB from Microchip, the PC software development environment. I do no tuse that either, I wrote my own programmer software and use Linux and gpasm. You DO need an oscilloscope in my opinion, else no clue what PIC does.

Reply to
Jan Panteltje

y

If your signal is 24Hz, where is the changes in frequency coming from? We need to know more about the spec first.

Reply to
linnix

That algorithm is both awkward and inaccurate.

--
Tim Wescott
Control system and signal processing consulting
 Click to see the full signature
Reply to
Tim Wescott

OK, awkward, inaccurate, and expensive.

--
Tim Wescott
Control system and signal processing consulting
 Click to see the full signature
Reply to
Tim Wescott

and gpasm.

But then you need an oscilloscope for an analog PLL, or no clue what it's doing.

--
Tim Wescott
Control system and signal processing consulting
 Click to see the full signature
Reply to
Tim Wescott

Get a PICkit from DigiKey for $50, learn a bit of assembly (if you know BASIC, and if you're smart enough to make a digital PLL work, then you're smart enough to figure out assembly language programming). Then go for it.

--
Tim Wescott
Control system and signal processing consulting
 Click to see the full signature
Reply to
Tim Wescott

f
t
e

easy

and incomplete. What is the "24Hz pulses" in relation to the "wave sound file"? Do you need to FFT the signal?

Reply to
linnix

It's a continuation of an earlier post, wherein he describes the whole thing.

--
Tim Wescott
Control system and signal processing consulting
 Click to see the full signature
Reply to
Tim Wescott

s,

re

ve

s

of

ght

ake

n easy

I didn't read the earlier post. Can you summarize what he is trying to do?

Reply to
linnix

asy

It comes from the flash contact from a small gauge movie camera. These cameras have very low precision speed control. Ideally they would run at exactly at 24Hz. The design is to record the error on a second track and use a fullcoat deck or a computer to resolve later. The design would do something similar to:

formatting link

Regards, Chris

Reply to
Chris

is

s,

re

ve

s

of

ght

ake

n ea=3D

reso=3D

ment.

Linux and gpasm.

I have a Scope and Frequency Counter. I had the scope, but I bought the the freq. counter for this project.

Chris

Reply to
Chris

formatting link

Patching the URL back together is up to you...

--
Tim Wescott
Control system and signal processing consulting
 Click to see the full signature
Reply to
Tim Wescott

,
e
e

of

ht

ke

easy

OK, why can't you record the 24Hz and a stable 60Hz together and resolve them later. On the other hand, sampling the 24Hz at 1.44KHz rate and recreate a 60Hz is doable with a micro.

Reply to
linnix

rks,

more

olve

was

nd of

might

do

=A0Take

to

an easy

f.

Thanks. I love the part about AVR PICs.

Reply to
linnix

ks,

ore

lve

as

d of

ight

o

Take

o

an easy

Actually, just recording the 24Hz with the micros time base should be enough. You are recording sound digitally, right? =A0

If you need to drive something externally.

Reply to
linnix

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.