Repeating circuit: 1, 2, 3, 1, 2, 3...

On Mon, 10 Dec 2012 16:24:20 -0600, John Fields
<jfields@austininstruments.com> wrote:

On Mon, 10 Dec 2012 16:56:22 -0500, default wrote:

On Mon, 10 Dec 2012 08:55:20 -0600, John Fields
jfields@austininstruments.com> wrote:

On Mon, 10 Dec 2012 09:08:46 -0500, default wrote:

On Sun, 09 Dec 2012 10:42:20 -0600, John Fields
jfields@austininstruments.com> wrote:

On Sun, 09 Dec 2012 08:35:41 -0500, default wrote:

On Sat, 8 Dec 2012 07:54:33 -0800 (PST), Don Gilmore
eromlignod1@att.net> wrote:

Guys:

I'm an ME working on a small project where I'd like to do something ridiculously simple, yet I keep coming up with complex solutions. There is probably a simple way to do this that I am missing.

What I'd like to do is cycle between three outputs--let's say three discrete LED's--in a continuous circle using a square wave clock input. If the LED's are numbered 1, 2 and 3, I want them to cycle 123123123123... The input would be the square wave from a function generator and I'd like to control the speed of the LED's by the frequency.

I keep coming up with complicated ideas like using a counter that outputs to a decoder. Surely there is an easier way?

Don
Kansas City

A single 8 pin Picaxe programmed to flash leds - no external parts
save current limiting for the leds or drivers for the leds if you need
watts of output. You can flash up to four with an 8 pin chip and do
any fancy flash sequence you can imagine.

Cost is ~$2-3

http://www.picaxe.com/Circuit-Creator/Light-and-LCD-Outputs/LED/

shows the basic code, you'd add two other outputs to the code

---
If the Picaxe price is 2-3$ (no PCB, LEDs, or current limiting
resistor), then the Digi-Key 100 piece price for the 4017 is 39 cents
each, and for the 175 with the diode and the pull-up, 36.7 cents.

Yes, if cost is the overwhelming consideration.

---
Well, there _is_ a little more to it than that.

For instance, the programming cable which if only used once would add
about USD16 to the cost of the project, and the time used to climb the
learning curve for a one-off would be pretty much wasted compared to
the time used to implement a simple hardware solution.


Maybe. These things can be addictive so there's a good chance the
cable would be used again (and it's only serial port, two resistors
with a DB9 connector - the USB to RS 232 will add a few bucks if one's
computer lacks a serial port - then $3-$20 if you shop around - I have
some usb to serial TTL adapters from ebay that were $2.50)

The learning curve? I don't know. I had a smidgen of exposure to
basic programming years ago and had it up and flashing 4 leds in less
than an hour - The time went towards getting windoze to recognize the
usb adapter not learning the syntax .

Programming examples abound- flashing a led is the equivalent of
"hello world," when it comes to these things. Going from one led to
four or more is just a matter of duplicating a few lines of code (copy
and paste and change the pin numbers).

---
Actually, no.

An index is also needed in order to keep track of what needs to be
flashed next and what needs to be done when the last LED in the string
is flashed.

I usually implement the index as a status register for the machine,
separate from the processor's own status register.
You're over thinking this a bit

main:
high 0
pause 500
low 0
high 1
pause 500
low 1
high 2
pause 500
low 2
goto main

Sequentially flash three leds with an "on" time of 1/2 second each.

main:
high 0
pause 500
high 1
pause 500
high 2
pause 500
low 0
low 1
low 2
pause 500
goto main

Sequentially turn on each led for 1/2 second then turn them all off
and start over - like auto turn signals in the 60's. There are other
ways to do the same thing...

This isn't like programming a bare pic; this has a basic interpreter.
Easy Peasy.

---

But I understand your point. Easier to do what one already
understands, and is comfortable with, than learn something new.

---
Then you misunderstand and, from your tone, perhaps on purpose.
 
On Mon, 10 Dec 2012 18:12:28 -0500, default wrote:

On Mon, 10 Dec 2012 16:24:20 -0600, John Fields
jfields@austininstruments.com> wrote:

On Mon, 10 Dec 2012 16:56:22 -0500, default wrote:

