Hi William,
On 04/09/10 11:11 pm, William wrote:
Now my next issue-- is there a portable way to detect that for this chip, the timer0 is 16-bit capable? I was thinking of checking whether T08BIT is defined, but is there a cleaner way?
My previous reply was before I read the datasheet of an 18F about timer0.... I know now that the 16-bits core has a bit T08BIT in T0CON to configure Timer0 as 8- or 16-bits timer/counter. So you could indeed use "if defined(T0CON_T08BIT)", why do you think this might not be 'clean' enough? And you'll have to set or reset this bit to make sure Timer0 is configured properly. Nevertheless only the 18Fs have a 16-bits Timer0, and as far as I know all 18Fs have it. So a check on cpu type would be sufficient, but if that is 'cleaner'....
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.
