Maximum square wave frequency with adjustable on/off time...
fiveslo
Posts: 40
I trying to construct a "if you could call it" function generator that will allow me to output a square wave, or at least close to it, adjustable via programming, or what I'd like to do is update it via pushbutton via another Stamp pin to increment the frequency.· I have researched the PULSOUT command but not sure if I'm reading the specs correctly from the BS2 documentation manual.. I think that PULSOUT will give me maximum of 500kHz output frequency?· Not sure if I'm reading, or figuring that correctly....· If the PULSOUT will give me a max of 500kHz, that would be more than adequate for what I'm trying to accomplish.. also how would I go about changing the on and off times of the square wave at lets say 100Hz and then at 200kHz... Thanks.. Rob
Comments
Do you know if the SX is capable of the higher frequencies.. this is option since I have an SX key to program the SX with?????· 4kHz is definitely not enough... was hoping for at least 300kHz....· if the SX can do it, do you know of an "external" IC and/or circuit that can get me up to the 300kHz level... input would greatly be appreciated... Rob
Post Edited (Mike Green) : 8/9/2008 1:35:15 PM GMT
PWM 0,128,255
and on the original Stamp that is a square wave at 111.3 kHz. The frequency is higher on the speedier Stamps like the BS2p and 'px. It was not clear from your message if you need variable duty cycle. Or is it just to switch the cycles on and off, or alternate between one high and one low frequency? It is possible to achieve 100 Hz frequency with a program loop.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
I'm going to use a BS2p and would like to "see" 5kHz to 300kHz, a close to true 50% duty cycle square wave... for starts that is, from what I read in your response the 300kHz is probably pushing it beyond its means, what is the maximum the BS2p will give in a square wave 50% duty cycle?· For now its time to hit the Pro Dev Board to see what kind of nightmare I can create...
PWM 0,128,255
with a BS2p, and from what I saw on the o-scope, the results came back with 200KHz, or close to it, does this sound right?· It is a 50% duty cycle square wave, with some "ringing", however this is tolerable... My serial SX-Key went south, since it gets warm now and won't allow me to communicate with the SX thru my Pro dev board... oh well, Ordered the new USB version.. hopefully to try what kind of results I'll get from a SX28...