Waveform / Pulse Generator?
I am looking for a little help in implementing a project. ·I was hoping someone might give me a few pointers or point me to some sample code? ·Having received my SX development kit, I’m not sure if this would better be implemented in ASM or BASIC.· As a SX neophyte and having messed around with The BASIC Stamp, I’m sure BASIC would be quicker.
·
I’m looking to generate two independent periodic waveforms, each controlled by a pot.
Any shred of info to get me jump started would be appreciated.
Thnx,
-TAC
·
I’m looking to generate two independent periodic waveforms, each controlled by a pot.
- The first waveform would be a PWM signal, 0 to 100% duty cycle, to control a small DC motor.· The duty cycle would be controlled by a pot.
- The second waveform would consist of a single fixed short pulse (~10 usec) followed by a delay of ~50 to 250 milliseconds.· After the delay the waveform would repeat. ·The delay would be controlled by a pot.
Any shred of info to get me jump started would be appreciated.
Thnx,
-TAC
Comments
Would be pretty simple using the two 16-bits in the SX48. SX/B would work fine.
If you want to use the SX28, then an interrupt routine would be needed to make the signals as repeatable as possible. Some assembly in the interrupt routine may be required.
Questions:
1. Is 8-bits (255 levels) of PWM okay ?
2. What resolution is required (1 millisecond ?)
Is the SX48 an option ?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
There are only two guaranteed ways to become weathy.
Spend less than you make.
Make more than you spend.
·
1) 8 bit PWM would be just fine.
2) Other than the short pulse, a resolution of 1 millisecond would also be ok.
As far as the SX48, I figured the timer stuff would be just what the doctor ordred but I already have this SX28 programmer.·
Thanks,
-TAC
In addition to my SX Tech Tool Kit PLUS, what would I need to program the SX48? Looks like just the SX48 Proto Board. At $10 that wouldn't hurt too bad.
-TAC
Yep, if the you have the SX-Key or SX-Blitz all you need is the SX48 proto board. Order a couple, they are really handy.
Let me know when you get them, I'll help you with the code.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
There are only two guaranteed ways to become weathy.
Spend less than you make.
Make more than you spend.
·
Thanks again for all your help.
-TAC
Thnx
-TAC
Hey I wanted to build one of those anyway.
With the new ANALOGIN command and the SX48 timers it should be pretty easy.
I'll get some code and a schematic together soon.
Any chance of making a duplicate for me ?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
There are only two guaranteed ways to become weathy.
Spend less than you make.
Make more than you spend.
·
Bare min I'll let you know where I got the parts.· I ended up paying $1.75 each for the·UV LEDs, ouch!· I'm looking for·a battery powered desk top fountain·right now.··I'll probably buy at least two·of those if I can get a·decent price.
-TAC
p.s.· for those of you that want to know what we are talking about check out the video at:
··· http://cre.ations.net/creation/44·
BTW I just bought 100 UV LEDs off ebay for about 12 cents each including shipping.· I haven't received them yet.· Don't know the quality.
I see a lot of small fountains at the local drug store for around $15.
Chris I.
The SX can provide the pulses for the pump and LEDs, but what are you going to use the drive them ?
You'll need a power transistor or a FET or something since the SX cannot supply enough current to drive either of them.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
There are only two guaranteed ways to become weathy.
Spend less than you make.
Make more than you spend.
·
There is a schmatic on http://cre.ations.net/creation/44.
Post Edited (crites) : 9/15/2006 12:21:24 PM GMT
Where can I find some info on this new ANALOGIN command?
Since picking up a couple battery powered desk fountains this weekend (Rite-Aid) I now have all the parts I need.··
-TAC
The "What's New" file has some info. Basically it the same as this: http://www.sxlist.com/techref/ubicom/lib/io/adc_vp.htm
Looking at ADC1 on the diagram, RC.6 would be the output pin and RC.7 would be the input pin.
You would just tie one end of your pot to GND and the other end to +5 and connect the wiper to the 10K going into the circuit. MAKE SURE YOU DEFINE THE INPUT PIN AS CMOS THRESOLD like "InPin PIN RC.7 CMOS"
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
There are only two guaranteed ways to become weathy.
Spend less than you make.
Make more than you spend.
Post Edited (Bean (Hitt Consulting)) : 9/18/2006 1:57:50 AM GMT