Problems with a RAMTRON memory chip (FM24W256)

Technical

Technical Support
Staff member
i2c pins need to be set as inputs at the start of the program (you have them as outputs)
Other that that it looks ok, 255 could mean the i2c device is not responding at all (pull up resistors give you the 'all 1s' to generate 255), so check all connections.
 

Armp

Senior Member
Why is C.3 pulled up to 7.4V? Not necessarily a good idea with a 5V supply to the chip
 

srnet

Senior Member
Good spot, looks like an incorrectly wired power rail voltage divider.
Or it could be by design.

The input current into the PICAXE pin at circa 240uA would appear to be within the limits of the pin input diode capability.
 

papaof2

Senior Member
Sample code to write and read FRAM.

'last update 04 Oct 2010

#picaxe 28x2
#no_data
#no_table

symbol FRAMBASE = W10
symbol FRAMADDR = W0
high B.7 'serial out to LCD
serout B.7, T9600, ("Hi ")

FRAMBASE = %10100010 'when memory is installed on AXE 28/40 board,
'use %10100000 if only memory chip
FRAMADDR = 505 'just an address other than the first few bytes, not significant

i2cslave FRAMBASE, i2cfast, i2cword '%10100000
writei2c FRAMADDR, ("h", "e", "l", "l", "o")
readi2c FRAMADDR, (b3, b4, b5, b6, b7)

