EEPROM question help
Archiver
Posts: 46,084
I am trying to use a Xicor EEPROM x25650 in place of the
x25640. I am using the code in the parallax EPROM appkit but
can't get it to work. The code loads and runs but returns a value of "0". I
looked at the Xicor data sheets for both EPROM's and
can see no significant difference. has anyone had experience using the x25650?
Any help would be greatly appreciated!!
LF
[noparse][[/noparse]Non-text portions of this message have been removed]
x25640. I am using the code in the parallax EPROM appkit but
can't get it to work. The code loads and runs but returns a value of "0". I
looked at the Xicor data sheets for both EPROM's and
can see no significant difference. has anyone had experience using the x25650?
Any help would be greatly appreciated!!
LF
[noparse][[/noparse]Non-text portions of this message have been removed]
Comments
I am using the X25650 too. For my applications I wrote the code you
find
below.
You would have to assign proper pin number values to
SEEcs1,SEEcs2,SEEclk
and
SEEssio. Note: I use one single pin (SEEssio) to read and write to
the EEPROM
- the output pin is connected to the input pin through a 1k resistor.
BS2
+
in
ssio ! 1k
+---/\/
out
Then you use the subroutines in the following order:
SEEaddr = your-address
SEEdata = your-data-byte
gosub SEEwren 'write enable
gosub SEEwb 'write a byte
...
gosub SEErb 'read a byte
get-your-byte-from SEEdata
Adrian
'module_SEE.bs2
'{$STAMP BS2}
'
' Module SEE
' Serial EEPROM (SEE) routines.
'
' usage:
' gosub SEEwren write enable
' gosub SEEwb write byte SSEdata to SSEaddr
' gosub SEEwrdi write protect
' gosub SEErb read byte SSEdata from SSEaddr
' gosub SEErstat read status byte to SSEstat (overwrites SSEdata)
'
SEEcs1 con 0'MCSp1..9 'chip 1 select\
SEEcs2 con 0'MCSp1..9 'chip 2 select\
SEEclk con 0'MCSclk 'clock
SEEssio con 0'MCSssio 'sync. serial IO
SEEcs var nib 'chip select
SEEaddr var word 'address
SEEdata var byte 'data
SEEstat var SEEdata 'status byte, alias
SEEbusy var SEEstat.BIT0 'busy bit, alias
'
' SEEwb write byte
'
SEEwb:
low SEEcs
shiftout SEEssio,SEEclk,MSBFIRST,[noparse][[/noparse]2]
shiftout SEEssio,SEEclk,MSBFIRST,[noparse][[/noparse]SEEaddr\16]
shiftout SEEssio,SEEclk,MSBFIRST,[noparse][[/noparse]SEEdata]
high SEEcs
return
'
' SEErb read byte
'
SEErb:
low SEEcs
shiftout SEEssio,SEEclk,MSBFIRST,[noparse][[/noparse]3]
shiftout SEEssio,SEEclk,MSBFIRST,[noparse][[/noparse]SEEaddr\16]
shiftin SEEssio,SEEclk,MSBPRE,[noparse][[/noparse]SEEdata]
high SEEcs
return
'
' SEErstat read status byte
'
SEErstat:
low SEEcs
shiftout SEEssio,SEEclk,MSBFIRST,[noparse][[/noparse]5]
shiftout SEEssio,SEEclk,MSBFIRST,[noparse][[/noparse]SEEaddr\16]
shiftin SEEssio,SEEclk,MSBPRE,[noparse][[/noparse]SEEstat]
high SEEcs
return
'
' SSEwren write enable
'
SEEwren:
low SEEcs
shiftout SEEssio,SEEclk,MSBFIRST,[noparse][[/noparse]6]
high SEEcs
return
'
' SSEwrdi write disable
'
SEEwrdi:
low SEEcs
shiftout SEEssio,SEEclk,MSBFIRST,[noparse][[/noparse]4]
high SEEcs
return
the same result "seedate=0" I suspect that the IC is bad. Can you suggest a
source of supply.
Larry
Original Message
From: "Adrian Schneider" <adrian.schneider@t...>
To: <basicstamps@yahoogroups.com>
Sent: Thursday, November 28, 2002 3:37 AM
Subject: [noparse][[/noparse]basicstamps] Re: EEPROM question help
> Hi Lawrence
>
> I am using the X25650 too. For my applications I wrote the code you
> find
> below.
> You would have to assign proper pin number values to
> SEEcs1,SEEcs2,SEEclk
> and
> SEEssio. Note: I use one single pin (SEEssio) to read and write to
> the EEPROM
> - the output pin is connected to the input pin through a 1k resistor.
>
>
> BS2
+
in
> ssio ! 1k
> +---/\/
out
>
> Then you use the subroutines in the following order:
>
> SEEaddr = your-address
> SEEdata = your-data-byte
> gosub SEEwren 'write enable
> gosub SEEwb 'write a byte
> ...
> gosub SEErb 'read a byte
> get-your-byte-from SEEdata
>
> Adrian
>
>
> 'module_SEE.bs2
> '{$STAMP BS2}
>
> '
>
> ' Module SEE
> ' Serial EEPROM (SEE) routines.
> '
> ' usage:
> ' gosub SEEwren write enable
> ' gosub SEEwb write byte SSEdata to SSEaddr
> ' gosub SEEwrdi write protect
> ' gosub SEErb read byte SSEdata from SSEaddr
> ' gosub SEErstat read status byte to SSEstat (overwrites SSEdata)
> '
>
>
> SEEcs1 con 0'MCSp1..9 'chip 1 select\
> SEEcs2 con 0'MCSp1..9 'chip 2 select\
> SEEclk con 0'MCSclk 'clock
> SEEssio con 0'MCSssio 'sync. serial IO
>
> SEEcs var nib 'chip select
> SEEaddr var word 'address
> SEEdata var byte 'data
> SEEstat var SEEdata 'status byte, alias
> SEEbusy var SEEstat.BIT0 'busy bit, alias
>
> '
>
> ' SEEwb write byte
> '
>
> SEEwb:
> low SEEcs
> shiftout SEEssio,SEEclk,MSBFIRST,[noparse][[/noparse]2]
> shiftout SEEssio,SEEclk,MSBFIRST,[noparse][[/noparse]SEEaddr\16]
> shiftout SEEssio,SEEclk,MSBFIRST,[noparse][[/noparse]SEEdata]
> high SEEcs
> return
>
> '
>
> ' SEErb read byte
> '
>
> SEErb:
> low SEEcs
> shiftout SEEssio,SEEclk,MSBFIRST,[noparse][[/noparse]3]
> shiftout SEEssio,SEEclk,MSBFIRST,[noparse][[/noparse]SEEaddr\16]
> shiftin SEEssio,SEEclk,MSBPRE,[noparse][[/noparse]SEEdata]
> high SEEcs
> return
>
> '
>
> ' SEErstat read status byte
> '
>
> SEErstat:
> low SEEcs
> shiftout SEEssio,SEEclk,MSBFIRST,[noparse][[/noparse]5]
> shiftout SEEssio,SEEclk,MSBFIRST,[noparse][[/noparse]SEEaddr\16]
> shiftin SEEssio,SEEclk,MSBPRE,[noparse][[/noparse]SEEstat]
> high SEEcs
> return
>
> '
>
> ' SSEwren write enable
> '
>
> SEEwren:
> low SEEcs
> shiftout SEEssio,SEEclk,MSBFIRST,[noparse][[/noparse]6]
> high SEEcs
> return
>
> '
>
> ' SSEwrdi write disable
> '
>
> SEEwrdi:
> low SEEcs
> shiftout SEEssio,SEEclk,MSBFIRST,[noparse][[/noparse]4]
> high SEEcs
> return
>
>
>
>
>
>
>
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
pins of the 25650 to +5V and did you provide the bypass cap?
I connected the EEPROM as shown in the Parallax AppKit information. 5V to
hold and WP and I used the cap as indicated in the drawing. The EEPROM I
am using came along with some other stuff I ordered from Parallax more than
a year ago. I didn't order it and assumed it was part of a promotion that
Parallax was running. It came with the resistor and cap. It has been laying
in my parts box for a while. I must have accidentally zapped it. I have
ordered another and will give it another try.
Larry
Original Message
From: "Adrian Schneider" <adrian.schneider@t...>
To: <basicstamps@yahoogroups.com>
Sent: Monday, December 02, 2002 10:49 AM
Subject: [noparse][[/noparse]basicstamps] Re: EEPROM question help
> just to be sure about this - did you hook up the -HOLD and -WP
> pins of the 25650 to +5V and did you provide the bypass cap?
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>