functions and pin parameters in SX/B
Hey guys, haven't posted in a long time, so .. here goes:
I would like to write a function that would have a PIN as a parameter and would return a word.
The assembler is complaining that my parameter is not a hardware pin
so, how do I pass a pin as a parameter?· This is going to be for controlling DS2760's so I would much rather
have functions than have to duplicate code.
code is something like
but the compiler complains on the __param1 line that "bit is not a hardware pin"
thanks!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
stand back! I have a slide rule and I know how to use it!
I would like to write a function that would have a PIN as a parameter and would return a word.
The assembler is complaining that my parameter is not a hardware pin
so, how do I pass a pin as a parameter?· This is going to be for controlling DS2760's so I would much rather
have functions than have to duplicate code.
code is something like
mash var RA.0 check_temp func 1 main: hlt_temp = check_temp mash goto main check_temp: which_ds = __param1 'whole bunch o 1wire stuff return theTemp
but the compiler complains on the __param1 line that "bit is not a hardware pin"
thanks!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
stand back! I have a slide rule and I know how to use it!
Comments
currently using an SX tech board, can I just go from, say RB.0 to data pin on one DS2760 and then jumper over to data pin on other DS2760?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
stand back! I have a slide rule and I know how to use it!
thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
stand back! I have a slide rule and I know how to use it!
thanks for the offer
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
stand back! I have a slide rule and I know how to use it!