On Mon, 10 Dec 2012 08:55:20 -0600, John Fields
jfields@austininstruments.com> wrote:

On Mon, 10 Dec 2012 09:08:46 -0500, default wrote:

On Sun, 09 Dec 2012 10:42:20 -0600, John Fields
jfields@austininstruments.com> wrote:

On Sun, 09 Dec 2012 08:35:41 -0500, default wrote:

On Sat, 8 Dec 2012 07:54:33 -0800 (PST), Don Gilmore
eromlignod1@att.net> wrote:

Guys:

I'm an ME working on a small project where I'd like to do something ridiculously simple, yet I keep coming up with complex solutions. There is probably a simple way to do this that I am missing.

What I'd like to do is cycle between three outputs--let's say three discrete LED's--in a continuous circle using a square wave clock input. If the LED's are numbered 1, 2 and 3, I want them to cycle 123123123123... The input would be the square wave from a function generator and I'd like to control the speed of the LED's by the frequency.

I keep coming up with complicated ideas like using a counter that outputs to a decoder. Surely there is an easier way?

Don
Kansas City

A single 8 pin Picaxe programmed to flash leds - no external parts
save current limiting for the leds or drivers for the leds if you need
watts of output. You can flash up to four with an 8 pin chip and do
any fancy flash sequence you can imagine.

Cost is ~$2-3

http://www.picaxe.com/Circuit-Creator/Light-and-LCD-Outputs/LED/

shows the basic code, you'd add two other outputs to the code

---
If the Picaxe price is 2-3$ (no PCB, LEDs, or current limiting
resistor), then the Digi-Key 100 piece price for the 4017 is 39 cents
each, and for the 175 with the diode and the pull-up, 36.7 cents.

Yes, if cost is the overwhelming consideration.

---
Well, there _is_ a little more to it than that.

For instance, the programming cable which if only used once would add
about USD16 to the cost of the project, and the time used to climb the
learning curve for a one-off would be pretty much wasted compared to
the time used to implement a simple hardware solution.


Maybe. These things can be addictive so there's a good chance the
cable would be used again (and it's only serial port, two resistors
with a DB9 connector - the USB to RS 232 will add a few bucks if one's
computer lacks a serial port - then $3-$20 if you shop around - I have
some usb to serial TTL adapters from ebay that were $2.50)

The learning curve? I don't know. I had a smidgen of exposure to
basic programming years ago and had it up and flashing 4 leds in less
than an hour - The time went towards getting windoze to recognize the
usb adapter not learning the syntax .

Programming examples abound- flashing a led is the equivalent of
"hello world," when it comes to these things. Going from one led to
four or more is just a matter of duplicating a few lines of code (copy
and paste and change the pin numbers).

---
Actually, no.

An index is also needed in order to keep track of what needs to be
flashed next and what needs to be done when the last LED in the string
is flashed.

I usually implement the index as a status register for the machine,
separate from the processor's own status register.

You're over thinking this a bit

main:
high 0
pause 500
low 0
high 1
pause 500
low 1
high 2
pause 500
low 2
goto main

Sequentially flash three leds with an "on" time of 1/2 second each.

main:
high 0
pause 500
high 1
pause 500
high 2
pause 500
low 0
low 1
low 2
pause 500
goto main

Sequentially turn on each led for 1/2 second then turn them all off
and start over - like auto turn signals in the 60's. There are other
ways to do the same thing...

This isn't like programming a bare pic; this has a basic interpreter.
Easy Peasy.
---
And, expensive, compared to programming a bare pic.
---

But I understand your point. Easier to do what one already
understands, and is comfortable with, than learn something new.

---
Then you misunderstand and, from your tone, perhaps on purpose.
--
JF
 
On Mon, 10 Dec 2012 17:47:05 -0600, John Fields
<jfields@austininstruments.com> wrote:

And, expensive, compared to programming a bare pic.
Sure. All engineering is the art of compromise....

Learning machine language and programming a bare pic - now that is a
learning curve.
 
On 12/10/2012 6:12 PM, default wrote:
On Mon, 10 Dec 2012 16:24:20 -0600, John Fields
jfields@austininstruments.com> wrote:

