I/O expansion co-processor options?
Mickster
Posts: 2,693
in Propeller 1
I would like to offload certain lower priority tasks from the Prop that require PWM outputs and analog inputs along with digital I/O. I have been considering the Picaxe 20M2, only because I have one laying around. Thinking of stringing 2 or 3 of these devices as I2C slaves.
What alternatives are recommended?
What alternatives are recommended?
Comments
Now I am designing a system with 40+ processors and it just makes good sense to make them all Props. That way the software development environment is the same for all of them plus the fact too that Props are the only processor I know of whereby I can use an I/O pin as it suits me, not according to a complicated function pinout which by the way you never seem to get the mix you want anyway.
I know I can use all these beaut little ARM doodads but for the sake of a couple of dollars extra I am so much better off with the Prop than with all these enticing little wonders.
I need to drive a few hydraulic-valve solenoids (PWM) and receive 0-10v feedback from linear transducers. I am talking rough positioning, in this case. The Picaxe pins are very flexible/configurable and apparently the ADCs are 10 bit (although 8 bit would suffice). On-chip programming could also be useful for in-the-field tweaking.
$4 chip and a tantalum capacitor adds it to your project.
Edit: Just checked mmbasic.com and it looks like the answer is "yes"! Actually, MMBasic looks very complete. I'll have to brush off one of my MMC boards and try it out.
Subroutine Arguments
Defined subroutines can have arguments (sometimes called parameter lists). In the definition of the subroutine they look like this:
SUB MYSUB (arg1, arg2$, arg3)
<statements>
<statements>
END SUB
or this?
Defined Functions
Defined functions are similar to defined subroutines with the main difference being that the function is used to return a value in an expression. For example, if you wanted a function to select the maximum of two values you could define:
FUNCTION Max(a, b)
IF a > b
Max = a
ELSE
Max = b
ENDIF
END FUNCTION
Plus you can add your own functions written in C - CFunctions.
You can collect all this into a library and extend the language.
The LIBRARY Feature
Using the LIBRARY feature it is possible to add user written features to MMBasic and make them permanent and part of the language. For example, you might have written a series of subroutines and functions that perform sophisticated bit manipulation; these could be stored as a library and become part of MMBasic and perform the same as other built in functions that are already part of the language.
It has become a very powerful BASIC implementation with LOTS of usable memory now on the PIC32MX170 - but you do need to buy a $4 chip and a capacitor,
$4? You've got to be kidding. That's a blocking issue for me. I can't spend more than $3.99! :-)
It looks like they have you covered:
There's also a LIBRARY DELETE command. Maybe you should check out the 91page PDF in the ZIP file? Of course, I've already copied a good portion of it to this thread!!
$3.99? Maybe in quantity???
That's it, never making a decision without consulting this forum again.
Many thanks!
It will set you back some portion of your lunch money to try it though!
If you want the total retro BASIC experience, try a MMC w/ Propeller as I/O coprocessor for the uMite. A fun BASIC platform if you like retro computing.
If you just need a modern BASIC engine, just put the PIC32 on a breadboard and hook up some serial connections.
What package(s) and price points ?
If you want DIP, and price is less important, then the Microchip host mentioned above is hard to go past.
That packs a lot into DIP28.
If price matters more, (sub $1) and SMD packages are ok, then the SiLabs EFM8 series give the most Peripheral for your dollar. The new EFM8BB3 include 12b DACs as well as 12b ADCs, and are pin-compatible with the LB1 which has 14b ADC. With SPI / UART x2 / i2c x 2, that's a lot of IO expansion connection choices.
BB3 can also output 4.802~4.998MHz signal to clock the Prop, if needed, from the 49MHz osc.
EFM8 series Packages available, in order of decreasing pin-pitch, are
SO16N
TQFP32
QSOP24
QFN20/24/32 in 0.5mm and 0.4mm & even a 0.4mm BGA ~1.7mm sq.
Heck, I'm already getting carried away and looking at the new 64pin and upcoming 100pin Micromite+ to conserve the Prop's precious resources. :-D