Shiftout question.
Hi all, once again a question for the brains trust.
I am using shiftout to drive some shift registers. Everything seems to work OK so far, BUT there is a question:
The manual says SHIFTOUT, Datapin,Clockpin,Mode,[data stuff] and then says the Datapin & Clockpin can be straight numbers, Port pin names, or variables.
So far so good.
I am using
DAT var portd.3 which is common data pin for all shift regs
sect VAR byte, (up the top with the other variable defs.)
SHIFTOUT DAT,sect,5,[S1]
S1 is the data byte,
sect is a variable simply containing a number 0 - 7 which is the portb pin for the clock of the 8 shift registers.
NOWHERE do I define that the number in sect variable is in fact portb.sect or anything like that, SO HOW DOES THE BLOODY THING KNOW THAT'S WHAT I MEAN????? 'COS IT WORKS????
Intriguing, ain't it??
Thanks, as always
Last edited by muddy0409; - 2nd April 2007 at 13:02.
Reason: Just tidying up a bit
Peter Moritz.
Up the bush, Western Plains,
New South Wales,
Australia.
Bookmarks