Interupts software or hardware driving?????? w/ the SX/b
$WMc%
Posts: 1,884
$WMc%
· What is an "interupt"?... Is· it HardWare or SoftWare driving...????___I have a lot other ? on This matter; But for now an expl. on "interupts" will due..........
_____I've never Posted here So be·kind______________________$WMc%_____looking for info_____
· What is an "interupt"?... Is· it HardWare or SoftWare driving...????___I have a lot other ? on This matter; But for now an expl. on "interupts" will due..........
_____I've never Posted here So be·kind______________________$WMc%_____looking for info_____
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Paul
Thank You for Your reply. The answer I was looking for is the the MicroController can only do one thing at a time, And I see this. The MircoC. stops what it was doing and then goes to do and interupt task then back to what it was doing before the interupt.So interupts don't mean multitasking.... Am I rite on this???
___________________________________________________$WMc%____________________????____
You've got a bit of studying to do before you get to that. Get an SX kit and start with simple programs before you dive into interrupts.
Technically, an interrupt is just a subroutine...however it requires hardware support (Interrupts reside as both hardware and firmware entities)
When you set up an interrupt to trigger, it polls the interrupt states to see if there is any criteria that matches your interrupt trigger.
If a trigger occurs, then the interrupt occurs, which stores the program counter (hardware) onto the stack (hardware) and re-assigns the program counter to zero, which is where the interrupt vector runs(hardware). The program counter then begins, and runs the code (firmware) that you put in that vector. When the code completes, it reads the program counter value stored on the stack (hardware) and begins incrementing the program counter to run code.
So the interrupt is firmware controlled, however it is hardware executed.
For the second question:
Interrupts are not 'background run' or separate threads. They aren't on SX chips, PICs, or even PC's. In fact, the software term 'thread' in itself is misleading. You can look at interrupts the same as sub-routines, except there is hardware support that is constantly polling for an interrupt criteria.
A processor is only able to run one command at a time. There are many processors that have peripherals built in that are able to run at the same time...but the core of the processor handles one command at a time (such as controlling/reading/writing the internal peripherals.)
In software, when you create a new 'thread' or timer function, you are not running 2 things at once. The 2 or more 'threads' are 'toggling' their commands on the processor core...but the core is not running 2 programs at once.
The Propeller chip is an example of true multi-processing, as it has 8 processors running simultaneously inside that share program space and memory...
Post Edited (Steel) : 11/5/2008 9:49:13 PM GMT
·I thank You both for Your replys;...What I gather from this is An "Interupt" is software driving but it needs··hardware to make it happen.??? like a high on pin(?) and it needs to have Pirority... Why does Parllax say the chip doesn't support Interups????? I see the speed gimeck and hogging the bus for and Interupt, But It seems to Me that anything can have and Interupt????· I'm Still confused on this "interupt" thing?????????????????
________________________________________$WMc%
·
You may be confusing the SX chip with the BASIC Stamp 2sx -- they are not the same (though one is used in the other).
I can't spell " Interupts" , But I have a hole new understanding of how They work...I think You for the clarity on SX and BS2sx chips.I think this is were most of My confusion came from.I read and Artc.. in Nut&Volts by Jon Williams "Nov./08 issue" useing Interrupts.I thought the SX and the BS2Psx were all the same, just diff. package's and Serial driver's...When I read the Doc.s on the BS2sx,It clearly stated that it didn't support Interrupts, So then the thinking was Mr. Williams had wrote some major $stamp code "Bufoolry" or A simulated Interrupt...I Thank All of You for Your replys...I hope to learn some more Assm. lingo to help Me progress to the Prop.The SX offering both Basic and Assm,I think will be a good start.
_________________________$WMc%_____________________________nose in the books_______________________
BTW, I prefer to be called "Jon" -- "Mr. Williams" makes me sound old....
I didn't realize that My post was replied by THE Jon Williams, I feel Honored, As I'm A Big Fan,And really liked the work You Have done w/ other $stamps...I'm just getting up to speed w/ the SX, And I really like what You've done here...I'm self thought,And I owe quite Abit to the Great Forrest M. Mimms III....When He announced His retirement My heart sank...It was His writting's That I learned the Basics...I can't say enough about the knowledge I gained from His work w/ RadioShack..I feel You are the next "Forrest" in the new Millenium....I look forward to the Artc.s in N/V Mag......I'll take Your Advise w/ the Propeller as well,I see Your point and It's well takin.I keep waiting for that "aAH-HAa",But it has'nt come yet w/ the Prop........Thanks again
____The "MR." was all about__Respect__,And not age..._________________$WMc%________________Honored______