Archives
-
My attempt at 23K256 SRAM drivers. Includes 8-bit version.
I’ve been thinking about doing something like this for several years.
Every so often there is some discussion on this forum about using multiple memory chips in parallel.
When the CS came out I purchased some extra 23K256 SRAM chips. I figured I’d want to learn how to use the 23K256 chips that are on the C3 so I might as will have some extra for other Propeller projects.
I also wanted more memory to use with my machine vision project so I attempted an eight chip/bit SRAM driver.
I stacked the eight DIP chips on top of each other and soldered the common pins together. I soldered the serial in pins to a male header and connected each serial out pin to the male header through a 110 ohm resistor (for each of the eight chips). I also connected the Vdd, Vss, chip select and clock pins to the male header.
I soldered a 10 uF capacitor to the top of the stack.
Here’s a picture.
Five of the chips have their serial out pins connected to their serial in with a resistor. The other three chips just have a wire connecting serial in and serial out. (I changed the resistors to wire on the three in to see is the resistors were causing a problem. They weren’t.) It turned out to be important to change the data pins to inputs immediately after after giving a read command. Otherwise there was a conflict with the output from the Prop pin and the output from the SRAM.
After writing a one chip driver and testing it on all eight chips, I wrote the eight bit driver. These chips are the easiest SPI devices I’ve worked with. There aren’t very many commands and there are just three modes to the chips. Both of my drivers only use the sequential mode.
Since there are eight chips in parallel each byte is written as one bit per chip. This means the SRAM memory address increments just once for every eight bytes written to, or read from, it.
I looked at the Spin 23K256 driver from the C3 downloads but I haven’t looked at other 23K256 drivers.
Now that I’ve finished my drivers, I’ll take a look at any others in the OBEX to see if mine are worth posting there.
Both the single chip and eight chip drivers share the serial in and serial out pins. The single chip driver will need some serious rewriting to use with the C3. If I can’t find any fast C3 drivers for these chips, I’ll probably modify my driver to work with the C3. I’d be surprised if someone hasn’t already written a good (fast) driver for the C3′s 23K256 chips.
These SRAM chips don’t wear out like EEPROMs, right? I want to use these chips for a circular video capture buffer and the entire chip will be written to several times a second. This is the type of application SRAM is good for, right?
Here are the drivers. They both write a 1,024 block of data to the SRAM, read the data back, compare it with the original data and then write the same block to the next section of SRAM. The drivers continue to write the block of data until the entire SRAM has been tested. If there aren’t any errors, the program asks to be turned off.
The 8-bit driver could be faster if the data pins were on Propeller pins 0 through 7. The shift instruction in both the read and write routines could be deleted. This would speed things up a lot since presently the Hub window is missed by one instruction.
Sometime I need to learn the tricks of using the counters for clock signals. I think a counter controlled clock would also speed up this driver.
As is, the 8-bit driver can read and write faster than 1 million bytes a second (@80MHz). The eight 32K chips grouped together makes for 256KBytes of memory.
PASM is awesome!
Duane
Single chip version: SramSingleTest110528d – Archive [Date 2011.05.28 Time 11.26].zip
Eight chip version: SramByteTest110528a – Archive [Date 2011.05.28 Time 11.26].zipRelated Forum Messages
- SRAM which two chips can read/write
- Interfacing SRAM with classic Gameboy
- Flash Point – Ram Page
- FlexMem: <$25 Memory expansion for ANY propeller board with a 10 pin header! (F
- Connetc 2 Arduino to same SRAM
- Adding EEPROM or SRAM practical?
- Good SRAM chips and/or tips for AVR (ATMEGA8 and so on)?
- Adding Memory for working variables via 23K256 or 23K640 SRAM
- Using the propeller to Clock other Chips
- MCP23017/MCP23018 speed and usefulness?
- ATmega328 – SRAM size limit
- SRAM class using 23K256
- Unsolved Sharing Multiple ADC Data pins?
- Guidance for using counters to build an SPI bus interface
- SRAM Chip with SPI
- Avr312/gcc – software I2C via USI blocks other I2C chips
- Flash EEPROM programmer
- Check Sum issue
- Problem with connection to SPI SRAM 23K256
- Beyond the Sanguino
I'm looking for a small, 32KB or so SRAM device that two MCUs can read or write (at two different times; I don't need simultaneous reading/writing.) It would be good if it used a serial interface as well. The problem I'm trying to solve is sending data between two devices without the other device having to pause to receive this. I would transfer an audio sample into the buffer, then the other chip, as required, would read the audio out, and do something with it. I've found serial SRAM's like Microchip's 23A256/23K256, however, they seem to have a single serial ...If you take apart a classic gameboy cartridge it basically just has an addressing chip and a ROM chip on it. Would it be feasible to take out the ROM and instead connect the addressing chip and the rest of the addressing pins directly to a set of SRAM chips? For example you'd have a circuit powered by the arduino that would write into the SRAM chips connected to the gameboy through the cartridge and when it's done you could turn on the gameboy and it would read from the SRAM banks. This would mean two circuits have only the SRAM ...Here's my top-secret big idea (I'm such a blabber mouth): I'll combine a SQI flash chip with 4 SPI SRAM chips. The SRAMs will have SI and SO connected together (I may use a series resistor on SO for failsafe) and all four sharing the same clock and chip select. Will it work? Don't know... I hope to find out by Friday... But, maybe you can convince me this won't work and save me time and money? In this nibble configuration, the board will use 8 pins. That will let it still work on the Prop Demo board. In byte mode, it will need 12 pins. This is ...Hi guys, In my PropCade thread, heater asked about a low pin count parallel SPI ram solution... I was not going to reveal FlexMem until it was tested, but since he was asking... Like PropCade, FlexMem was inspired by my work with VMCOG. I have not had a chance to write the driver yet, however that is high on my list of priorities... until then, the driver from obex.parallax.com/objects/346/ Tim Moore's "N256S0830HDA SPI SRAM driver" should work, once the pins are adjusted to FlexMem. After sending the design to Sapieha, he made another amazing layout! FlexMem Features: - Works on ANY Propeller board that supports ...Hi everybody. I wuold like to start some experiments with SRAM. I would like to create a simple computer using 2 Arduino connected to a breadboard where there is a SRAM chip. The first Arduino, the "CPU", will execute some code and generate several datas (for example a Game of Life) that it will write into the SRAM chip. The second Arduino, the "VDC" (Video Display Controller) will read from the same memory the datas and will display them into an LCD. My question is: how can I connect the two Arduino to the same RAM? Is there a way to tell an Arduino not ...I have seen IC2 chips such as EEPROM - 24LC256 http://ww1.microchip.com/downloads/en/devicedoc/21822e.pdf and SRAM 23A256 http://ww1.microchip.com/downloads/en/devicedoc/22100c.pdf that could be connected to the Arduino for increased memory and I have a few questions. If you have written a sketch that needs additional memory would these chips perform well or would the Arduino have to run relatively slow to utilize the chips resources? I realize you could use a SD card instead of EEPROM but, would EEPROM be faster or slower? Would the SRAM be helpful and quick for storing chunks of data before transferring to a SD card? All knowledge is welcome, ...Hi, This is a bit of a general question, but I have done research and saw an article here (http://www.avrfreaks.net/index.php?module=Freaks%20Toolsampfunc=viewItemampitem_id=318) about interfacing SRAM to an AVR, but it's rather not good, b/c it involves too many chips. I browsed through mouser.com on SRAM chips that SPI/I2C interface supported. Ok, see many of them, but which ones are good for AVR, that I would like very much if people in this forum have some suggestions, even sample code, etc. And I saw the avr-lib FAQ to know how interact with SRAM from a compiler point of view. This helps a lot ...I am providing this as a working example of accessing the Microchip 23K256 SRAM chip using a 28X2 Picaxe chip. This chip has 32768 x 8bit Bytes available. I had to slow down the SPI but that might be due to the wiring using long leads etc.So I was listening to the counter episode of first spin today and Roy said the propeller can generate frequincies up to 125mhz or so using counters with a PLL, thats pretty impressive.. Anyways I was thinking about this and wondering when you use a propeller to generate a clock line is it as accurate as the crystal in the propellers PLL circuit? So for example I saw this being done in the TCP driver for the enc28j ethernet chip, Harrison Pham did an option in his driver to drive the ethernet chip with a prop line instead of a crystal ...Ok so this board im designing right now is going to be using the MCP23018 which is basically the same as the 23017 except it has an open collector and 5v tolerant pins, yay! Anyways as the design stands right now the board will have 53 I/O pins. This is because I plan on chaining my i2c chips on the same bus as the EEPROM. This got me thinking about some stuff though which im a little hazy about and didn't even realize it till now. First of all the data sheet for the 230xx devices isnt to clear about speed, ...Hello, firstly, hello, im new here... I've worked with PIC's before but new to the atmel range of chips. This place looks like theres plenty of great ideas floating around, so would really appreciate any help in the comming weeks / months! I'm new to the idea of using external RAM for these small chips, so would really appreciate some ideas with regard to the following problem. Essentially I am going to start development with a ATmega328 on a Arduino devel board, working with an STA013 MP3 decoder. I will require buffering of all MP3 data entering the atmel chip ...I had a need in a project for a fast easy external memory. Microchip's 23K256 is ideal. I looked at Spi Library and Spi RAM Library from the arduino playground. What I really wanted was to have the ram accessible continually from my code. I did not want to pass address and length each time I stored or retrieved data. My class has four functions: writestream: Setup the SRAM in sequential write mode starting from the passed address. Data can then be written one byte at a time ...My current project uses two ADC0831 chips and one ADC0834. I needed the 0831 chips because the Reference and Offset voltages can be set individually, whereas the 0834 has one "global" Vref pin and is used for four LM34 temp sensors. I am planning to share the Clock pins, but I know the CS pins have to be different for each ADC. That being said, 1.) Can I use one BS2 pin for all three ADC Data OUT signals? 2.) Can I use one BS2 pin for all three ADC Data IN signals? My logic makes me think yes since each ...I'm asking for guidance on building a higher speed SPI driver using counters. Here's what I have done so far. I am working with a WizNet W5200 that has a 80MHz SPI interface. I built two SPI drivers; one gleamed from AN012: Interfacing the Propeller to External SRAM with SPI and the other is a PASM version of the application note. The drivers work great. The PASM driver can deliver bust data at ~5M bits/sec up and down. I studied several SPI counter drivers in the OBEX that implement similar schemes. CTRA/B is use as the clock while CTRB/A and PHSB/A IO ...Hi Im looking for SRAM even 1 kb would do, preferably SPI . So any of you guys know of any chips easily available. Microchip 23k640 SRAM SPI would be perfect but i cant find it anywhere. RegardsHi there, I've downloaded Atmel's avr312.zip for IAR and changed the code for gcc. The Changes i've made are: * Compiler defnition for pins ( __AVR_ATtiny2313A__ ) * The ISRs from #pragma..... to ISR * The ltavr/io.hgt include The Code compiles fine for my tiny2313A and it works. I have attached a hd44780 and it shows me the bytes received by i2c. The Chip is connected to a AVR32's I2C Bus as well as some other I2C chips: max127 ADC pcf8574 max6956 LED driver I've written a linux program which uses these three chips. If i run it with the ...Given the abundance of GPIOs at 3.3V, using the Raspberry Pi as programmer for Flash EEPROMs (commonly used as BIOS chips) would be awesome. Pretty much all flash chips (Parallel/FWH/LPC/SPI interfaces) nowadays use 3.3V, so you'd just need a Raspberry Pi to recover from a failed BIOS/EFI/PXE/firmware/whatever update or to write a new image to such a flash chip. (Please note that I'm not talking about flash chips used in SSDs or USB pen drives, those are way more complicated to work with.) The open source flashrom tool at http://flashrom.org/ is a perfect match for this task. It can use GPIO interfaces ...After programming a Mega162 in assembly via Studio 4 and STK500 I sent the Hex file to a production programmer along with a programmed chip to compare the 2 check sums. He is using a BP Micro 1700 to flash the chips. The check sums dont seem to be the same in the programmed chip I sent and the chips he flashes at his end however both chips perform as they should when tested. (The fuse and lock bit settings are the same). Could this be comething to do with the different hardwares/softwares used? At the start of my program ...I am trying to connect the SPI SRAM 23K256 with PIC16LF877a, double checked everything about the connection and the codes,still no result... The following is the test code I am using..I appreciate if anyone could find out what's the potential problem: PIC16LF877A 23K256(32Kbyte RAM) CLEAR DEFINE OSC 4 ; System speed DEFINE LOADER_USED 1 ; ; Define LCD registers and bits DEFINE LCD_DREG PORTD ; DEFINE LCD_BITS 4 ;width of data path DEFINE LCD_DBIT 4 ;data starts on bit 4 DEFINE LCD_RSREG PORTE ; DEFINE LCD_RSBIT 0 ; DEFINE LCD_EREG PORTE ; DEFINE LCD_EBIT 1 ; INCLUDE "MODEDEFS.BAS" ; CS VAR PORTA.5 ; Chip select pin SCK VAR ...I'm just wondering what stopped Zach at RRRF from using a larger chip (than the ATmega644P). There are a lot more options that have more pins and memory, etc. The biggest one is the ATmega2560 with 100 pins (86 max I/O pins), and a bunch more of the other stuff (see [www.atmel.com] for a list of the various chips). It is $17.97/unit at Mouser, though, so perhaps not that one specifically, but the ATmega640 is the same thing with less Flash, EEPROM, and SRAM for $11.80 (which makes it more comparable to the ATmega644P, which is around $6-$8). I think ...
