Shot meself in the foot again...


Results 1 to 12 of 12

Threaded View

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


    Did you find this post helpful? Yes | No

    Default

    The PBPbook says I can use a simple number for CLOCKPIN: SHIFTOUT,datapin,2,5,[var]...... DOESN'T GO. How is the beasty supposed to know that 2 means portc.2....The thing is I gotta use 0 - 7 as the clockpin and using a variable does not work! (I am feeding 8 shift registers sequentially)

    I spoke to the bloke that has the old thing I did, but that is useless to me without a DE COMPILER (is there such a thing) to get it back to a language I can understand.
    I have tried port indexing, using examples found in here also, but nothing seems to work. EG SHIFTOUT DAT,2,5,[S1] DAT is the DATAPIN which is common to all the S/Rs S1 is the data variable and 2 is the clockpin (goes to the second of 8 S/R's). This don't go.

    SHIFTOUT DAT,portc.2,5,[S1] DOES go
    SHIFTOUT DAT,sect,5,[S1] DON'T go (sect is the index var which is pointing at the relevant S/R.)
    SHIFTOUT DAT,portc.0[sect],5,[S1] Also DON't go.

    The overall program is running, as I can see the DATAPIN blinking away merrily on my logic probe, it's just the CLOCKPIN part that has me stymied.

    If I do SHIFTOUT DAT,portc.2,5,[S1] and watch the clock on the S/R and the outputs from the S/R all is fine.

    The thing I did a while ago works great (as a prototype) but I'm damned if I can remember what I did with this bit of code. IT BLOODY WORKS I TELL YA!!!!!
    This current model is simply a smaller device with EXACTLY same circuit, so???????????????????????????????????????????????? ??????

    Well, I s'pose something's gotta keep me up at night?



    I think I'll try a new chip, but seeing that it does work sometimes, I'm not too excited about that fixing it.
    Last edited by muddy0409; - 21st June 2007 at 13:23.
    Peter Moritz.
    Up the bush, Western Plains,
    New South Wales,
    Australia.

Similar Threads

  1. One Shot Rising
    By MarcBergeron in forum General
    Replies: 1
    Last Post: - 27th September 2009, 21:55
  2. Re: Recommended PCB foot prints
    By Steve_88 in forum Off Topic
    Replies: 0
    Last Post: - 30th June 2007, 17:56

Members who have read this thread : 0

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