photodiodes with stamp, misc improvements to Stamp
hi all, Im a newbie but am·very·impressed with parallax & the stamp.
I want to use photodiodes with the stamp.
parallax sells a "blue enhanced photodiode" for $10 but they dont
have any info on how to interface it.
http://www.parallax.com/detail.asp?product_id=350-00012
I see the IR photodetector just hooks in directly to an input port using a 220ohm resistor. would it be ok to do the same with a generic photodiode?
some other things I was considering in my project & noticed
a) no assembly language is possible thru pbasic. I would like to encourage parallax to consider some limited assembly language support in some future version
b) no direct control over interrupts. Id really like to control an interrupt. plz consider support for interrupts in the future.
c) no good support for timing. yet the stamp has a timer, its just off limits to pbasic. Id really like a high-resolution, 16-bit (even 24bit would be nice)·timer/counter for my app.
also, how about
d) would parallax consider open sourcing Pbasic so that outside developers can contribute. I urge them to consider this increasingly mainstream model that is being embraced by Sun wrt to java and also lego mindstorms. could lead to significantly increased interest in Stamp and major improvements in functionality.
·
I want to use photodiodes with the stamp.
parallax sells a "blue enhanced photodiode" for $10 but they dont
have any info on how to interface it.
http://www.parallax.com/detail.asp?product_id=350-00012
I see the IR photodetector just hooks in directly to an input port using a 220ohm resistor. would it be ok to do the same with a generic photodiode?
some other things I was considering in my project & noticed
a) no assembly language is possible thru pbasic. I would like to encourage parallax to consider some limited assembly language support in some future version
b) no direct control over interrupts. Id really like to control an interrupt. plz consider support for interrupts in the future.
c) no good support for timing. yet the stamp has a timer, its just off limits to pbasic. Id really like a high-resolution, 16-bit (even 24bit would be nice)·timer/counter for my app.
also, how about
d) would parallax consider open sourcing Pbasic so that outside developers can contribute. I urge them to consider this increasingly mainstream model that is being embraced by Sun wrt to java and also lego mindstorms. could lead to significantly increased interest in Stamp and major improvements in functionality.
·
Comments
1. Parallax is not about to "open source" the PIC code that implements their PBasic interpreter. That's their intellectual property (IP), which is what people pay for. They've "open sourced" everything else -- schematics of the BS2, all their boards, and have some of the best tutorials in the business. Even their IDE is free, for heaven's sakes. Even a manufacturer as prestigious as Sun is now having problems because they've open sourced their language, OS, and now hardware.
2. I believe Michael Predko has published LOTS of PIC algorithms if you want to try to implement your own PIC 'Stamp' clone.
3. No assembly makes programming the device simpler, as well as makes better use of the limited EEPROM. I believe it also protects their IP.
4. I believe they're using the PIC timer resources to enable the various 'pause' and baud-rate settings. You CAN buy an external, 8-pin 50 mSec timer chip to generate a clock signal you can use to synchronize your code.
5. I'm not sure what you mean by "photodiode".
6. One of their chips DOES have a "poll-mode", which lets you implement pseudo-interrupts at the Basic level. Since the system is a Basic Interpreter built into a PIC, that's probably the best they can do.
7. Note the BS2 was built as a small, very reliable, simple to program micro device. It's extremely good at that. If you want assemly, there's always the SX/Basic. THAT gets you 50 MIPS, interrupts, assembly, you name it.
the SX is a nice series and a bargain price. I found a exactly a technique
I was looking for [noparse][[/noparse]and what I had in mind with my remarks on Stamp limitations] on
p95 of this SX assembly language tutorial by al williams. in the chapter on
interrupts which is actually pretty advanced
http://www.parallax.com/dl/docs/books/BegAssemforSX.pdf
he describes how to effectively get an 8byte clock counter with
20ns resolution!! 1 byte for the CC register, 2 bytes for microseconds, 2 bytes for milliseconds, 1 byte for seconds, 1 byte for minutes, 1 byte for hours.
the sad/ironic thing is, from what I can tell, something like this is possible with PIC assembly language using a similar technique, because it also has a CC-like interrupt.
but no support for such a cool technique in PBasic.
the reason I asked, if PBasic was open source I would consider adding this feature myself. I guess that the CC register is used for the RCTIME command and some other basic commands. but what if one had a mode where the CC-based commands are disabled and a multi-byte counter was enabled that the code could access? a nice feature I would think.
but I totally understand about the whole thing of Stamps being more simple & entry-level than the other chips.
As an alternative, you should look into the Propeller which can be programmed in a high level language (SPIN) as well as in assembly language. It has much more memory than most microcontrollers and is quite fast in assembly language (50ns per instruction in 8 parallel processors).
www.parallax.com/html_pages/downloads/siccurriculum/documentation_sic_curriculum.asp
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com