PDA

View Full Version : Looking To Swap To Propeller



Matt.Clark.228
05-26-2010, 05:50 AM
I currently use a VEX system, and a BS2, and i am temped to switch to the propeller for its greater speed and functionality, however, before i do, there are some things that i have found little documentation on that i want to be sure that i will have access to if i buy this chip.

PWM/Pulse Support
Serial TX and RX In Program
Analog Out

Are all of these part of the propeller system, and if so, does anyone have to code to incorporate them? Also, does anyone have code for using a PING ultrasonic range finder with the propeller?
Thanks
~Matt

Sapieha
05-26-2010, 05:53 AM
Hi Matt.Clark.228.

To all that You can find code in OBX

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


Sapieha

hover1
05-26-2010, 05:59 AM
Welcome Matt,

Take a look at the Object Exchange: http://obex.parallax.com/

There are over 450 objects to chose from, and from your list, there are many to pick from.

Use the search funtion in the OBEX for you particular area of interest. I'm sure you will find enough info to start with. Then come back and ask specifics.

Jim


Matt.Clark.228 said...
I currently use a VEX system, and a BS2, and i am temped to switch to the propeller for its greater speed and functionality, however, before i do, there are some things that i have found little documentation on that i want to be sure that i will have access to if i buy this chip.

PWM/Pulse Support
Serial TX and RX In Program
Analog Out

Are all of these part of the propeller system, and if so, does anyone have to code to incorporate them? Also, does anyone have code for using a PING ultrasonic range finder with the propeller?
Thanks
~Matt

Post Edited (hover1) : 5/25/2010 10:04:53 PM GMT

JonnyMac
05-26-2010, 06:36 AM
Matt,

If you're happy with the BS2, you'll be thrilled with the Propeller. It does things differently, and a whole lot better. ObEx is a good resource, but be careful not to get too dependent -- none of the code (mine incuded), is vetted by anyone but the programmer that posted it. Translation: use at your own risk.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA

Timothy D. Swieter
05-26-2010, 07:13 AM
Matt - what are you looking for in terms of analog out? There isn't specific analog out hardware on the Propeller like there may be on other microcontrollers. One solution though is that you use a PWM or similar output and then filter it through a cap/resistor to get a smooth analog voltage.

Welcome to the Propeller. The forum will be a great place for help as you learn about the Propeller and get started with the change over. For serial I usually use the FullDuplexSerial object, it is in the exchange or in the library included with the Propeller Tool.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com (http://www.brilldea.com) - Prop Blade, LED Painter, RGB LEDs, 3.0" 16:9 LCD Composite video display, eProto for SunSPOT, PropNET, PolkaDOT-51
www.tdswieter.com (http://www.tdswieter.com)

localroger
05-26-2010, 07:26 AM
To give some more specific responses than the others have:

1. PWM/Pulse Support

This is supported both in software and in hardware. In software you can use WAITCNT to generate extremely accurate pulses even in Spin. In hardware you can use the cog's counter/timers (each cog has two) to generate extremely accurate pulses and waveforms without further software intervention once the control registers are set up. (But using the counters is a bit of arcana even to a lot of advanced prop guys, if you want to do something someone hasn't done for you already in the obex.)

2. Serial TX and RX In Program

The venerable original object for this is fullduplexserial; there have been many improvements on it including a version that supports *four* serial ports using only one cog. If you're using a BS2 now you will find fullduplexserial entirely adequate. It uses its own cog and has its own buffers which can collect and send serial data while your main code is doing other stuff.

3. Analog Out

This requires the counter/timers but there are many examples in the obex of using the DUTY mode to generate square waves of selectable duty cycle, which you filter through a R/C network (exactly like you'd do with a basic stamp) to generate an analog voltage (only it works better, since the waveform is higher frequency, more regular, and continuous). What this means is that once you set up the counter control registers, you adjust the value of the output just by writing a value to a system variable (one of the counter registers). Everything else is done for you in hardware; the duty cycle will change and with it the filtered analog output voltage. Easy as pie.

I am also pretty sure someone recently posted a PING object either in the forums or the obex. (For stuff like that, it sometimes works better to search google with "site:forums.parallax.com" as part of the search term.)

Good luck with your project!

Zap-o
05-26-2010, 09:47 AM
Matt

With these forums and the propeller anything is possible in my opinion.

ErNa
05-26-2010, 03:17 PM
Swap!!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
cmapspublic3.ihmc.us:80/servlet/SBReadResourceServlet?rid=1181572927203_421963583_ 5511&partName=htmltext (http://cmapspublic3.ihmc.us:80/servlet/SBReadResourceServlet?rid=1181572927203_421963583_ 5511&partName=htmltext)
Hello Rest Of The World
Hello Debris
Install a propeller and blow them away http://forums.parallax.com/images/smilies/wink.gif