On Mon, 10 Dec 2012 16:56:22 -0500, default wrote:

On Mon, 10 Dec 2012 08:55:20 -0600, John Fields
jfields@austininstruments.com> wrote:

On Mon, 10 Dec 2012 09:08:46 -0500, default wrote:

On Sun, 09 Dec 2012 10:42:20 -0600, John Fields
jfields@austininstruments.com> wrote:

On Sun, 09 Dec 2012 08:35:41 -0500, default wrote:

On Sat, 8 Dec 2012 07:54:33 -0800 (PST), Don Gilmore
eromlignod1@att.net> wrote:

Guys:

I'm an ME working on a small project where I'd like to do something ridiculously simple, yet I keep coming up with complex solutions. There is probably a simple way to do this that I am missing.

What I'd like to do is cycle between three outputs--let's say three discrete LED's--in a continuous circle using a square wave clock input. If the LED's are numbered 1, 2 and 3, I want them to cycle 123123123123... The input would be the square wave from a function generator and I'd like to control the speed of the LED's by the frequency.

I keep coming up with complicated ideas like using a counter that outputs to a decoder. Surely there is an easier way?

Don
Kansas City

A single 8 pin Picaxe programmed to flash leds - no external parts
save current limiting for the leds or drivers for the leds if you need
watts of output. You can flash up to four with an 8 pin chip and do
any fancy flash sequence you can imagine.

Cost is ~$2-3

http://www.picaxe.com/Circuit-Creator/Light-and-LCD-Outputs/LED/

shows the basic code, you'd add two other outputs to the code

---
If the Picaxe price is 2-3$ (no PCB, LEDs, or current limiting
resistor), then the Digi-Key 100 piece price for the 4017 is 39 cents
each, and for the 175 with the diode and the pull-up, 36.7 cents.

Yes, if cost is the overwhelming consideration.

---
Well, there _is_ a little more to it than that.

For instance, the programming cable which if only used once would add
about USD16 to the cost of the project, and the time used to climb the
learning curve for a one-off would be pretty much wasted compared to
the time used to implement a simple hardware solution.


Maybe. These things can be addictive so there's a good chance the
cable would be used again (and it's only serial port, two resistors
with a DB9 connector - the USB to RS 232 will add a few bucks if one's
computer lacks a serial port - then $3-$20 if you shop around - I have
some usb to serial TTL adapters from ebay that were $2.50)

The learning curve? I don't know. I had a smidgen of exposure to
basic programming years ago and had it up and flashing 4 leds in less
than an hour - The time went towards getting windoze to recognize the
usb adapter not learning the syntax .

Programming examples abound- flashing a led is the equivalent of
"hello world," when it comes to these things. Going from one led to
four or more is just a matter of duplicating a few lines of code (copy
and paste and change the pin numbers).

---
Actually, no.

An index is also needed in order to keep track of what needs to be
flashed next and what needs to be done when the last LED in the string
is flashed.

I usually implement the index as a status register for the machine,
separate from the processor's own status register.

You're over thinking this a bit
And it appears you're under thinking it. The op wants to control
the leds with an external generator:
"The input would be the square wave from a function generator and
I'd like to control the speed of the LED's by the frequency."

I don't see where you or David has addressed that with the picaxe
idea in any of the posts in this thread.

Ed

main:
high 0
pause 500
low 0
high 1
pause 500
low 1
high 2
pause 500
low 2
goto main

Sequentially flash three leds with an "on" time of 1/2 second each.

main:
high 0
pause 500
high 1
pause 500
high 2
pause 500
low 0
low 1
low 2
pause 500
goto main

Sequentially turn on each led for 1/2 second then turn them all off
and start over - like auto turn signals in the 60's. There are other
ways to do the same thing...

This isn't like programming a bare pic; this has a basic interpreter.
Easy Peasy.

---

But I understand your point. Easier to do what one already
understands, and is comfortable with, than learn something new.

---
Then you misunderstand and, from your tone, perhaps on purpose.
 
On Sat, 15 Dec 2012 00:06:15 -0500, ehsjr <ehsjr@nospamverizon.net>
wrote:

On 12/10/2012 6:12 PM, default wrote:
On Mon, 10 Dec 2012 16:24:20 -0600, John Fields
jfields@austininstruments.com> wrote:

