Replacing shift register with PIC


Results 1 to 7 of 7

Threaded View

  1. #5
    Join Date
    Apr 2006
    Posts
    92


    Did you find this post helpful? Yes | No

    Default

    Yes, right the pic would be a slave. Here is what I have.

    shiftin latchPin_in, clockPin_in, MSBFIRST, [latch_receive, clock_receive]

    ' clockPin_in is a pin on the pic that is attached to the clock line of the NES gamepad port
    ' latchPin_in is a pin on the pic that is connected to the latch line of the NES gamepad port


    if latchPin_in = 0 then 'if we receive a zero from the master's latch output data then shiftout serial data.

    shiftout serialOut_pin, clockPin_in, MSBFIRST, [serial data output] 'send a byte out to the master.

    In this case what do I do with the clock data received when shifting in? I'm not sure how to handle the clock data received.


    Does a 4021B shift register (slave) receive latch and clock data in a standard (fixed) way? Or does this rely on how the latch and clock data are being sent from the master?

    You said I would "tie up" the pic doing this. If that's true than maybe I'll skip this and just use a pic to send the parallel input into a real shift register, then out to the master.

    I was thinking about using a pot via ADCIN and then send the shifted out serial bits based on the pot reading. Would that work with shiftin and shiftout going on as well?

    Thanks again,
    T
    Last edited by TonyA; - 7th April 2008 at 17:27.

Similar Threads

  1. Active low input?
    By CosMecc in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 8th August 2010, 20:31
  2. PIC16F877A pwm use for IR transmission
    By mcbeasleyjr in forum General
    Replies: 0
    Last Post: - 11th July 2009, 18:51
  3. Replies: 14
    Last Post: - 26th September 2007, 05:41
  4. Use the PIC 16f877 or 877A instead of shift registers.
    By tsanders in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th October 2006, 17:23
  5. Replies: 15
    Last Post: - 30th January 2005, 03:58

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