Problem reading 93c46 EEprom


Results 1 to 4 of 4

Threaded View

  1. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Assuming your data is already written in your EEPROM, try
    Code:
    
    	@ device pic16F877, HS_osc, wdt_on, pwrt_on, protect_off
    	
    
    	define OSC 16
    
    	CS var portb.1
    	SCK var portb.2
    	SI var portb.4
    	SO var portb.5
    
    	trisb=%11101101
    
    	B0 var byte
    	B1 var byte
    	addr var byte
    
    	cs=0
    	HIGH PORTD.7
    	pause 5000
            addr = $01                                        
            CS = 1                                            
                 Shiftout DI, CLK, MSBFIRST, [%100\3, addr\6] 
            CS = 0  
            pause 50
    
    	for addr = 0 to 32
    
    		cs=1
    		shiftout sI,sck,1,[%110\3,addr\6]
    		shiftin so,sck,2,[b0,b1]
    		CS=0
    		serout portd.7,2, [b1,b0]
    
    		next
    
    	serout portd.7,2, [10,13]
    
    	STOP
    	end
    If you want to write data to your eeprom, then you'll need to add another pice of code
    Last edited by mister_e; - 26th March 2009 at 01:30.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Can't read sequential addresses in external EEPROM
    By tjkelly in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th February 2010, 14:46
  2. Problem with I2C EEPROM addressing
    By Atom058 in forum General
    Replies: 14
    Last Post: - 3rd November 2009, 03:17
  3. How to write/read strings EEPROM/LCD
    By g-hoot in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 11th February 2007, 06:26
  4. problem of reading eeprom 24lc515
    By mike12 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 1st January 2006, 17:36
  5. Writing / Reading EEPROM 24LC256 Problem
    By schmoddel in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th February 2004, 18:55

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