ShiftOut. Using PIC as Slave device.


Results 1 to 5 of 5

Threaded View

  1. #3
    Join Date
    Apr 2006
    Posts
    92


    Did you find this post helpful? Yes | No

    Default

    Thanks. Well my problem is that I might not fully understand the shiftout command.

    The master is another microcontroller, the Atmega8. The Atmega is sending a clock signal and latch data, the pic (slave device) will receive the clock signal and latch data, and then send out a byte of data to the Atmega.

    So I'm guessing that I would just connect the clock output of the master (Atmega) to an input pin of the pic (slave) and that would be the clockpin of the command: shiftout dataOutpin, clockpin, (serial data)

    The latch output signal of the master (Atmega) would be received by an input pin of the pic (latchReceivePin), and I guess I would do something like this?

    If latchReceivePin = 1 then 'if the pic receives a "high" signal on its input pin then shift out a byte of data to the Atmega.
    shiftout, etc.

    I still don't know if I understand "shiftout" correctly, but I'll experiment with this today. If anyone can offer any advice or clues please let me know.

    Thanks again.
    Last edited by TonyA; - 13th March 2010 at 18:09.

Similar Threads

  1. Watchdog Timers
    By Squibcakes in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th August 2014, 18:03
  2. Presetting Configuration Fuses (PIC Defines) into your Program
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 82
    Last Post: - 15th December 2013, 09:54
  3. Smart Star (how to use shift registers)
    By mackrackit in forum Code Examples
    Replies: 3
    Last Post: - 30th November 2008, 20:06
  4. Reading a slave USB with a pic
    By pcaccia in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 25th October 2008, 12:00
  5. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 19:33

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