+ Reply to Thread
Page 2 of 2
First 1 2
Results 16 to 19 of 19

Thread: How fast can a Microchip PIC latch pin switch?

  1. #16
    krazy Newbie
    Join Date
    Apr 2009
    Posts
    50

    Default

    3v0

    Thanks for the tips. So you're suggesting not to let the clock run continuously but to just manually clock 3 pins (via GPIO, I guess?)?

    What do you mean by "Stop thinking of these signals as free running clocks."? I thought the CLK pin connected to my SPI module will run continuously while the processor is running.

    If this is the case, wouldn't it make sense to devise a careful way to clock the latch (within the timings of the 8th, 16th, so on serial register clocks)?

    Quote Originally Posted by 3v0 View Post
    I have C code for such an engine setup to work on 2 cascaded 595's / 16 LEDs. If you want it all you have to do is ask.
    Could I?

    Thank you!
    Last edited by krazy; 22nd April 2009 at 02:28 PM.


  2. #17
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,795

    Default

    Quote Originally Posted by krazy View Post
    3v0

    Thanks for the tips. So you're suggesting not to let the clock run continuously but to just manually clock 3 pins (via GPIO, I guess?)?

    What do you mean by "Stop thinking of these signals as free running clocks."? I thought the CLK pin connected to my SPI module will run continuously while the processor is running.
    No, and it would be a complete disaster if it did - as he said "Stop thinking of these signals as free running clocks."

    You send out a clock pulse for each bit you want to clock in or out, and at no other time.
    PIC programmer software, and PIC Tutorials at:
    http://www.winpicprog.co.uk

  3. #18
    3v0
    3v0 is offline
    3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent
    Join Date
    Jul 2006
    Location
    USA
    Posts
    6,464
    Blog Entries
    11

    Default

    Quote Originally Posted by krazy View Post
    3v0

    thanks for the tips. So you're suggesting not to let the clock run continuously but to just manually clock 3 pins (via gpio, i guess?)?
    yes
    data, clock, and latch


    what do you mean by "stop thinking of these signals as free running clocks."? I thought the clk pin connected to my spi module will run continuously while the processor is running.

    i use gpio pins and set them as needed. KISS. It is easy to understand and troubleshoot. A free running clock would shift data in every cycle even when you have no valid data. This is not a problem execpt you have to time the latch operaton so that it falls between the last valid data bit and the first meaningless one. You need to shift out 8*(number of 595 cascaded) then latch. I think that may be tricky with spi hardware, if possible. It is very easy in software.

    if this is the case, wouldn't it make sense to devise a careful way to clock the latch (within the timings of the 8th, 16th, so on serial register clocks)?

    Covered this above.

    Could i?

    Thank you!
    My first choice is to advoid dedicated hardware. Software drivers can be used on any pin and tweaked if needed.

    Once you understand how to drive a device with software you can use it on most any processor.

    There are times when you can and should use the hardware but I do not see this as one of them.

    The latest copy of the software is at school. Give me 24 hours to look it over and do a bit of documentation.

    3v0
    Please post questions to the forums. PM's are for personal communication.

    BCHS/3v0's Tutorials
    Junebug USB PIC programmer kit., USB Bit Whacker,
    The 15 Minute Printed Circuit Board! (+drill time)

  4. #19
    krazy Newbie
    Join Date
    Apr 2009
    Posts
    50

    Default

    Quote Originally Posted by 3v0 View Post
    A free running clock would shift data in every cycle even when you have no valid data. This is not a problem execpt you have to time the latch operaton so that it falls between the last valid data bit and the first meaningless one. You need to shift out 8*(number of 595 cascaded) then latch.
    That was exactly the question I had.

    Ok, thanks for that dose of reality. I'll KISS and just try clocking everything manually.

    Thanks!

+ Reply to Thread
Page 2 of 2
First 1 2

Similar Threads

  1. I need a fast switch ? Advice...
    By barryforever in forum Electronic Projects Design/Ideas/Reviews
    Replies: 1
    Latest: 30th September 2007, 03:10 PM
  2. Latch wont latch
    By sajubeni in forum Electronic Projects Design/Ideas/Reviews
    Replies: 4
    Latest: 8th October 2006, 07:32 AM
  3. 24V Latch Circuit for Momentary Switch
    By mtaylor in forum Electronic Projects Design/Ideas/Reviews
    Replies: 16
    Latest: 1st July 2006, 01:00 AM
  4. MOSFET transistor switch/latch/power circuit
    By discostews in forum Electronic Projects Design/Ideas/Reviews
    Replies: 2
    Latest: 22nd February 2006, 04:30 PM
  5. MC & LATCH
    By athlon11 in forum Micro Controllers
    Replies: 7
    Latest: 13th February 2005, 05:59 AM

Tags for this Thread