The current library can be used with single SSP module chip. No 18f... I could give a try with 18f, but not in the next months :)
I'd say let's go with SSPCON/SSPCON2 convention, as you suggest. About datasheets, I could download and index all PDF (using Swish-e for instance, which I know and already used). It may help us searching keywords in datasheets. But I can't open a server for this on the web... This would be for local use only. Would it be helpful ? Seb Le Saturday 24 January 2009 20:18:44 Rob Hamerling, vous avez écrit : > Hi Seb, Joep, > > Sebastien Lelong wrote: > > The global rules would be: > > > > - if one SSP module, name it SSPCON > > - if two SSP module, name it SSPCON1 and SSPCON2 > > > > ... Except datasheets seem to prefer SSPCON in *any* case. So having > > SSPCON, and if available SSPCON2 would be nice IMHO. What's your point ? > > I think this is not correct. In a 18F datasheet I found: > > Note: In devices with more than one MSSP > > module, it is very important to pay close > > attention to SSPCON register names. > > SSP1CON1 and SSP1CON2 control > > different operational aspects of the same > > module, while SSP1CON1 and > > SSP2CON1 control the same features for > > two different modules. > > So SSPCON (resp. SSPCON0, SSPCON1) and SSPCON2 apply to the same > *single* MSSP module. PICs with 2 MSSP modules (applies only to 18Fs) > have SSP1CON1,SSP1CON2 and SSP2CON1,SSP2CON2 (exceptions are candidate > for 'repair'). > > I wonder if the current library works for the midrange *and* for the > 18Fs. If only for the midrange and thus for only 1 MSSP module then the > renaming to SSPCON and SSPCON2 would be fine. > > When a separate library is needed for the 18Fs is hould support (or at > least be prepared to support) 2 MSSP modules. For PICs with 2 MSSP > modules the 'ideal' naming would be: SSP1CON1,SSP1CON2 for the first or > *only* MSSP module and SSP2CON1,SSP2CON2 for the second. This has the > advantage that including the wrong library gives compilation errors > because of different naming. > > And do we really give the registers a different name in the device files > or do we provide an alias when the name in the .dev file is 'wrong'? I > prefer rename because it matches the datasheets (according to Seb, I > only checked a few). > > Regards, Rob. -- Sébastien LELONG http://www.sirloon.net http://sirbot.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
