Hi Bill, A first analysis. The adc_clock.jal library calculates the optimal converstion time (Tad). It does this only for ADC_ADCS_BITCOUNT with values 2 and 3 but for the 16f18857 this value is 1 and so the library generates the error message.
Maybe Rob Hamerling can shine a light on this since he created that library. In the meantime I will study it to see what this Tad is about and why a value of 1 is not (yet) supported. Still I think it may be doable to adapt the adc libraries for the newer PICs. Once I have done that I will test it to see if it actually works. Kind regards, Rob ________________________________ Van: [email protected] <[email protected]> namens Rob CJ <[email protected]> Verzonden: zaterdag 19 juni 2021 09:22 Aan: [email protected] <[email protected]> Onderwerp: Re: [jallib] ADC library Hi Bill, I do not know this library but if it provides some basic functions it may be doable to make it work for other PICs too. I will see if I can make it work but I will need some time for that. Met vriendelijke groet, Rob Jansen ________________________________ From: [email protected] <[email protected]> on behalf of Bill Beek <[email protected]> Sent: Friday, June 18, 2021 9:26:16 PM To: jallib <[email protected]> Subject: Re: [jallib] ADC library Hi Rob, Vasile The modified adc lib of ROB gives the same result and error as mine. The adc lib no longer gives errors but now the adc_clock lib gives 1 error, see below : jal jalv25r5 (compiled Apr 3 2021) generating p-code 1002 tokens, 426017 chars; 8421 lines; 11 traffic jams generating PIC code pass 1 generating PIC code pass 2 63 branches checked, 0 errors 312 data accesses checked, 0 errors 44 skips checked, 0 errors writing result C:\JALLIB~2\lib/adc_clock.jal:156: "Found unsupported value for constant ADC_ADCS_BITCOUNT" 1 errors, 0 warnings For the adc test program i use 16f876a_adc.jal from the sample programs, with of course the right fuses for the used 16f18857 Perhaps Vasile is right that this series of PICs needs its own library. I also take a closer look into the problem . Thanks for your effort. Kinds regards Bill. On Friday, June 18, 2021 at 1:09:35 PM UTC+2 [email protected] wrote: Hi Bill, I added an alias to cover with the difference but could not test it. It then compiles without errors so I do not know where your other error message comes from. Can you clarify that? I attached the updated library with the alias. Let me know if it works (or the problems you encouter). Thanks. Kind regards, Rob ________________________________ Van: [email protected] <[email protected]> namens Bill Beek <[email protected]> Verzonden: donderdag 17 juni 2021 15:56 Aan: jallib <[email protected]> Onderwerp: [jallib] ADC library Hello all, When I tried to do a test with analog input on the 16F18857 I found that the library adc.jal gave 7 errors. In particular, the "adcon0_chs" was not recognized. The lib of the 16F18857 does recognize it the "adcon0_adcs" . It seems that some newer MCU's have this problem as well. After a change of the adc lib a new error occurred, _error "Found unsupported value for constant ADC_ADCS_BITCOUNT". Does anyone else have experience with this event or know a solution? Thanks, Bill -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/5305520a-4b61-4eba-9e93-0c07e34786d6n%40googlegroups.com<https://groups.google.com/d/msgid/jallib/5305520a-4b61-4eba-9e93-0c07e34786d6n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/c0832bf5-eb7f-4fe5-8090-4b7d961d17d2n%40googlegroups.com<https://groups.google.com/d/msgid/jallib/c0832bf5-eb7f-4fe5-8090-4b7d961d17d2n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/VI1PR07MB62565FA7AB025B0D8C05EF0AE60C9%40VI1PR07MB6256.eurprd07.prod.outlook.com<https://groups.google.com/d/msgid/jallib/VI1PR07MB62565FA7AB025B0D8C05EF0AE60C9%40VI1PR07MB6256.eurprd07.prod.outlook.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/AM0PR07MB6241992EED78E63795269B35E60C9%40AM0PR07MB6241.eurprd07.prod.outlook.com.
