Shiftout question.


Results 1 to 6 of 6

Threaded View

  1. #1
    Join Date
    Jun 2005
    Location
    Up the bush, Western Plains, NSW Au
    Posts
    216

    Default 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 12:02. Reason: Just tidying up a bit
    Peter Moritz.
    Up the bush, Western Plains,
    New South Wales,
    Australia.

Similar Threads

  1. 7 Segment Displays and MAX7219
    By Bill Legge in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 31st October 2010, 18:30
  2. Using MAX 7221 LED driver
    By Nick in forum mel PIC BASIC
    Replies: 15
    Last Post: - 21st October 2010, 19:31
  3. Smart Star (how to use shift registers)
    By mackrackit in forum Code Examples
    Replies: 3
    Last Post: - 30th November 2008, 20:06
  4. Shorter Subroutines for MAX7219
    By exelanoz in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 16th March 2007, 11:35
  5. Another Shiftout question
    By Srigopal007 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 21st September 2004, 23:07

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts