40hz to 400hz PWM ?
bennettdan
Posts: 614
Hello Forum
··
··· I am new to Prop and i am trying to output a single 40hz to 400hz square wave with 1-99% duty cycle and i can not seem to find info on how to do this. I have looked through the OBEX and found that the code examples are hard for me to follow being new to the Prop. Thanks
··
··· I am new to Prop and i am trying to output a single 40hz to 400hz square wave with 1-99% duty cycle and i can not seem to find info on how to do this. I have looked through the OBEX and found that the code examples are hard for me to follow being new to the Prop. Thanks
Comments
All you need to do is include the object in your project then call the start method with your pin, frequency, and duty (misspelled dudy).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!
·http://www.parallax.com/Portals/0/Downloads/docs/prod/prop/PELabsFunBook-v1.1.pdf
Also the Application note AN001 on this page:
·http://www.parallax.com/tabid/832/Default.aspx
is a good read.
Jim
I will read the Propeller Education Kit Lab ...Jim
I believe Hanno's "12 Blocks" is a very good canidate for this. Download it and you'll be up and running in less than 5 minutes...... it's THAT intuitive!
Cheers,
Peter (pjv)
I was going to suggest 12Blocks also, but I didn't think there was a trial period, but there is! 30 days.
2nd the 12 Blocks!!
Jim
Start (1,50,400)
Would this be a 50% duty cycle 400 hz PWM signal on Pin 1 if I understand your obj.
So what you want is
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!