Actually, at this point he'll probably just buy an Arduino and not look back...
I have a few Atmel alternatives on my desk. Sometimes solving the Propeller jigsaw puzzle just doesn't make sense.
@RossH,
You are too quick to foo-foo the serial device solution. When I first ran Javelin code on Propeller from EEPROM I saw 80ms+ function call times. When I added a 2KB HUB cache, that dropped to 3ms. While that's still not so impressive, running the same test straight from HUB ram takes 2ms. Of course Java is not as close to the metal as C so even 3ms is acceptable there. Bottom line is I found the cached EEPROM solution on Propeller actually runs Java code 2x faster than the Javelin in some cases.
Having the ability to execute 128KB programs and still have all the same pins for I/O is very valuable. And for time critical situations, COGs are still available to run PASM at 20MIPS.
The business logic solution would be much slower than the atmega32+ but better for code density and COG speed code.
It's all based on the Wiring project seen here: wiring.org.co.
If you want to see the actual library code, you can download the Arduino IDE in a zip file, and browse through the folders: arduino.cc/en/Main/Software.
Okay, in all fairness and full disclosure, there is a good amount of C++ under the hood, while what's exposed to the end user is more akin to C. I haven't delved into the reasoning for the C++, but if was there already, why not use it for creating classes, etc.?
That said, I probably should have said "replicate the libraries", by which I mean to the extent possible, create a set of high level functions that work syntactically exactly like the Arduino functions. Then develop/modify functions as appropriate to account for the multi-processing features of the propeller. I would personally give the nod to adding a new function or #define if it was choice between that or adding additional parameters to the current Arduino functions.
Jazzed and Kevin: I'm not sure if I should love you or hate you.
I have never looked into the Arduino before. Just now I had a quick scan through some Arduino documentation.
Well bloody hell. The Arduino API uses C++. Not only that it uses C++ in a most minimal way. In fact in the same minimalistic way that I have adopted for the Zog library on the Propeller, libzog. See my recent postings of Zog. Which basically mimics the Spin concept of objects.
So for example in Arduino application code we see things like this:
void setup() {
Serial.begin(9600);
Serial1.begin(9600);
}
void loop() {
// read from port 0, send to port 1:
if (Serial.available()) {
int inByte = Serial.read();
Serial1.print(inByte, BYTE);
}
// read from port 1, send to port 0:
if (Serial1.available()) {
int inByte = Serial1.read();
Serial.print(inByte, BYTE);
}
}
Note the objects used for Serial and Serial1. They are statically declared somewhere in the Arduino lib.
In the Zog lib I have things like this:
FullDuplexSerialPlus uart(31, 30, 0, baud); // Create a new FDX object on pins 31, 30 with given baud rate.
uart.tx('A'); // Send a character through FDX
inbyte = uart.rx(); // Receive a char from FDX
Of course libzog is more flexible because I can have as many serial ports as I have Cogs and pins to run them.
So it looks like Zog has finally found a use and you guys have now set me on the task of implementing the Arduino API on the Propeller.
Looks like what it needs is to define a basic Propeller hardware set up that provides all the services of a Arduino board. And a Zog Arduino library to go with it.
Any one want to help? I know nothing of Arduino yet.
Can we think of a better name? I'm still wretching....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Several other chips have been put onto Arduino form-factor boards, even a PIC with something like the Arduino API. I know someone who is working on an ARM version.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
The magic part here is that Zog can run your Arduino code on the Prop whilst at the same time allowing you to mix in a whatever Spin and PASM objects you would like to use, if you so desire.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
I happen to have a couple of Arduino's in my "to work on" pile; I was considering making a "ProDuino"... only thing stopping me was writing a compatibility layer.
Sounds like I no longer have an excuse.
Consider this the pre-announcement for ProDuino !
I am starting a new thread for discussing the feature list.
heater said...
Jazzed and Kevin: I'm not sure if I should love you or hate you.
I have never looked into the Arduino before. Just now I had a quick scan through some Arduino documentation.
Well bloody hell. The Arduino API uses C++. Not only that it uses C++ in a most minimal way. In fact in the same minimalistic way that I have adopted for the Zog library on the Propeller, libzog. See my recent postings of Zog. Which basically mimics the Spin concept of objects.
So for example in Arduino application code we see things like this:
void setup() {
Serial.begin(9600);
Serial1.begin(9600);
}
void loop() {
// read from port 0, send to port 1:
if (Serial.available()) {
int inByte = Serial.read();
Serial1.print(inByte, BYTE);
}
// read from port 1, send to port 0:
if (Serial1.available()) {
int inByte = Serial1.read();
Serial.print(inByte, BYTE);
}
}
Note the objects used for Serial and Serial1. They are statically declared somewhere in the Arduino lib.
In the Zog lib I have things like this:
FullDuplexSerialPlus uart(31, 30, 0, baud); // Create a new FDX object on pins 31, 30 with given baud rate.
uart.tx('A'); // Send a character through FDX
inbyte = uart.rx(); // Receive a char from FDX
Of course libzog is more flexible because I can have as many serial ports as I have Cogs and pins to run them.
So it looks like Zog has finally found a use and you guys have now set me on the task of implementing the Arduino API on the Propeller.
Looks like what it needs is to define a basic Propeller hardware set up that provides all the services of a Arduino board. And a Zog Arduino library to go with it.
Any one want to help? I know nothing of Arduino yet.
Can we think of a better name? I'm still wretching....
heater said...
Yes, but I have a house full of Propellers.
The magic part here is that Zog can run your Arduino code on the Prop whilst at the same time allowing you to mix in a whatever Spin and PASM objects you would like to use, if you so desire.
I was just pointing out that there is precedent for that sort of thing, the ARM version will run Arduino code. The more the merrier!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
I know this may ruffle some feathers, but I have to say this:
I first started working with the Prop back in November of last year, planned to use it for an 1802 emulator.· As part of working on some table based jumps it became clear that executing instructions from hub memory was a possibility.· Intrigued by the thought I did some searching on this forum to see what I could find and of course found LMM.· I was glad to see it was being done, and to an even greater degree than what I was thinking.· I was however taken aback by Bill having somewhat of an attitude that if I recall correctly said he reserved the right to patent it at a later point if he wanted and that he wanted full credit for the idea.· In my opinion the concept is pretty obvious based on the architecture of the prop, but I do give Bill credit for formalizing the idea.· Bill's attitude however is a recurring theme, as seen in his comment below.
In my mind this may be one of the things turning commercial users away from the prop.··It seems to me that LMM somewhat parallels·the SCRT (Standard Call and Return Technique) that was published by RCA for the 1802, in that it provides a way to overcome some shortcomings in the hardware by using novel coding approaches.·
I don't mean this as being disrespectful to Bill, he has obviously made a lot of contributions to the prop community, but at this point I think he is holding it back.
Maybe a solution is for Parallax to purchase the rights to the technique from Bill and then publish the concept as an accepted way to execute pasm from hub memory with no strings attached.
C. Wardell
Bill Henning said...
Achm... as the guy who came up with LMM, I get to name it [noparse]:)[/noparse] so LMM it stays ... not "hub pasm"
I just read this thread, and I agree with pretty much everything you said; however you are all under estimating the potential speed of LMM. I have yet to see a good implementation of FCACHE with any of the compilers. Free up at leat 64 longs for an FCACHE area, compile tight inner loops to direct pasm code for it, watch most of the speed difference between PASM and LMM PASM dissapear.
Want proofs? Implement strcpy() etc, memcpy() etc as "pure LMM" and also as FCACHED'd LMM. Look for the tons of small loops (that don't call functions) in C code, FCACHE those.
RossH said...
@Christof,
No worries - C is not suitable for everybody, and not needed by everybody! However, I would be interested in what you found difficult to get working - if I can make it easier I will do so.
Using either LMM PASM or "cog" PASM is possible with Catalina - but it may not be as simple as it is with PropBasic (I don't know bacause I've not actually used PropBasic) - check out the section on page 43 in the latest Catalina Reference Manual titled "USING PASM WITH CATALINA".
I absolutely agree there will always be a need for PASM in most embedded applications - video drivers are a good example.
Ross.
P.S. Maybe we should stop calling it LMM PASM and start calling it "hub" PASM - as opposed to the traditional "cog" PASM.
Post Edited (ctwardell) : 7/15/2010 3:12:15 PM GMT
heater, you might as well go ahead and get it over with and buy an Arduino...
JonnyMac's Propeller Platform is heavily based on the Arduino Diecimila/Duemilanove. I'm not sure why he didn't follow suit with the USB power+programming + separate power jack, since I think this is one of the Arduino's best features.
I'm not sure what Zog can do, but if you can get a "virtual Arduino" running on the Propeller - i.e. emulate the pin functions of of the Arduino - and still have some cogs left over, well, that would be too cool.
So yeah, if you're serious about the project, I'd be willing to lend a hand.
BTW, the C++ for the Prop thread is a very good read.
It seems to me that LMM somewhat parallels the SCRT (Standard Call and Return Technique) that was published by RCA for the 1802, in that it provides a way to overcome some shortcomings in the hardware by using novel coding approaches.
I was wondering when/where the prior art would be found [noparse]:)[/noparse]
Bill is a genuinely nice and enthusiastic fellow. He is also a very good speaker.
I doubt the enforceability of some of his IP claims though.
The SCRT that I referred to is not prior art for LMM, just a parallel in that it is a software techique that evolved as a way to work around a "shortcoming" of the hardware.· In the case of SCRT RCA published it as a standard way to call and return from subroutines on the 1802.·
C.W.
jazzed said...
ctwardell said...
It seems to me that LMM somewhat parallels the SCRT (Standard Call and Return Technique) that was published by RCA for the 1802, in that it provides a way to overcome some shortcomings in the hardware by using novel coding approaches.
I was wondering when/where the prior art would be found [noparse]:)[/noparse]
Bill is a genuinely nice and enthusiastic fellow. He is also a very good speaker.
I doubt the enforceability of some of his IP claims though.
Bill: "ProDuino" marginally better than "Zogurino" but I'm going to puke again. I keep thinking of "urinal" for some reason.
Anyway you beat me to it, I was going to start an "Arduino on the Propeller anyone?" thread, so let's continue there.
ctwardell: I think Bill does deserve full credit for the idea of LMM on the Propeller. For sure no one mentioned it here prior to him. If not here where else would it have been mentioned? If anyone was sitting at home nurturing the idea in private that's to bad.
I have to disagree with your statement "In my opinion the concept is pretty obvious based on the architecture of the prop,". Apparently it was so obvious that the architect of the Propeller himself, Chip Gracey, had not thought of it. Of course someone, somewhere, is quite likely to propose the idea eventually but as it happens it was Bill first.
As for a patent on LMM. Well, seems now a days you can patent pretty much any random thought, original or not, published or not, useful or not. Defending the patent after you have it is another question.
Kevin: "heater, you might as well go ahead and get it over with and buy an Arduino."
Strangely enough I was having that thought on the way home from work. Dammit, see what you have done?
I will look more into the Arduino support libs. So far I only see pin wiggling, UART and possibly timers. Pins and timers Zog can do from the cog it is running in, as does Spin, UART will require another cog. I have yet to see anything there that Zog cannot do except for the raw performance. Is Zog's byte code interpreter system fast enough to satisfy a serious Arduino user?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Standard Libraries
•EEPROM - reading and writing to "permanent" storage
•Ethernet - for connecting to the internet using the Arduino Ethernet Shield
•Firmata - for communicating with applications on the computer using a standard serial protocol.
•LiquidCrystal - for controlling liquid crystal displays (LCDs)
•Servo - for controlling servo motors
•SoftwareSerial - for serial communication on any digital pins
•Stepper - for controlling stepper motors
•Wire - Two Wire Interface (TWI/I2C) for sending and receiving data over a net of devices or sensors.
With all respect, I suspect you did not read the whole convoluted thread, all my replies etc., and misunderstood my intentions.
If you look back, I did reserve the right - in order to use it as a "defensive" patent, to stop people from demanding money for others to use it.
What I do ask for, and often do not get, is credit for having come up with the concept.
All I ever required from anyone was an acknowledgement in the code, and documentation for any product that uses LMM, but I do not want the acknowledgement to be buried in tiny unreadable print. I would also like a copy or two of any commercial product that uses LMM, more from a personal desire to see where my idea was taken than anything.
When ImageCraft wanted to make ICC, Chip and Richard approached me seeking to license it. All I required was credit in the documentation, source, and web page - plus some copies of his compiler. Richard was willing to pay thousands to license - I did not ask for any money at all.
Again, with respect, I should not even have to ask for appropriate credit- it is a standard, required attribution in all academic research and development.
It is my opinion that people who find it wrong that I require credit have an ulterior motive for objecting to crediting me.
The reason I ask for credit is that I contribute a LOT to the community, and by getting credit, I am essentially attempting to get more well paying commercial projects.
As far as patentability, at this point that is moot as the one year patent window has expired, which fulfilled my primary objective that NO ONE ELSE could patent LMM.
At the time, I am sure I could have gotten a patent - the USPTO granted a patent on the XOR operation to Xerox, and too many other patents that are too ludicrous to consider; including business case ones. I was trying to protect the community from patent sharks.
However, if you think that it is inappropriate that the inventor of a technique gets to name the technique, and expects to be credited... then I don't know what to say.
I find your suggestion that I am holding the propeller back offensive.
I have been promoting the Propeller actively since 2006, and have made many contributions, including LMM, several drivers and VMCOG, significantly advancing the state of the art for the Propeller, and I am certain causing notable increases in sales.
Regards,
Bill
ctwardell said...
I know this may ruffle some feathers, but I have to say this:
I first started working with the Prop back in November of last year, planned to use it for an 1802 emulator. As part of working on some table based jumps it became clear that executing instructions from hub memory was a possibility. Intrigued by the thought I did some searching on this forum to see what I could find and of course found LMM. I was glad to see it was being done, and to an even greater degree than what I was thinking. I was however taken aback by Bill having somewhat of an attitude that if I recall correctly said he reserved the right to patent it at a later point if he wanted and that he wanted full credit for the idea. In my opinion the concept is pretty obvious based on the architecture of the prop, but I do give Bill credit for formalizing the idea. Bill's attitude however is a recurring theme, as seen in his comment below.
In my mind this may be one of the things turning commercial users away from the prop. It seems to me that LMM somewhat parallels the SCRT (Standard Call and Return Technique) that was published by RCA for the 1802, in that it provides a way to overcome some shortcomings in the hardware by using novel coding approaches.
I don't mean this as being disrespectful to Bill, he has obviously made a lot of contributions to the prop community, but at this point I think he is holding it back.
Maybe a solution is for Parallax to purchase the rights to the technique from Bill and then publish the concept as an accepted way to execute pasm from hub memory with no strings attached.
C. Wardell
Bill Henning said...
Achm... as the guy who came up with LMM, I get to name it [noparse]:)[/noparse] so LMM it stays ... not "hub pasm"
I just read this thread, and I agree with pretty much everything you said; however you are all under estimating the potential speed of LMM. I have yet to see a good implementation of FCACHE with any of the compilers. Free up at leat 64 longs for an FCACHE area, compile tight inner loops to direct pasm code for it, watch most of the speed difference between PASM and LMM PASM dissapear.
Want proofs? Implement strcpy() etc, memcpy() etc as "pure LMM" and also as FCACHED'd LMM. Look for the tons of small loops (that don't call functions) in C code, FCACHE those.
RossH said...
@Christof,
No worries - C is not suitable for everybody, and not needed by everybody! However, I would be interested in what you found difficult to get working - if I can make it easier I will do so.
Using either LMM PASM or "cog" PASM is possible with Catalina - but it may not be as simple as it is with PropBasic (I don't know bacause I've not actually used PropBasic) - check out the section on page 43 in the latest Catalina Reference Manual titled "USING PASM WITH CATALINA".
I absolutely agree there will always be a need for PASM in most embedded applications - video drivers are a good example.
Ross.
P.S. Maybe we should stop calling it LMM PASM and start calling it "hub" PASM - as opposed to the traditional "cog" PASM.
It is not prior art for LMM, but possibly for the call/return mechanism of the Prop if you squint just right [noparse]:)[/noparse]
Tsk tsk... and i thought you realized my intention was (this line was written tongue firmly in cheek, I know you got it)
a) prevent someone else from patenting it
b) that people know I came up with it
c) I was hip deep in GrokLaw's coverage of SCO's attempt to extort linux, and wanted to preclude similar on the prop
Enforceability was also moot; as mere first publishing, and establishing that I *would* get a defensive patent if someone tried to patent it proved sufficient [noparse]:)[/noparse]
jazzed said...
ctwardell said...
It seems to me that LMM somewhat parallels the SCRT (Standard Call and Return Technique) that was published by RCA for the 1802, in that it provides a way to overcome some shortcomings in the hardware by using novel coding approaches.
s
I was wondering when/where the prior art would be found [noparse]:)[/noparse]
Bill is a genuinely nice and enthusiastic fellow. He is also a very good speaker.
I doubt the enforceability of some of his IP claims though.
Bill, I just double checked our doc and usually I am quite good at acknowledge "outside" contribution to our compilers, but it appears that I goofed on this one. When I update the doc, I will be sure to include a credit and thanks to your idea.
And I don't recall if I have sent you a license or not. If I have goofed on that also, my apology. Please download a copy of our demo and email me richard @imagecraft.com with the HW-ID you see when doing Help->"Register Software" and I will send you a license.
Bill Henning: "However, if you think that it is inappropriate that the inventor of a technique gets to name the technique, and expects to be credited..."
Actually Bill, I've just realized that as the inventor of LMM you don't get to name it. We do !
How so?
Well in mathematics significant formulae and proofs tend to get named after the supposed discoverer. That is the mathematical communities way of ensuring the discover gets honour and credit for ever. You know, Pascal's triangle, Fibonacci sequence, Fourier Transform, Cantor's diagonal method, G
ImageCraft said...
Bill, I just double checked our doc and usually I am quite good at acknowledge "outside" contribution to our compilers, but it appears that I goofed on this one. When I update the doc, I will be sure to include a credit and thanks to your idea.
And I don't recall if I have sent you a license or not. If I have goofed on that also, my apology. Please download a copy of our demo and email me richard @imagecraft.com with the HW-ID you see when doing Help->"Register Software" and I will send you a license.
You got a nice chuckle out of me.... i still like LMM better [noparse]:)[/noparse]
Regarding your earlier message - and you may have replied in the ProDuino thread, I will check that next:
- let's keep that thread going, or start another for the software side - your choice. Unless I get enough pre-orders to have 1000 boards, or Parallax somehow sponsors the board, it is not financially feasible is the analysis I posted shows.
- thanks for your support [noparse]:)[/noparse]
- I have both 3.3V and 5V Arduino boards waiting for me to have time to play with them in my "in" box.
heater said...
Bill Henning: "However, if you think that it is inappropriate that the inventor of a technique gets to name the technique, and expects to be credited..."
Actually Bill, I've just realized that as the inventor of LMM you don't get to name it. We do !
How so?
Well in mathematics significant formulae and proofs tend to get named after the supposed discoverer. That is the mathematical communities way of ensuring the discover gets honour and credit for ever. You know, Pascal's triangle, Fibonacci sequence, Fourier Transform, Cantor's diagonal method, G
Bill Henning: "However, if you think that it is inappropriate that the inventor of a technique gets to name the technique, and expects to be credited..."
Actually Bill, I've just realized that as the inventor of LMM you don't get to name it. We do !
How so?
Well in mathematics significant formulae and proofs tend to get named after the supposed discoverer. That is the mathematical communities way of ensuring the discover gets honour and credit for ever. You know, Pascal's triangle, Fibonacci sequence, Fourier Transform, Cantor's diagonal method, G
Bill, I think you just missed an opportunity to shake down Richard for ProDuino seed money. Oh well...
HMM can also be used for Hub Memory Model.
One thing that the Propeller needs is a decent "whitepaper" explaining all of the LMM/XMM/EMM/etc. that are out there right now. The threads don't stay on page 1 long enough to sort through it all.
Effectively the same thing as they were going after other people using XOR for non-destructive cursors. I still can't believe the patent examiner let it pass!
Leon said...
Bill:
Xerox didn't patent the XOR operation, just the use of it to blink a cursor. It still seems a bit silly, though.
LOL! I never intended to shake Richard down, I was certain his omission was accidental and would be corrected.
I've actually been sitting on two articles that were accepted for magazine publication that clearly document LMM, because I was waiting for time to finish the third (and possibly fourth) in the series. The mag wanted the whole series done before they would start publishing - understandable, as I have not written for them before.
For XMM, each hardware interface needs its unique explanation, or everyone can just use VMCOG [noparse]:)[/noparse]
p.s.
This discussion reminded me of the people who gave me grief for not giving away the Morpheus design for free. I could never quite get how they expected me to make a living...
Kevin Wood said...
Bill, I think you just missed an opportunity to shake down Richard for ProDuino seed money. Oh well...
HMM can also be used for Hub Memory Model.
One thing that the Propeller needs is a decent "whitepaper" explaining all of the LMM/XMM/EMM/etc. that are out there right now. The threads don't stay on page 1 long enough to sort through it all.
At some point James Watt realized that his steam engine should not just have a linear motion, which was basically just used to move water pump plungers up and down in coal mines at the time, but should be able to turn shafts and drive the machines of the coming industrial revolution.
The obvious way to do that is to attach a crank to a shaft and attach the other end of the crank to the piston. James was stuck there though because James Pickard had the patent on this "obvious" idea. Obvious because it had been used in treadle lathes and such forever. So Watt had to go another more complex and expensive way with sun and planet gears.
Alternatively Watt had patents of his own. With everything locked down like that progress in steam power was held up for decades.
Now, non of these steam guys even invented anything we would call an "engine" now a days. Damn things would originally go up and down repeatedly only if someone was there to open and close valves at the right moment at each end of the stroke. Hardly an "engine".
A young boy whose job it was to do this got bored with it and dreamed up a system of strings and leavers to do it for him. Now we have an "engine" that actually runs by itself. I would say that was a monumental breakthrough in the history of technology. It was the first application of "feedback".
Did that boy get a patent? Or a reward? Or recognition? Are any engine valve systems named after him? No.
That boy was Humphrey Potter.
P.S. When you study control theory they tell you the Watt Governor for steam engine speed control was the first use of feedback. I maintain Humphrey Potter and his valve gear was the first use of feedback.
I trot this out on every patent debate. Sorry if you have heard it all before.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Comments
@RossH,
You are too quick to foo-foo the serial device solution. When I first ran Javelin code on Propeller from EEPROM I saw 80ms+ function call times. When I added a 2KB HUB cache, that dropped to 3ms. While that's still not so impressive, running the same test straight from HUB ram takes 2ms. Of course Java is not as close to the metal as C so even 3ms is acceptable there. Bottom line is I found the cached EEPROM solution on Propeller actually runs Java code 2x faster than the Javelin in some cases.
Having the ability to execute 128KB programs and still have all the same pins for I/O is very valuable. And for time critical situations, COGs are still available to run PASM at 20MIPS.
The business logic solution would be much slower than the atmega32+ but better for code density and COG speed code.
@heater, the Arduino is completely open source so you can find and build it all. I was recently looking at these: www.nongnu.org/avr-libc and code.google.com/p/arduino/source/browse/#svn/trunk/core
The KEY to Arduino of course is that it requires GCC like most modern C source [noparse]:)[/noparse] So Zogurino is very possible.
Cheers,
--Steve
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Pages: Propeller JVM
I think I'm going to puke.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Pages: Propeller JVM
You can see the Arduino reference here: arduino.cc/en/Reference/Extended.
There are code examples here: arduino.cc/en/Tutorial/HomePage.
It's all based on the Wiring project seen here: wiring.org.co.
If you want to see the actual library code, you can download the Arduino IDE in a zip file, and browse through the folders: arduino.cc/en/Main/Software.
Okay, in all fairness and full disclosure, there is a good amount of C++ under the hood, while what's exposed to the end user is more akin to C. I haven't delved into the reasoning for the C++, but if was there already, why not use it for creating classes, etc.?
That said, I probably should have said "replicate the libraries", by which I mean to the extent possible, create a set of high level functions that work syntactically exactly like the Arduino functions. Then develop/modify functions as appropriate to account for the multi-processing features of the propeller. I would personally give the nod to adding a new function or #define if it was choice between that or adding additional parameters to the current Arduino functions.
I have never looked into the Arduino before. Just now I had a quick scan through some Arduino documentation.
Well bloody hell. The Arduino API uses C++. Not only that it uses C++ in a most minimal way. In fact in the same minimalistic way that I have adopted for the Zog library on the Propeller, libzog. See my recent postings of Zog. Which basically mimics the Spin concept of objects.
So for example in Arduino application code we see things like this:
Note the objects used for Serial and Serial1. They are statically declared somewhere in the Arduino lib.
In the Zog lib I have things like this:
Of course libzog is more flexible because I can have as many serial ports as I have Cogs and pins to run them.
So it looks like Zog has finally found a use and you guys have now set me on the task of implementing the Arduino API on the Propeller.
Looks like what it needs is to define a basic Propeller hardware set up that provides all the services of a Arduino board. And a Zog Arduino library to go with it.
Any one want to help? I know nothing of Arduino yet.
Can we think of a better name? I'm still wretching....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
Post Edited (Leon) : 7/15/2010 1:38:20 PM GMT
The magic part here is that Zog can run your Arduino code on the Prop whilst at the same time allowing you to mix in a whatever Spin and PASM objects you would like to use, if you so desire.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Sounds like I no longer have an excuse.
Consider this the pre-announcement for ProDuino !
I am starting a new thread for discussing the feature list.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
Las - Large model assembler Largos - upcoming nano operating system
I was just pointing out that there is precedent for that sort of thing, the ARM version will run Arduino code. The more the merrier!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
I first started working with the Prop back in November of last year, planned to use it for an 1802 emulator.· As part of working on some table based jumps it became clear that executing instructions from hub memory was a possibility.· Intrigued by the thought I did some searching on this forum to see what I could find and of course found LMM.· I was glad to see it was being done, and to an even greater degree than what I was thinking.· I was however taken aback by Bill having somewhat of an attitude that if I recall correctly said he reserved the right to patent it at a later point if he wanted and that he wanted full credit for the idea.· In my opinion the concept is pretty obvious based on the architecture of the prop, but I do give Bill credit for formalizing the idea.· Bill's attitude however is a recurring theme, as seen in his comment below.
In my mind this may be one of the things turning commercial users away from the prop.··It seems to me that LMM somewhat parallels·the SCRT (Standard Call and Return Technique) that was published by RCA for the 1802, in that it provides a way to overcome some shortcomings in the hardware by using novel coding approaches.·
I don't mean this as being disrespectful to Bill, he has obviously made a lot of contributions to the prop community, but at this point I think he is holding it back.
Maybe a solution is for Parallax to purchase the rights to the technique from Bill and then publish the concept as an accepted way to execute pasm from hub memory with no strings attached.
C. Wardell
Post Edited (ctwardell) : 7/15/2010 3:12:15 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
JonnyMac's Propeller Platform is heavily based on the Arduino Diecimila/Duemilanove. I'm not sure why he didn't follow suit with the USB power+programming + separate power jack, since I think this is one of the Arduino's best features.
I'm not sure what Zog can do, but if you can get a "virtual Arduino" running on the Propeller - i.e. emulate the pin functions of of the Arduino - and still have some cogs left over, well, that would be too cool.
So yeah, if you're serious about the project, I'd be willing to lend a hand.
BTW, the C++ for the Prop thread is a very good read.
Bill is a genuinely nice and enthusiastic fellow. He is also a very good speaker.
I doubt the enforceability of some of his IP claims though.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Pages: Propeller JVM
The SCRT that I referred to is not prior art for LMM, just a parallel in that it is a software techique that evolved as a way to work around a "shortcoming" of the hardware.· In the case of SCRT RCA published it as a standard way to call and return from subroutines on the 1802.·
C.W.
Not true. In the US, there's a year's grace.
Anyway you beat me to it, I was going to start an "Arduino on the Propeller anyone?" thread, so let's continue there.
ctwardell: I think Bill does deserve full credit for the idea of LMM on the Propeller. For sure no one mentioned it here prior to him. If not here where else would it have been mentioned? If anyone was sitting at home nurturing the idea in private that's to bad.
I have to disagree with your statement "In my opinion the concept is pretty obvious based on the architecture of the prop,". Apparently it was so obvious that the architect of the Propeller himself, Chip Gracey, had not thought of it. Of course someone, somewhere, is quite likely to propose the idea eventually but as it happens it was Bill first.
As for a patent on LMM. Well, seems now a days you can patent pretty much any random thought, original or not, published or not, useful or not. Defending the patent after you have it is another question.
Kevin: "heater, you might as well go ahead and get it over with and buy an Arduino."
Strangely enough I was having that thought on the way home from work. Dammit, see what you have done?
I will look more into the Arduino support libs. So far I only see pin wiggling, UART and possibly timers. Pins and timers Zog can do from the cog it is running in, as does Spin, UART will require another cog. I have yet to see anything there that Zog cannot do except for the raw performance. Is Zog's byte code interpreter system fast enough to satisfy a serious Arduino user?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Standard Libraries
•EEPROM - reading and writing to "permanent" storage
•Ethernet - for connecting to the internet using the Arduino Ethernet Shield
•Firmata - for communicating with applications on the computer using a standard serial protocol.
•LiquidCrystal - for controlling liquid crystal displays (LCDs)
•Servo - for controlling servo motors
•SoftwareSerial - for serial communication on any digital pins
•Stepper - for controlling stepper motors
•Wire - Two Wire Interface (TWI/I2C) for sending and receiving data over a net of devices or sensors.
John Abshier
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
With all respect, I suspect you did not read the whole convoluted thread, all my replies etc., and misunderstood my intentions.
If you look back, I did reserve the right - in order to use it as a "defensive" patent, to stop people from demanding money for others to use it.
What I do ask for, and often do not get, is credit for having come up with the concept.
All I ever required from anyone was an acknowledgement in the code, and documentation for any product that uses LMM, but I do not want the acknowledgement to be buried in tiny unreadable print. I would also like a copy or two of any commercial product that uses LMM, more from a personal desire to see where my idea was taken than anything.
When ImageCraft wanted to make ICC, Chip and Richard approached me seeking to license it. All I required was credit in the documentation, source, and web page - plus some copies of his compiler. Richard was willing to pay thousands to license - I did not ask for any money at all.
Again, with respect, I should not even have to ask for appropriate credit- it is a standard, required attribution in all academic research and development.
It is my opinion that people who find it wrong that I require credit have an ulterior motive for objecting to crediting me.
The reason I ask for credit is that I contribute a LOT to the community, and by getting credit, I am essentially attempting to get more well paying commercial projects.
As far as patentability, at this point that is moot as the one year patent window has expired, which fulfilled my primary objective that NO ONE ELSE could patent LMM.
At the time, I am sure I could have gotten a patent - the USPTO granted a patent on the XOR operation to Xerox, and too many other patents that are too ludicrous to consider; including business case ones. I was trying to protect the community from patent sharks.
However, if you think that it is inappropriate that the inventor of a technique gets to name the technique, and expects to be credited... then I don't know what to say.
I find your suggestion that I am holding the propeller back offensive.
I have been promoting the Propeller actively since 2006, and have made many contributions, including LMM, several drivers and VMCOG, significantly advancing the state of the art for the Propeller, and I am certain causing notable increases in sales.
Regards,
Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
Las - Large model assembler Largos - upcoming nano operating system
Post Edited (Bill Henning) : 7/15/2010 6:36:41 PM GMT
It is not prior art for LMM, but possibly for the call/return mechanism of the Prop if you squint just right [noparse]:)[/noparse]
Tsk tsk... and i thought you realized my intention was (this line was written tongue firmly in cheek, I know you got it)
a) prevent someone else from patenting it
b) that people know I came up with it
c) I was hip deep in GrokLaw's coverage of SCO's attempt to extort linux, and wanted to preclude similar on the prop
As far as enforceability - Xerox tried to enforce the XOR patent on graphics cursors, there are lots of idiotic business case patents (see Bilski, www.groklaw.net/staticpages/index.php?page=2009022607324398)
Enforceability was also moot; as mere first publishing, and establishing that I *would* get a defensive patent if someone tried to patent it proved sufficient [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
Las - Large model assembler Largos - upcoming nano operating system
Post Edited (Bill Henning) : 7/15/2010 6:45:14 PM GMT
And I don't recall if I have sent you a license or not. If I have goofed on that also, my apology. Please download a copy of our demo and email me richard @imagecraft.com with the HW-ID you see when doing Help->"Register Software" and I will send you a license.
Thanks.
Actually Bill, I've just realized that as the inventor of LMM you don't get to name it. We do !
How so?
Well in mathematics significant formulae and proofs tend to get named after the supposed discoverer. That is the mathematical communities way of ensuring the discover gets honour and credit for ever. You know, Pascal's triangle, Fibonacci sequence, Fourier Transform, Cantor's diagonal method, G
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
Las - Large model assembler Largos - upcoming nano operating system
You got a nice chuckle out of me.... i still like LMM better [noparse]:)[/noparse]
Regarding your earlier message - and you may have replied in the ProDuino thread, I will check that next:
- let's keep that thread going, or start another for the software side - your choice. Unless I get enough pre-orders to have 1000 boards, or Parallax somehow sponsors the board, it is not financially feasible is the analysis I posted shows.
- thanks for your support [noparse]:)[/noparse]
- I have both 3.3V and 5V Arduino boards waiting for me to have time to play with them in my "in" box.
Xerox didn't patent the XOR operation, just the use of it to blink a cursor. It still seems a bit silly, though.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
You said:
Bill Henning: "However, if you think that it is inappropriate that the inventor of a technique gets to name the technique, and expects to be credited..."
Actually Bill, I've just realized that as the inventor of LMM you don't get to name it. We do !
How so?
Well in mathematics significant formulae and proofs tend to get named after the supposed discoverer. That is the mathematical communities way of ensuring the discover gets honour and credit for ever. You know, Pascal's triangle, Fibonacci sequence, Fourier Transform, Cantor's diagonal method, G
HMM can also be used for Hub Memory Model.
One thing that the Propeller needs is a decent "whitepaper" explaining all of the LMM/XMM/EMM/etc. that are out there right now. The threads don't stay on page 1 long enough to sort through it all.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
Las - Large model assembler Largos - upcoming nano operating system
I've actually been sitting on two articles that were accepted for magazine publication that clearly document LMM, because I was waiting for time to finish the third (and possibly fourth) in the series. The mag wanted the whole series done before they would start publishing - understandable, as I have not written for them before.
For XMM, each hardware interface needs its unique explanation, or everyone can just use VMCOG [noparse]:)[/noparse]
p.s.
This discussion reminded me of the people who gave me grief for not giving away the Morpheus design for free. I could never quite get how they expected me to make a living...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
Las - Large model assembler Largos - upcoming nano operating system
At some point James Watt realized that his steam engine should not just have a linear motion, which was basically just used to move water pump plungers up and down in coal mines at the time, but should be able to turn shafts and drive the machines of the coming industrial revolution.
The obvious way to do that is to attach a crank to a shaft and attach the other end of the crank to the piston. James was stuck there though because James Pickard had the patent on this "obvious" idea. Obvious because it had been used in treadle lathes and such forever. So Watt had to go another more complex and expensive way with sun and planet gears.
Alternatively Watt had patents of his own. With everything locked down like that progress in steam power was held up for decades.
Now, non of these steam guys even invented anything we would call an "engine" now a days. Damn things would originally go up and down repeatedly only if someone was there to open and close valves at the right moment at each end of the stroke. Hardly an "engine".
A young boy whose job it was to do this got bored with it and dreamed up a system of strings and leavers to do it for him. Now we have an "engine" that actually runs by itself. I would say that was a monumental breakthrough in the history of technology. It was the first application of "feedback".
Did that boy get a patent? Or a reward? Or recognition? Are any engine valve systems named after him? No.
That boy was Humphrey Potter.
P.S. When you study control theory they tell you the Watt Governor for steam engine speed control was the first use of feedback. I maintain Humphrey Potter and his valve gear was the first use of feedback.
I trot this out on every patent debate. Sorry if you have heard it all before.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.