yes, I know about the 3.3v supply voltage etc. SD Cards also use 3.3v. The idea is that they will both work on the same bus.
Another issue is that they use different SPI modes. 23k256 uses SPI_MODE_00, SD Cards use SPI_MODE_11, so I will need a SPI switch procedure in the spi lib. Also will have a constant in the 23k235 lib and sd_card lib to set weather or not to switch modes before each read & write: CONST BYTE _23K256_ALWAYS_SETMODE = TRUE so at the beginning of each procedure in 23k256 I will have the following: -- put spi into the correct mode if _23K256_ALWAYS_SETMODE == TRUE then spi_init(SPI_MODE_00,SPI_RATE_FOSC_16) -- mode 00 for 23k256 end if of course hopefully we can change spi_init to spi_switch_mode I will use chip select pin for each component on spi bus. Matt. On Oct 28, 5:43 am, William <[email protected]> wrote: > Hi Matt, > > Nice to hear from you! > > How about "sr23_" for prefix to the names? And I suppose you'll put > the library under include/storage/sram/sr23k256.jal ? > > Take care: that is a lower-voltage part (not 5 volt tolerant), and > you'll need a battery if you want persistent storage. Many picmicros > will operate at lower voltages, but sometimes only at a reduced > frequency. Also some older ICSP flash-burners will not work at the > lower voltages. The ICD2 is fine, and I'm sure many others are also. > > William > > On Oct 28, 2:26 am, mattschinkel <[email protected]> wrote: > > > > > I am creating a lib for Microchip's 23k256 SRAM (costs about $1) > > > similar to 24LC256 EEPROM but much much faster (up to 20MHz) and uses > > SPI bus instead of I2C (spi mode_00) > > >http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en539039 > > > What should I name the variables & procedures since I cannot use > > numbers as first characters in procedures & vars. > > > eg: > > > 23k256_init() is > > > const byte 23K256_READ = 0b_0000_0011 -- Read data from memory > > array beginning at selected address > > const byte 23K256_WRITE = 0b_0000_0010 -- Write data to memory array > > beginning at selected address > > const byte 23K256_READ_STATUS = 0b_0000_0101 -- Read status > > register > > const byte 23K256_WRITE_SETTINGS = 0b_0000_0001 -- Write settings > > register > > > I'm an SPI kind of guy :o) > > Matt.- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jallib?hl=en -~----------~----~----~----~------~----~------~--~---
