Need help with MCP23S08


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default Re: Thanks

    Only one thread on the 23S08. Well, maybe someone can help.

    I believe my problem is in the hardware but if someone can check the command below, that would be great. I took the attached file in the first thread and believe only the write command needed to be changed. I modified it to this but I still get nothing out of the 23S08. I'm using the PICkit serial SPI board.

    MCP_WRITE:
    low CS
    SSPBUF=0
    GOSUB CLOCK_BIT
    SSPBUF = spout
    high CS
    return

    I feel like something is missing in there. Also, to rule out the board, I was toggling one pin at a time. When I toggle the MOSI or MISO pins, the both appear to be connected because both pins go high and low at the same time. In other words, I pulse the MOSI with a 2 Hz signal and the MISO pin appears to be in parallel.

    Confused....

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: Thanks

    After loading SSPBUF the second time, you need to wait for it to finish the transfer before taking CS high again.
    DT

  3. #3
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default Nothing

    No dice. I think that command was wrong and this one *looks* correct after doing some more reading.
    Code:
    MCP_WRITE:
        low CS
        SSPBUF=64
        GOSUB CLOCK_BIT
        SSPBUF=MCP_ADDRESS
        GOSUB CLOCK_BIT
        SSPBUF = MCP_DATA
        GOSUB CLOCK_BIT                      
        high CS
    return
    Maybe one of the IC's on the PICkit board is bad. I wouldn't expect, although I don't know for sure, the MOSI and MISO pins to both go high or low at the same time if you only have power on one of those pins.

  4. #4
    Join Date
    Aug 2008
    Location
    Portugal
    Posts
    240


    Did you find this post helpful? Yes | No

    Default Re: Nothing

    Hi Christopher;

    Check this wiki article. It shows how to handle the MCP23S17. Maybe can help you if you adapt to your ic.
    http://www.picbasic.co.uk/forum/cont...P-PBP-MSSP-ASM
    Thanks and Regards;
    Gadelhas

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