Hi Steve:
Thank you very much for your time.
I got something new in learning PICs.
Remark:
Purpose for this program is to cteate rotating adjustable magnitic field that can be used to drive steppers or brushless motors and by cutting sequence
of pulsout statements does not really impove program.
Second reason is to create thermal control unit for 6 heaters of furnace
that are located on 1-top,2-bottom,3-lift and 4-right side, 5-back wall and 6-sliding front door.Because of temperature difference inside chamber
sequence of pulses will help to create equal isothermal properties iside of chamber.
Or if you like model of autonomous flying or moving vehicle it is part of right remote control unit.
As you see It looks like universal unit.
If I correctly understand your remark:
pbpin var byte
pulsout pbpin, w9
I am able to run PWM, Pulsout, Serout, Serin, Output .... statements
on pre-programmed numbers of output pins in one shot?!
Second question about "!!!! usually we use GOSUB with a RETURN.".
I have 7 program each has two submodules rotate left/right and each has
two procedure to calculate W9 value.
In sum about 28 Gosub and 28 Return statements. My guess is here will be real problem with wrong switching.
In Visual basic it is not problem,In C++ and Visual Basic It is simple to encapsulate problem in modules and classes.
What can I do in PICBasic to avoid mistakes?
Thank you for your help again.
Best Regards,
Leonid