Interrupt handling. How use the interrupt pins on the SX-processor from BSsx?
J.We
Posts: 15
I·use a BSsx, with UBICOM sx processor, it is a powerful processor with 8 pin interrupt and own interrupt stack. I want to use them!· What I can see, you cannot get to the interrupt pins on the processor from the BSsx. Is there any BASIC STAMP module who can handle interrupts?
Regards//Johan
·
Regards//Johan
·
Comments
If you want to use interrupts you can program "plain" SX chips with the SX/B compiler (it's very close to PBASIC) and SX/B does allow interrupt programming.·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Note that 'tweaking the PBasic run-time' is a non-trivial exercise, in fact that's what Parallax has built their company around.
Now, what Jon is saying is that Parallax does sell a $100 package that lets you program SX chips yourself -- along with a very nice SX/B IDE/compiler that lets you have a mix of Basic and Assembly. They also sell $10 SX48 and SX52 boards, which are VERY nice. So you could easily go that route.
Can you tell us what you need interrupts for ? Maybe there is a way to do it with some external circuit.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
"One experiment is worth a thousand theories"
·
Bean,
I want to use the interrupt as the same way as for a microprocessor, when condition/state is changed,·physically (on a pin) or logically (RS232-register flag), the program will·branch to a interrupt routine.
What can I do with my BS,(BSp) can I use Polling (POLLMODE, POLLIN, POLLOUT) for this?
Regards//J.We
This is why I don't like to call pin polling "interrupt" because it does not work like standard microcontroller interrupts and I think that's really what you're looking for. For that, you can use your PBASIC skills with SX/B (our free BASIC compiler for the SX micro [noparse][[/noparse]not BS2sx]).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
I will try to get around my problem in some other way.
·
My original problem had to do with buffering. I control my BS with a java program witch constantly sending commands to my BS via RS232. I didn’t want to “loose” instructions because BS didn’t have buffering ore interrupt handling and only is able to do “one thing at the time”. The problem is totally my fault, and I should have looked these things up more carefully before I started my project.
·
But ok, anyway, I will try to program my BS so that it doesn’t matter if it misses some commands..
·
Thank you !
·
Regards//Johan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax