Hi Rob, I added the aliases as per Matt's request, so hopefully he will answer your questions and do some testing as well. I'm surprised if he didn't provide a sample of 18F SD card already?
I have no way of knowing whether a particular 18F chip is 100% compatible, or has errata, etc. As to the aliases that I added -- I simply cut and pasted the aliases from the hardware i2c library. Yes, I had rather modest goals of the library -- a single SPI master. I did consider the fact that some chips might have multiple SPI masters but I decided to keep this library simple. Later on someone can write a fancy library and we can remove this one, or rename it. If someone tries to use this spi_master_hw.jal libary with a chip that doesn't actually have SPI hardware, they will get a compile-time error -- that is a good thing I think. William On Sep 6, 5:09 am, Rob Hamerling <[email protected]> wrote: > Hi William, > > William wrote: > > I went ahead and move the constants up like you suggested, and added > > some http links to some docs on SPI. > > I'm ready to 'migrate' your aliases to the device files. > I'll take spi_master_hw.jal as example for the alias declarations. > But before I begin, I have some questions/remarks. > > 1. Is the only purpose of these aliases to be able to use the (only or > first) SSP module of an 18F as midrange SSP module? And are the SSP > modules of the 18Fs 100% compatible? Are there other considerations? > > 2. Are the aliases in spi_master_hw.jal all that are needed and are > these all needed? When the SSP modules of the 18Fs have registers or > subfields which are not present in a midrange SSP module then it is > useless to declare an alias. > > 3. You do realize that only one SSP module can be used this way (ic > SSP1). This should be mentioned in the docs/comments. > I suppose a library which will support two (or more) SSP modules will > use the SSP<number>... names. > > 4. The code in spi_master_hw.jal assumes that when the name SSPCON is > not defined SSP1CON will be defined. I think there are no PICs with > only SSP2 module, but there are PICs without SSP1 module (although you > may argue that it is stupid to select a PIC without SSP modules for > spi_master_hw.jal). > > Regards, Rob. > > -- > Rob Hamerling, Vianen, NL (http://www.robh.nl/) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
