I think the main problem with interrupts comes from re-entrant interrupts. You can write them either way, but doing a re-entrant interrupt is just a nasty deal in my book.
In all of the parallel programming I've done, I've taken care to avoid re-entrant designs, because I feel that re-entrant designs are bad form. I have a bias against them and feel they are the mark of a bad programmer. There may come a time where it's unavoidable, but I try to take great care to avoid them.
I've never understood the interrupts are good/bad arguments and the problems people have with them.
I have never had a problem with interrupts and have designed systems with 20+ of them in use. Really, it's not difficult.
This is just the same argument as not having synchromesh on manual vehicles. Really, it's not that difficult. Or power steering, reversing cameras, etc, etc, etc.
Going very off-topic (but then it is my topic so I'm allowed!) but maybe Computer Science degrees, or whatever you're expected to have, ought to have qualifiers. So you get a...
CS Degree +/-interrupts +/-DMA +/-serial comms +/-maths +/-understanding that an RTOS is very rarely the answer
This is just the same argument as not having synchromesh on manual vehicles. Really, it's not that difficult. Or power steering, reversing cameras, etc, etc, etc.
Interrupts really aren't difficult to use, and one doesn't have much choice if one wants to use something other than a Propeller or XMOS chip. Here is a simple test program for the tiny PIC10F320 chip (six leads) that uses a timer interrupt to toggle an LED:
Interrupts really aren't difficult to use, and one doesn't have much choice if one wants to use something other than a Propeller or XMOS chip. Here is a simple test program for the tiny PIC10F320 chip (six leads) that uses a timer interrupt to toggle an LED:
Dealing with multiple interrupts isn't much more difficult; I've designed an ARM system with several interrupts for different peripherals, and it was very straightforward. Millions of embedded applications of any size use multiple interrupts, and have been designed without any problems.
Spending $7 on a Propeller to avoid interrupts when a 50c chip with interrupts can do the same thing seems a bit silly to me!
Dealing with multiple interrupts isn't much more difficult; I've designed an ARM system with several interrupts for different peripherals, and it was very straightforward. Millions of embedded applications of any size use multiple interrupts, and have been designed without any problems.
Like just about anything interrupts can be as simple or as difficult as you or the task makes them. I spent a lot of years writing machine control for various industrial process control application using a 6809 and later a 68hc11 (it was a long time ago) and continually struggled with resources. That included memory, clock cycles and IO!! The idea of "wasting" clock cycles polling IO was unthinkable as there was always more to do then cycles to do them in! That's assuming that I had the memory to scatter the code throughout the code to do the checking. That condition once learned is hard to unlearn.
While the propeller is often times fast enough to make it possible to "waste" cycles polling the memory limitations is huge! I agree that adding interrupts (not taking anything else away in the process) may add a bit of complexity to some programs but is it really easier to write and maintain code with all the polling code in it? If what your doing is faster, smaller and easier without the using interrupts or you just to like them then you don't have to use them.
For the record while I do miss interrupts and don't think they're as bad as some seem to. I still prefer the propeller to my other options. I'm also looking forward to the prop2 and while I will at times wish it had interrupts will make do.
Dealing with multiple interrupts isn't much more difficult; I've designed an ARM system with several interrupts for different peripherals, and it was very straightforward. Millions of embedded applications of any size use multiple interrupts, and have been designed without any problems.
Spending $7 on a Propeller to avoid interrupts when a 50c chip with interrupts can do the same thing seems a bit silly to me!
Leon,
I'm calling B...S... Where did you find a 50-cent chip with interrupts that has the same capability as a Prop? That is, it would need to be a 32-bit chip capable of 160 instructions/second. You have more experience with other processors, but I'm not aware of one available for 50 cents.
That is, it would need to be a 32-bit chip capable of 160 instructions/second.
No it wouldn't.
To do a straight MIPS comparison is pointless as the other chip, whatever it is, will have hardware peripherals which the prop doesn't have. Emulating those peripherals will burn cycles on the Prop. I have a 32-bit chip on the bench now which would require a whole P1 to emulate it's peripheral mix leaving you 0 MIPS to do anything useful.
I'm sorry Dave but your post smacks of wanting to start an argument.
To do a straight MIPS comparison is pointless as the other chip, whatever it is, will have hardware peripherals which the prop doesn't have. Emulating those peripherals will burn cycles on the Prop. I have a 32-bit chip on the bench now which would require a whole P1 to emulate it's peripheral mix leaving you 0 MIPS to do anything useful.
I'm sorry Dave but your post smacks of wanting to start an argument.
Haven't we got far far better things to do? and way more fun too? This thread just goes on ad nauseum and has contributed nothing and does not change anything at all. Nobody here is looking for an argument, the fact that we are here courtesy of Parallax themselves both for the Prop chip and for the forum should be sufficient reason to be grateful and in agreement that the Prop is a unique and flexible and powerful micro...........controller. There!, just to emphasis it once again it's a microcontroller, it itself doesn't try to be a microprocessor (though some try to make it) in the traditional sense, if it were we probably would not be here having this discussion.
Haven't we got far far better things to do? and way more fun too? This thread just goes on ad nauseum and has contributed nothing and does not change anything at all. Nobody here is looking for an argument, the fact that we are here courtesy of Parallax themselves both for the Prop chip and for the forum should be sufficient reason to be grateful and in agreement that the Prop is a unique and flexible and powerful micro...........controller. There!, just to emphasis it once again it's a microcontroller, it itself doesn't try to be a microprocessor (though some try to make it) in the traditional sense, if it were we probably would not be here having this discussion.
Amen. Good Lord. There are MC/s that have more hardware that I often want but the flip side to that coin is that if I used the entire mix of special hardware ports then I'll have 0 pins to work with and no interrupts left for much else. So what? I use that where it suits me to use that. I use the prop where it suits me to have 8 cores, easy video, or very flexible I/O arrangement. I have a couple Diligent ChipKit boards I adore for certain work. I like PICAXE and AVR's sometimes too when what I want fits them.
9 pages. Yes, thanks. We all understand now. The Propeller is not this other chip you like better. Got it.
I think we're talking past each other. I got the impression from you post that your SimpleIDE worked with spin. I knew you were working on it but didn't think (correctly) that it was available. I'm still looking forward to using it with spin/pasm.
I think we're talking past each other. I got the impression from you post that your SimpleIDE worked with spin. I knew you were working on it but didn't think (correctly) that it was available. I'm still looking forward to using it with spin/pasm.
In my original post in this thread I offered tidbits of hope to some of your concerns ....
"It would be very nice that when uploading a program to a prop that the build compile the "project" for upload instead of just the file in the current window."
I responded in part: "SimpleIDE is "project" oriented." It means that the concept of building "just the file in the current window" is not a SimpleIDE feature.
"Being able to have my own collection of objects in a directory of my choosing instead of the current directory or main library directory would be nice as well."
And I mentioned: "Files specified by spin will be selected from the current project folder or a library folder of your choice."
That's all. I look forward to everyone beating on the software when the Spin feature is ready. The more it's beat on, the faster it will be done.
I'm sorry Dave but your post smacks of wanting to start an argument.
I'm just trying to keep Leon honest. However, I must have incorrectly interpreted his term of 50c as 50 cents. His later post clarified his statement for me, and it's obvious that he didn't mean 50 cents, but was in fact referring to a part with the name "50c". However, I can't seem to find a 50c anywhere on the internet.
I'm just trying to keep Leon honest. However, I must have incorrectly interpreted his term of 50c as 50 cents. His later post clarified his statement for me, and it's obvious that he didn't mean 50 cents, but was in fact referring to a part with the name "50c". However, I can't seem to find a 50c anywhere on the internet.
I was referring to the PIC10F320 that I mentioned previously, they cost about 50c in quantity. For such a tiny device, it has a surprising amount of functionality:
Leon, thanks for clarifying your clarification. I cleary understand now. I will quit searching for the 50C microcontroller now that I understand what you meant to say. Yes, I can clearly see that it's 0.448KB of program memory, 64 bytes of RAM and 5 MIPS processor are equivalent to a Prop.
But he doesn't like to be interrupted while doing so.
Publison, somehow I had missed your post while I was searching for the 50C microcontroller. You just made me spew Diet Coke all over my monitor. Thanks for the laugh.
Publison, somehow I had missed your post while I was searching for the 50C microcontroller. You just made me spew Diet Coke all over my monitor. Thanks for the laugh.
I think I'm going to spend the weekend working on my proposal for "Top Trumps - Microcontrollers".
For those who wonder what I'm on about...
Top Trumps is a card game. Each card contains a list of numerical data, and the aim of the game is to compare these values in order to try to trump and win an opponent's card. A wide variety of different packs of Top Trumps has been published.
Comments
In all of the parallel programming I've done, I've taken care to avoid re-entrant designs, because I feel that re-entrant designs are bad form. I have a bias against them and feel they are the mark of a bad programmer. There may come a time where it's unavoidable, but I try to take great care to avoid them.
CS Degree +/-interrupts +/-DMA +/-serial comms +/-maths +/-understanding that an RTOS is very rarely the answer
Interrupts really aren't difficult to use, and one doesn't have much choice if one wants to use something other than a Propeller or XMOS chip. Here is a simple test program for the tiny PIC10F320 chip (six leads) that uses a timer interrupt to toggle an LED:
I know that support for spin/pasm was being added to SimpleIDE. I wasn't aware that it already supported it. That's good news!!
Them are simple in cases You deal with one layer of them.
BUT with multilayer that one of them need interrupt other one -- that is other thing
Spending $7 on a Propeller to avoid interrupts when a 50c chip with interrupts can do the same thing seems a bit silly to me!
Like just about anything interrupts can be as simple or as difficult as you or the task makes them. I spent a lot of years writing machine control for various industrial process control application using a 6809 and later a 68hc11 (it was a long time ago) and continually struggled with resources. That included memory, clock cycles and IO!! The idea of "wasting" clock cycles polling IO was unthinkable as there was always more to do then cycles to do them in! That's assuming that I had the memory to scatter the code throughout the code to do the checking. That condition once learned is hard to unlearn.
While the propeller is often times fast enough to make it possible to "waste" cycles polling the memory limitations is huge! I agree that adding interrupts (not taking anything else away in the process) may add a bit of complexity to some programs but is it really easier to write and maintain code with all the polling code in it? If what your doing is faster, smaller and easier without the using interrupts or you just to like them then you don't have to use them.
For the record while I do miss interrupts and don't think they're as bad as some seem to. I still prefer the propeller to my other options. I'm also looking forward to the prop2 and while I will at times wish it had interrupts will make do.
I'm calling B...S... Where did you find a 50-cent chip with interrupts that has the same capability as a Prop? That is, it would need to be a 32-bit chip capable of 160 instructions/second. You have more experience with other processors, but I'm not aware of one available for 50 cents.
Dave
Must be talking about this one http://www.digikey.com/product-detail/en/PIC10F222-I%2FMC/PIC10F222-I%2FMC-ND/1212520 LOL
You read more than I wrote
To do a straight MIPS comparison is pointless as the other chip, whatever it is, will have hardware peripherals which the prop doesn't have. Emulating those peripherals will burn cycles on the Prop. I have a 32-bit chip on the bench now which would require a whole P1 to emulate it's peripheral mix leaving you 0 MIPS to do anything useful.
I'm sorry Dave but your post smacks of wanting to start an argument.
Now I'm confused. If your SimpleIDE doesn't support spin/pasm than why would I use it for developing spin/pasm code as project?
Haven't we got far far better things to do? and way more fun too? This thread just goes on ad nauseum and has contributed nothing and does not change anything at all. Nobody here is looking for an argument, the fact that we are here courtesy of Parallax themselves both for the Prop chip and for the forum should be sufficient reason to be grateful and in agreement that the Prop is a unique and flexible and powerful micro...........controller. There!, just to emphasis it once again it's a microcontroller, it itself doesn't try to be a microprocessor (though some try to make it) in the traditional sense, if it were we probably would not be here having this discussion.
It is being added. I did not say it was ready.
Amen. Good Lord. There are MC/s that have more hardware that I often want but the flip side to that coin is that if I used the entire mix of special hardware ports then I'll have 0 pins to work with and no interrupts left for much else. So what? I use that where it suits me to use that. I use the prop where it suits me to have 8 cores, easy video, or very flexible I/O arrangement. I have a couple Diligent ChipKit boards I adore for certain work. I like PICAXE and AVR's sometimes too when what I want fits them.
9 pages. Yes, thanks. We all understand now. The Propeller is not this other chip you like better. Got it.
I think we're talking past each other. I got the impression from you post that your SimpleIDE worked with spin. I knew you were working on it but didn't think (correctly) that it was available. I'm still looking forward to using it with spin/pasm.
....try it with C,try it with C........
</svengali voice>
Some times, the voices in my head frustrate me.....
<svengali voice>
....try it with C,try it with C........
</svengali voice>
In my original post in this thread I offered tidbits of hope to some of your concerns ....
"It would be very nice that when uploading a program to a prop that the build compile the "project" for upload instead of just the file in the current window."
I responded in part: "SimpleIDE is "project" oriented." It means that the concept of building "just the file in the current window" is not a SimpleIDE feature.
"Being able to have my own collection of objects in a directory of my choosing instead of the current directory or main library directory would be nice as well."
And I mentioned: "Files specified by spin will be selected from the current project folder or a library folder of your choice."
That's all. I look forward to everyone beating on the software when the Spin feature is ready. The more it's beat on, the faster it will be done.
Thanks,
--Steve
But he doesn't like to be interrupted while doing so.
I was referring to the PIC10F320 that I mentioned previously, they cost about 50c in quantity. For such a tiny device, it has a surprising amount of functionality:
http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en552961
and can do some things that the Propeller can't do.
Excite Leon?
Cheers
Richard
Just trying to keep it real.
I really got to get back to work now!
Three channel ADC, on chip temperature sensor, and configurable logic, in 3 mm x 3 mm. The Propeller needs external hardware for those functions.
My Pleasure.
For those who wonder what I'm on about...