2 programs at one time

BeanieBots

Moderator
Not strictly speaking but the topic has come up before and there are a few 'tricks' that can be used to make it appear as if more than one program is running.
Have a read of this:-
<A href='http://www.rev-ed.co.uk/picaxe/forum/Topic.asp?topic_id=5914&amp;forum_id=29&amp;Topic_Title=Time%252DSliced%2BMulti%252DTasking%2BPICAXE%252D18X&amp;forum_title=No+new+posts+please%21+21' Target=_Blank>External Web Link</a>
 

dustfinger

New Member
ye there is a cool way to have two programs on one chip, i worked it out a while back:

call program one program one and program two, program two. then (this uses one input) type this before both programs

programselecter:
if pin0 = 1 then goto program one
if pin0 = 0 then goto program two
goto programselecter

basicly, you can have input 0 as a switch and of the connection is closed, it does program 1 but if the switch is open it performs program 2... the setback is you have very little programming space for each program.... hope this helps you (the commands above are ones i use for picaxe 18, dunno wixh other 1ns it works for) good luck: Sparks
 

Brietech

Senior Member
The single pin solution is probably the easiest. I'm currently working on a time-sliced multitasking environment that can run 3 programs at a time, and the programs can be several kilobytes in length, using a custom basic-like language i've made (~512 kilobytes of programming space, and 64 kilobytes of ram). It's probably a little overkill for what you want though.
 
Top