Enclosed is my PIC asm source to access a Ramtron FM25160 FRAM SPI serial memory. Data In and Data Out Lines have been tied together to save pins, but can be separated. Wiring is as declared in the source, which can be changed: #define RAM_CHIP_SELECT PORTA, 0 #define RAM_DATA_IN PORTA, 1 #define RAM_DATA_OUT PORTA, 1 #define RAM_CLOCK PORTA, 2 The functions are as follows: RAMInit - must be called once to initialize system RAMStop - complete a read or write operation RAMWriteStart - start a sequenced write at RAMAddress RAMWrite - send a sequenced byte (w) to the chip RAMWriteByte - Write a single byte (w) to RAMAddress RAMReadStart - start a sequenced read at RAMAddress RAMRead - receive a sequenced byte from the chip into w RAMReadByte - Read a single byte from RAMAddress in w To write a series of data: Setup RAMAddress call RAMWriteStart movlw call RAMWrite - repeat last 2 for each byte call RAMStop To read a single byte: Setup RAMAddress call RAMReadByte To Setup RAMAddress, move the low 8 bits to RAMAddressLow and the high 3 bits to RAMAddressHigh<2..0> (the bottom 3 bits) Contributed by Byon Garrabrant, N6BG, byon@mail.com Aug 5, 1999 ********************************************************************** * This software is available only for non-commercial amateur radio * * or educational applications. ALL other uses are prohibited. * * This software may be modified only if the resulting code be * * made available publicly and the original author given credit. * * Contact the author or TAPR for information on commercial licenses. * * (c) Copyright 1999, Byon Garrabrant, N6BG. All rights reserved. * **********************************************************************