On Mon, 10 Dec 2012 16:56:22 -0500, default wrote:

On Mon, 10 Dec 2012 08:55:20 -0600, John Fields
jfields@austininstruments.com> wrote:

On Mon, 10 Dec 2012 09:08:46 -0500, default wrote:

On Sun, 09 Dec 2012 10:42:20 -0600, John Fields
jfields@austininstruments.com> wrote:

On Sun, 09 Dec 2012 08:35:41 -0500, default wrote:

On Sat, 8 Dec 2012 07:54:33 -0800 (PST), Don Gilmore
eromlignod1@att.net> wrote:

Guys:

I'm an ME working on a small project where I'd like to do something ridiculously simple, yet I keep coming up with complex solutions. There is probably a simple way to do this that I am missing.

What I'd like to do is cycle between three outputs--let's say three discrete LED's--in a continuous circle using a square wave clock input. If the LED's are numbered 1, 2 and 3, I want them to cycle 123123123123... The input would be the square wave from a function generator and I'd like to control the speed of the LED's by the frequency.

I keep coming up with complicated ideas like using a counter that outputs to a decoder. Surely there is an easier way?

Don
Kansas City

A single 8 pin Picaxe programmed to flash leds - no external parts
save current limiting for the leds or drivers for the leds if you need
watts of output. You can flash up to four with an 8 pin chip and do
any fancy flash sequence you can imagine.

Cost is ~$2-3

http://www.picaxe.com/Circuit-Creator/Light-and-LCD-Outputs/LED/

shows the basic code, you'd add two other outputs to the code

---
If the Picaxe price is 2-3$ (no PCB, LEDs, or current limiting
resistor), then the Digi-Key 100 piece price for the 4017 is 39 cents
each, and for the 175 with the diode and the pull-up, 36.7 cents.

Yes, if cost is the overwhelming consideration.

---
Well, there _is_ a little more to it than that.

For instance, the programming cable which if only used once would add
about USD16 to the cost of the project, and the time used to climb the
learning curve for a one-off would be pretty much wasted compared to
the time used to implement a simple hardware solution.


Maybe. These things can be addictive so there's a good chance the
cable would be used again (and it's only serial port, two resistors
with a DB9 connector - the USB to RS 232 will add a few bucks if one's
computer lacks a serial port - then $3-$20 if you shop around - I have
some usb to serial TTL adapters from ebay that were $2.50)

The learning curve? I don't know. I had a smidgen of exposure to
basic programming years ago and had it up and flashing 4 leds in less
than an hour - The time went towards getting windoze to recognize the
usb adapter not learning the syntax .

Programming examples abound- flashing a led is the equivalent of
"hello world," when it comes to these things. Going from one led to
four or more is just a matter of duplicating a few lines of code (copy
and paste and change the pin numbers).

---
Actually, no.

An index is also needed in order to keep track of what needs to be
flashed next and what needs to be done when the last LED in the string
is flashed.

I usually implement the index as a status register for the machine,
separate from the processor's own status register.

You're over thinking this a bit

And it appears you're under thinking it. The op wants to control
the leds with an external generator:
"The input would be the square wave from a function generator and
I'd like to control the speed of the LED's by the frequency."

I don't see where you or David has addressed that with the picaxe
idea in any of the posts in this thread.

Ed


main:
high 0
pause 500
low 0
high 1
pause 500
low 1
high 2
pause 500
low 2
goto main

Sequentially flash three leds with an "on" time of 1/2 second each.

main:
high 0
pause 500
high 1
pause 500
high 2
pause 500
low 0
low 1
low 2
pause 500
goto main

Sequentially turn on each led for 1/2 second then turn them all off
and start over - like auto turn signals in the 60's. There are other
ways to do the same thing...

This isn't like programming a bare pic; this has a basic interpreter.
Easy Peasy.

---

But I understand your point. Easier to do what one already
understands, and is comfortable with, than learn something new.

---
Then you misunderstand and, from your tone, perhaps on purpose.

You're right. I missed that. No problem though, there's still one
unused pin that must be used as an input.
 

Welcome to EDABoard.com

Sponsor

Back
Top