Can't get SST25VF032B to work


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425

    Default Can't get SST25VF032B to work

    I'm using the same footprint as a FM25V10 and the SST25VF032B appears to have almost the exact same instructions as the FM25V10. The problem is, no matter what commands I try, reading or writing produce nothing usable. The code is below. Can anyone see something that I missed?

    Code:
    MSSP_WRITE:
        
      	LOW PORTH.3
    	SSP2BUF =  6         
        WHILE PIR3.7 = 0:WEND:PIR3.7 = 0 
    	HIGH PORTH.3 
     
        LOW PORTH.3
        SSP2BUF =  2     
        WHILE PIR3.7 = 0:WEND:PIR3.7 = 0
        SSP2BUF =  MCP_ADDRESS_EXT     
        WHILE PIR3.7 = 0:WEND:PIR3.7 = 0 
        SSP2BUF =  MCP_ADDRESS_.HIGHBYTE
        WHILE PIR3.7 = 0:WEND:PIR3.7 = 0
        SSP2BUF =  MCP_ADDRESS.LOWBYTE
        WHILE PIR3.7 = 0:WEND:PIR3.7 = 0
        SSP2BUF = WRITE_DATA               
        WHILE PIR3.7 = 0:WEND:PIR3.7 = 0 
        HIGH PORTH.3
    RETURN
    
    MSSP_READ:
      
     	LOW PORTH.3
        SSP2BUF = 3         
        WHILE PIR3.7 = 0:WEND:PIR3.7 = 0
        SSP2BUF =  MCP_ADDRESS_EXT 
        WHILE PIR3.7 = 0:WEND:PIR3.7 = 0
        SSP2BUF =  MCP_ADDRESS.HIGHBYTE
        WHILE PIR3.7 = 0:WEND:PIR3.7 = 0
        SSP2BUF =  MCP_ADDRESS.LOWBYTE   
        WHILE PIR3.7 = 0:WEND:PIR3.7 = 0 
        READ_DATA = SSP2BUF      
        HIGH PORTH.3
    
    RETURN
    Last edited by Christopher4187; - 6th March 2015 at 13:38.

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,520


    Did you find this post helpful? Yes | No

    Default Re: Can't get SST25VF032B to work

    Hi,
    As far as I understand (having played around with the SST25VF08 a couple of years ago) you have to,
    A) Make sure the adress you're trying to write to it's erased,
    B) If the WP-pin is HIGH, make sure the block you're trying to write is NOT protected by the Block Protect bits in the status register, see below.
    B.1) Execute the EWSR command
    B.2) Execute the WRSR command
    B.2) Write the new value (0 to unlock all of it) of the status register
    C) Execute the WREN instruction.

    I highly recommend you declare a bunch of constants for the various commands, it's much easier than having to a bunch a magic numbers in the code.
    Code:
    SST_Cmd_Read                CON $03                 ' Read byte, adress increment automatically
    SST_Cmd_EWSR                CON $50                 ' Enable status register write
    SST_Cmd_WREN                CON $06                 ' Write Enable
    
    SSPBUF = SST_Cmd_WREN
    /Henrik.

Similar Threads

  1. bootloader does not work..
    By sirvo in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 21st October 2011, 09:55
  2. Cant get it to work
    By bearpawz in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 9th April 2010, 09:21
  3. why this doesn't work?
    By strasni_betmen in forum Serial
    Replies: 7
    Last Post: - 4th September 2008, 15:56
  4. Will This program work
    By deepgfishing in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 22nd June 2007, 22:45
  5. does this work?
    By igor@24 in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 13th June 2005, 19:19

Members who have read this thread : 1

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