robinfawell Posted February 28, 2008 Report Posted February 28, 2008 The line btfss SM_DOUT_VALUE, 7-bit_numberAppears in all of the scan matrix versions in the single shift step macro SM_BUTTON_HANDLER SHIFT MACRO bit_number I have found btfss f, b where b = 0-7Can anyone helpRobin
stryd_one Posted February 29, 2008 Report Posted February 29, 2008 Oh it's a 'jeopardy' game: What is the acronym for "Bit Test F, Skip if Set" ? ;D
bugfight Posted February 29, 2008 Report Posted February 29, 2008 who got an f on their bit test cause they skipped it??
robinfawell Posted March 1, 2008 Author Report Posted March 1, 2008 I know what btfss means. My difficulty is with the second operand "7-bit_number". Perhaps I have complicated this. I was thinking "any 7 bit number", originally. If I conclude that this is referring to the 7th bit of SM_DOUT_VALUE why not just writebtfss SM_DOUT_VALUE, 7Robin
nILS Posted March 1, 2008 Report Posted March 1, 2008 Well who says that bit_number is a constant? Assuming it's a variable"btfss SM_DOUT_VALUE, 7-bit_number"checks a different bit depending on the content of bit_number. If bit_number is 0 for instance it'll check the 7th bit, if it's 3 it'll check the 4th bit...
robinfawell Posted March 1, 2008 Author Report Posted March 1, 2008 That is what I thought originally. However if you search for "7-bit_number" in all the files that comprise sm c example v1.zip there is only one file that contains "7-bit_number" and that file is sm fast.inc and in that file there is only one instance of "7-bit_number" and that line is the one referred to in the first instance.This seems to discount that "7-bit_number" is a variable.Robin
nILS Posted March 1, 2008 Report Posted March 1, 2008 What I meant was bit_number is a variable. 7 is a constant ;) 7 - bit_number is a combination of a constant and a variable and is hence variable.
robinfawell Posted March 1, 2008 Author Report Posted March 1, 2008 Thanks Nilsbit_number is a variable and appears in several places in sm_fast.It never occurred to me that the - was a minus sign. I was thinking of it as a hyphen.Robin
nILS Posted March 1, 2008 Report Posted March 1, 2008 Hyphens cannot be used in variable names, only "A-Z", "a-z", "0-9" and "_" ;)
robinfawell Posted March 1, 2008 Author Report Posted March 1, 2008 I should have remembered the syntax rules!Robin
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now