Hi Rob,

Thanks for your help.
Am using PIC18F2580.

Cheers,
Filipe Santos

On Tuesday, August 16, 2022 at 7:30:10 PM UTC+1 rob...@hotmail.com wrote:

> Hi Filipe,
> Your question about the 40 MHz depends on the pic you are using 
>
> Which one is that?
> Kind regards. 
>
> Rob
>
> Met vriendelijke groet,
> Rob Jansen 
> ------------------------------
> *From:* jal...@googlegroups.com <jal...@googlegroups.com> on behalf of 
> flyway38 <fsfo...@gmail.com>
> *Sent:* Tuesday, August 16, 2022 8:16:59 PM
> *To:* jallib <jal...@googlegroups.com>
> *Subject:* Re: [jallib] PIC18F2580 ADC CHANNELS 
>  
> Hi Rob
>
> Thank you very much for the heads up.
> Managed to make it work, doing some changes to "old" ADC_Channels... :D
> But will move my JAL install to the new one.
> Thanks once again.
>
> Now am trying to make this PIC to run at 40MHz...
> Any help here?
> Thanks
>
>
> Cheers,
> Filipe Santos.
>
> On Tuesday, August 16, 2022 at 6:10:43 PM UTC+1 rob...@hotmail.com wrote:
>
> Hello Filipe,
>
> I had to look this up since the library adc_channels.jal does not exist 
> anymore since Jallib release 1.5.0. It was there in 1.4.0 and currently we 
> are at 1.7.0.
>
> The problem was that the library was not maintainable anymore so it was 
> removed and the configuration of the channels was moved to the program of 
> the user. Also the use of JANSEL was removed from all device files because 
> of the same reason.
>
> So I suggest you download the latest Jallib release and look at one of the 
> adc sample files. They are all updated to incorporate this change.
>
> For example, a typical adc set-up in your main program will then look 
> something like this but this is PIC dependent.
>
> -- Step 1: ADC analog input pin setup 
> const byte ADC_CHANNEL = 3                      -- potmeter connected to 
> pin_AN3
> ANSEL_ANS3 = TRUE                               -- port 3 is analog input 
> (default)
> pin_AN3_direction = input 
> -- Step 2: Set VDD and VSS as Vref
> ADCON0_VCFG = FALSE                             
> -- Step 3: Use Frc as ADC clock 
> ANSEL_ADCS = 0b011                              
> const ADC_RSOURCE = 4_700                       -- Input resistance: 4.7K 
> potmeter
> -- Now we can include the library
> include adc                                     
> -- And initialize the whole with our parameters
> adc_init()                                      
>
> Kind regards,
>
> Rob
>
> ------------------------------
> *Van:* jal...@googlegroups.com <jal...@googlegroups.com> namens flyway38 <
> fsfo...@gmail.com>
> *Verzonden:* dinsdag 16 augustus 2022 17:58
> *Aan:* jallib <jal...@googlegroups.com>
> *Onderwerp:* [jallib] PIC18F2580 ADC CHANNELS 
>  
> Hello to all,
>
> Am coding for this PIC (18F2580) now.
> Need to use ADC and compiling fails with this log;
>
> LOG:
> jal jalv25r6 (compiled Oct 29 2021)
> generating p-code
> 992 tokens, 700421 chars; 14125 lines; 19 files
> generating PIC code pass 1
> generating PIC code pass 2
> 1293 data accesses checked, 0 errors
> 87 skips checked, 0 errors
> writing result
> C:\JALLIB~1\lib/adc_channels.jal:3315: "
> Unable to configure ADC channels.
>     Configuration is supposed to be done using ANS bits
> but it seems there's no ANS bits for this PIC.
>     Maybe your PIC isn't supported, please report !"
> 1 errors, 0 warnings
>
> Any help will be appreciated.
> Thank you.
>
> Kind regards,
> Filipe Santos.
>
> -- 
> 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 jallib+un...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jallib/ab00461c-c965-43b7-8ef4-c8d726515d85n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jallib/ab00461c-c965-43b7-8ef4-c8d726515d85n%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 jallib+un...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jallib/3c8637ac-86dc-4ac5-ae44-b6b19cd98228n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jallib/3c8637ac-86dc-4ac5-ae44-b6b19cd98228n%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 jallib+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jallib/a5b65474-835b-457f-a112-f7ac8b068fcfn%40googlegroups.com.

Reply via email to