Maybe this should be [OT]?? Hi, i've been thinking about a "perfect" ram chip for a PIC, small, simple, but with a big capacity (1 megabyte) and very fast and PIC-friendly data transfer. Something many times faster and simpler than I2C with a basic parallel format. A 1Mb static ram in a 12-pin DIP, which needs only 10 PIC pins: * D0-D7 (8 data lines) * Read strobe (control line) * Write strobe (control line) The PIC can read/write two full bytes to the ram at a time with each control pulse: when read strobe goes / ram shows the next byte, when read strobe goes \ ram shows another byte, giving the ability to read twice as many sequential bytes in a fast block read. The ram address counter always increments to the next byte position. The same for writing sequential bytes. With each strobe pulse you can write 2 sequential bytes to the ram. Or continue strobing to write a block. By using the extra control sequences available from our two strobe lines we can also write a one or two byte address to the ram. Giving 65536 adressable locations of 16 bytes each, and the ability to do fast contiguous block read/writes from anywhere to anywhere. Bytes are read in pairs, no big problem considering the speed gains. The main advantage would be a SINGLE SMALL CHIP with a very high capacity of ram which can be read by the minimum PIC code (and pins) at very high block data rates. To send a 16bit address to the ram chip would probably be about 10 or 12 PIC instructions. Or you could send just the low address byte, in about 6 instructions. How quick for a block load from the 1Mb ram to our 16f628? 1Mb/second? block_load bsf PORTA,rstrobe ; send / read_strobe pulse to ram movf PORTB,w ; get first ram byte! movwf INDF ; save byte to PIC internal ram incf FSR,f ; move our pointer bcf PORTA,rstrobe ; send \ read_strobe pulse to ram movf PORTB,w ; get second ram byte! movwf INDF ; save byte to PIC internal ram incfsz FSR,f ; move pointer again and test goto block_load ; keep looping ; block must be done here. That's 10 pic instructions for 2 bytes of ram loaded, or a data transfer rate of 1 million bytes per second on a 20MHz PIC! The ability to read/write full banks of PIC ram very quickly to a HUGE external static ram opens up a lot of possibilities, especially with just one small PIC and one 12-pin ram chip. Now Microchip have the 16f628 and similar small powerful chips this would be a dream ram, suitable for high speed high capacity datalogging or DSP, or maybe a PIC + 1Mb ram + graphics lcd? Or a very powerful "interactive talking" pcb with only 2 chips and some buttons? I wish someone was making these ram chips. :o) -Roman -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu