On 17 Oct 2008, at 22:32 , Rob Hamerling wrote:

> The story began when I found out the at 12F510 which doesn't want to
> blink as one of the few PICs of my collection. Even now I think I know
> it still doesn't want to blink, maybe there are more snags somewhere.
>
> Due to the 'discovery' of other registers (at least register names)
> concerned with the comparator module(s) I need some help / advise.
>
> At first I had an idea to normalize the register names (or at least  
> add
> an alias), for example first comparator CMCON1, second comparator
> CMCON2. But after some datasheet reading I found out that different
> register name means in general also different functionality. So
> normalizing maybe not feasible.

All these registers do start with " CM".

> G5-fiwihex:~/jalv2/jallib/unvalidated/include/device eur$ grep "  
> CM" *.jal
> 10f204.jal:var volatile byte  CMCON0               at { 0x7 }
> 10f204.jal:var volatile bit   CMCON0_CMPOUT        at CMCON0 : 7
> 10f204.jal:var volatile bit   CMCON0_COUTEN        at CMCON0 : 6
> 10f204.jal:var volatile bit   CMCON0_POL           at CMCON0 : 5
> 10f204.jal:var volatile bit   CMCON0_NCMPT0CS      at CMCON0 : 4
> 10f204.jal:var volatile bit   CMCON0_CMPON         at CMCON0 : 3
> 10f204.jal:var volatile bit   CMCON0_CNREF         at CMCON0 : 2

I think we need to differentiate between versions of the comparator  
as well. For the 18F's there seem to be 5 different versions?

> #define CC1_IO_V1
> #define CC1_IO_V2
> #define CC2_IO_V0
> #define CC2_IO_V1
> #define CC2_IO_V2
> #define CC2_IO_V3
> #define CC2_IO_V4
> #define CC2_IO_V5
> #define CC3_IO_V1
> #define CC4_IO_V1

(MCC18: cm_io.h)

But let's not focus on those. I'll see if I can do some datasheet  
reading. Where did you get the versions of the ADC for the 10/12/16F  
pics?



> Correcting the name from MPlab .dev name to datasheet name is also not
> so easy (~ takes lots of time).
I can help.

> I have updated the 'findanalog.wiki' to show the variety of CMCON-like
> names... Maybe someone has a good idea???

findanalog.wikis is a fantastic resource for the ADC versions and  
SFRs. My knees tremble if I think about writing all-emcompassing code  
for 11 versions with a different number of pins and different ways of  
setting the pin directions. But I said I'd do it, and I will.


---
ir EE van Andel [EMAIL PROTECTED]  http://www.fiwihex.nl
Fiwihex B.V. Wierdensestraat 74, NL7604BK Almelo, Netherlands
tel+31-546-491106 fax+31-546-491107



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to