Hi Seb,
Sebastien Lelong wrote: > I've noticed some inconsistencies in device files about CHS bits. Every PIC > (which can ADC) has ADCON0_CHS, except 16f737.jal, 16f747.jal, 16f767.jal, > 16f777.jal, which provide ADCON0_CHS3. I guess this is coming from dev > files, but I was wondering it's possible to normalize these to ADCON0_CHS, > with the "3", like the others. Looks like Microchip was looking for a free bit! As you can see ADCON has a 'bit*3 ADCON_CHS' field, but a bit*4 field would be needed for channels 8 and up. Apparently is wasn't possible to put the 4 bits inline and the 4th bit had to go elsewhere.... It seems it can be normalized (only) with an ADCON_CHS'put() procedure which takes a bit*4 variable (or a full byte) and puts bits 0..2 in ADCON_CHS and bit3 in ADCON_CHS3. > I don't know which impacts this have on device files generation, so if this > gives too much a weird exception, let me know, I'll handle them in the lib. Since it is an issue with the device, the device files seems the right place for a solution. But I'm afraid I have no time on short term. You could experiment yourself with a 'put routine which can be copied to device files later. 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 -~----------~----~----~----~------~----~------~--~---
