Chipwizard
New Member
Hello
I am in the middle of a pic programming project and need help with what appears to be syntax issue:
The program has two sections: Main Body, and set of subroutine calls retrieving values from 3 individual subroutines. Main body calls these 3 subroutines, subroutine places an 8-bit value in PORT-A and returns to main program to do bunch of stuff. I would like to be able to change each 8-bit value in the begining of the program, set three 8-bit values in 3 variables in the 3 subroutines, call "main" program to do its thing, come back and change (set) new values for the variables, place the new values in subroutine call, call "main program" to do its thing and so on...
I tried "set" function in the begining then called main. The results are that it grabs the last set of 3 variables and keeps running it and ignores the rest of previous "set" subroutines. Any suggestions will be greatly appreciated.
Thanks,
Rom
I am in the middle of a pic programming project and need help with what appears to be syntax issue:
The program has two sections: Main Body, and set of subroutine calls retrieving values from 3 individual subroutines. Main body calls these 3 subroutines, subroutine places an 8-bit value in PORT-A and returns to main program to do bunch of stuff. I would like to be able to change each 8-bit value in the begining of the program, set three 8-bit values in 3 variables in the 3 subroutines, call "main" program to do its thing, come back and change (set) new values for the variables, place the new values in subroutine call, call "main program" to do its thing and so on...
I tried "set" function in the begining then called main. The results are that it grabs the last set of 3 variables and keeps running it and ignores the rest of previous "set" subroutines. Any suggestions will be greatly appreciated.
Thanks,
Rom