serout B.7, T9600, ("FRAM ", #b3, #b4, #b5, #b6, #b7)

myend: 'loop forever
goto myend
 

westaust55

Moderator
As an adjunct to the program example given by papaof2, unlike EEPROM, FRAM memory does not require a pause after each write command (hi2cout or writei2c).
 

Armp

Senior Member
It is never a good idea to apply voltages that may impair functionality or reliability. Taking an input above the positive supply will inject carriers into the substrate and can cause operational errors long before the ESD protection device burns out at the stated max clamp current...

From the spec:

Absolute Maximum Ratings(†)
Ambient temperature under bias....................................................................................................... -40°C to +125°C
Storage temperature ........................................................................................................................ -65°C to +150°C
Voltage on VDD with respect to VSS, PIC16F1825/1829 .................................................................... -0.3V to +6.5V
Voltage on VDD with respect to VSS, PIC16LF1825/1829 .................................................................. -0.3V to +4.0V
Voltage on MCLR with respect to Vss ................................................................................................. -0.3V to +9.0V
Voltage on all other pins with respect to VSS ........................................................................... -0.3V to (VDD + 0.3V)

† NOTICE: Stresses above those listed under “Absolute Maximum Ratings” may cause permanent damage to the
device. This is a stress rating only and functional operation of the device at those or any other conditions above those
indicated in the operation listings of this specification is not implied. Exposure above maximum rating conditions for
extended periods may affect device reliability.
 

srnet

Senior Member
In general that is good advice, but as always there are exceptions. On the subject of applying high voltages to input pins Microchip say this in AN521;

THEORY OF OPERATION
This application takes advantage of the input static protection circuitry that exists on all I/O pins of a CMOS PIC16C5X. These protection circuits are designed to short the inputs to the power supplies when a large overvoltage is applied, thus protecting the chip from static electricity spikes. On PIC16C5X microcontrollers, this protection circuit is two large P-N diodes on each input (Figure 1). These diodes will short any voltage higher than VDD to the VDD supply and any voltage less than VSS to the VSS supply. They can take everal milli-amps of current without any damage to the chip. High voltages can be applied directly to the chip inputs as long as they are current limited.


In the case of the above example, the input current would be around 250uA, so well within device ratings.
 

Armp

Senior Member
In general that is good advice, but as always there are exceptions.
On the subject of applying high voltages to input pins Microchip say this in AN521;

THEORY OF OPERATION This application takes advantage of the input static protection circuitry that exists on all I/O pins of a CMOS PIC16C5X. These protection circuits are designed to short the inputs to the power supplies when a large overvoltage is applied, thus protecting the chip from static electricity spikes. On PIC16C5X microcontrollers, this protection circuit is two large P-N diodes on each input (Figure 1).
The PIC16C5X are an exception as they have BIG diodes, and their spec input limit of Vdd+0.6 ( instead of Vdd+0.3 ) allows for diode clamping... Vf would probably be around 0.5V at the designed 32uA.

IMHO This does not apply to current picaxe chips, as indicated by the inclusion of a schottky diode in the "Enhanced Serial Download Cable". This limits the -ve excursion to ~0.3v, rather than 0.6v
 
Last edited:
The 7.4V trace has been cut and is no longer an issue. I checked all the connections related to the memory chip and are correct. But I am still getting 255 when I read the data. I am making a new PCB with a new FM24W256 and will try again.
 

Armp

Senior Member
i2c pins need to be set as inputs at the start of the program (you have them as outputs)
Other that that it looks ok, 255 could mean the i2c device is not responding at all (pull up resistors give you the 'all 1s' to generate 255), so check all connections.
Technical - do you have details of what actually occurs when "hi2cin Addr,(b22,b23)" is executed? In particular please check if the first part of the operation, that writes the 'address to be read', to the device is terminated by a 'restart' and not a 'stop, start' sequence. Many devices will accept stop/start, this one seems to want a restart....
 
Last edited:

Armp

Senior Member
The 7.4V trace has been cut and is no longer an issue. I checked all the connections related to the memory chip and are correct. But I am still getting 255 when I read the data. I am making a new PCB with a new FM24W256 and will try again.
Just for kicks can you try this bit of replacement code as a test?
Tries to change addressed acess to sequential access.

Code:
     Retrieve:
  hi2cout 0,(b22)             ' Fudge to set Internal Latch to zero
  For Addr=0 to 32767 step 2
  'hi2cin Addr,(b22,b23)
  hi2cin (b22,b23)          ' Do a sequential READ
  sertxd (#b22,com,#b23,com,#Addr,RET,LF)
  If Addr=20 then Stopr
  Next Addr
      Stopr:
 
Armp,
Thanks again, for trying to help.
I tryed but the result was the same.
I also checked all the connections and look OK. The pullup resistors on the board meassure 4.68K and 4.65K respectively.
 

westaust55

Moderator
The 7.4V trace has been cut and is no longer an issue. I checked all the connections related to the memory chip and are correct. But I am still getting 255 when I read the data. I am making a new PCB with a new FM24W256 and will try again.
Seems that you should be testing your circuit for FRAM connection on Breadboard until you understand where the difficulty or problem is.options could include:
1. Bad chip
2. Incorrect circuit connections

You could post some clear photos of your existing board and maybe someone with a sharp eye might spot any circuit error.
 

hippy

Ex-Staff (retired)
Technical - do you have details of what actually occurs when "hi2cin Addr,(b22,b23)" is executed? In particular please check if the first part of the operation, that writes the 'address to be read', to the device is terminated by a 'restart' and not a 'stop, start' sequence. Many devices will accept stop/start, this one seems to want a restart....
Using the test program ...

Code:
#Picaxe 20X2
HI2cSetup I2CMASTER, $A0, I2cSLOW, I2CWORD
HI2cOut $33AA, ( %10000011 )
Pause 20
Do
  HI2cIn $33AA, ( b0 )
  Pause 100
Loop
Results are as attached. That's definitely a Repeated Start as far as I can tell.
 

Attachments

Technical

Technical Support
Staff member
We can't see anything wrong here, so we may just buy one of these FRAMs and try it out ourselves here.
However when having problems like this we would always drop down to the slowest possible speed whilst trying to work out what is going on - out of interest have you tried i2cslow yet? Things like slew rate, pull up value and PCB trace length are far less significant at slower speeds.
 
Last edited:
I tried i2cslow and had the same results. Currentrly I am building a test module containing only the FM24W256 and will plug it on a bread board with the picaxe and rest of the individual components. Will send photos ASAP.
Thank you again.
This type of concern and support is why I am a Picaxe fanatic. Besides, communicating with people in this forum has improved my English language skills :).
 

hippy

Ex-Staff (retired)
Currentrly I am building a test module containing only the FM24W256 and will plug it on a bread board with the picaxe and rest of the individual components. Will send photos ASAP.
The first thing I would try is an I2C Eeprom chip with the test code modified appropriately and see if that works. If it does then the hardware you have can reasonably be said to be sound and the issue is elsewhere. At the moment we don't know that it is.

I'd also test with two or more RAMTRON chips to check it's not just bad luck and the one being used is faulty; it's unlikely they all would be. We also cannot discount that the RAMTRON used has been damaged if it has been connected to greater than any pin's rated VDD maximum..

If Eeprom works but RAMTRON doesn't it's a question of what's different when using an Eeprom or a RAMTRON chip ? A scope or logic analyser helps there but otherwise it's just basically guess work and analysis.
 

Anobium

Senior Member
Interesting ....

I have Ramtron memory ICs. Only yesterday I ordered the SOIC adapters, then today I read this.

@Technical. I will assist, if I may, I have logic analyser but first I need to mount devices etc.

I will update all as I progress.
 
It works now

I etched a new adapter and used a new chip. Tested it on a breadboard and worked fine. The code is as follows:
Code:
High C.1 
	DirsC = %00100111
  	DirsB = %00010000
hi2csetup i2cmaster, %10100000, i2cfast_8, i2cword

Symbol COM = 44     	'comma
Symbol RET = 13     	'carriage return
Symbol LIN = 10     	'line feed
Symbol Addr = W10    	'b20 b21
Low C.1			'Allow writing
  Addr=100
  b22=100
  b23=0
  
  For Addr=100 to 32767 step 2
  hi2cout Addr,(b22,b23)
  b22=b22*2/3
  b23=b23+5
  pause 10
  If Addr=120 then Retrieve
  Next Addr
  	Retrieve:
  pause 10
  For Addr=100 to 32767 step 2
  hi2cin Addr,(b22,b23)
pause 10
  sertxd (#b22,com,#b23,com,#Addr,RET,LF)
  If Addr=120 then Stopr
  Next Addr
  	Stopr:
  
  End
 

Attachments

Anobium

Senior Member
FM24V10 working with 08m2

No issue with 08m2 and FM24V10 (1Mb Serial 3V F-RAM Memory).

See code below for 08m2.

Code:
#picaxe 08m2
#terminal 4800
pause 2000
high C.4 
	DirsC = %00100111
  	DirsB = %00010000
hi2csetup i2cmaster, %10100000, i2cfast_8, i2cword
pause 2000
Symbol COM = 44     	'comma
Symbol RET = 13     	'carriage return
Symbol LIN = 10     	'line feed
Symbol Addr = W10    	'b20 b21
Low C.4			'Allow writing
  Addr=100
  b22=100
  b23=0
  
  For Addr=100 to 32767 step 2
  sertxd (#Addr, " = " , #b22,com,#b23,RET,LF)
  hi2cout Addr,(b22,b23)
  b22=b22*2/3
  b23=b23+5
  If Addr=120 then Retrieve
  Next Addr
  
  
  
  
 Retrieve:
  High C.4			'Prevent writing
  pause 10
  
  
  For Addr=100 to 32767 step 2
  hi2cin Addr,(b22,b23)
  sertxd (#Addr, " = " , #b22,com,#b23,RET,LF)
  If Addr=120 then Stopr
  Next Addr
  	Stopr:
  
  pause 1000
  goto Retrieve
  End
 
Last edited:

westaust55

Moderator
I repeated everything but with a different chip. Therefore I have to say it was the chip.
Could it have been the adapter board?
Hairline crack in a track or dry joint at a solder connection?
Have you done a continuity test from chip legs to adapter pins?
 
Could it have been the adapter board?
Hairline crack in a track or dry joint at a solder connection?
Have you done a continuity test from chip legs to adapter pins?
I checked continuity from chip legs to traces and it was good. If the chip was OK to start with, I may have damaged it by overheating. With the new chip in a new adapter it works fine.
 
Top