I am struggling with Interrupt on Change this afternoon and cannot figure whats wrong ...
Now this would be the ultimate wizard.
Prepare the settings for the DT-INTs too!
Ioannis
I am struggling with Interrupt on Change this afternoon and cannot figure whats wrong ...
Now this would be the ultimate wizard.
Prepare the settings for the DT-INTs too!
Ioannis
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Great - Thanks Darrel!
@ Paul, this is direct from the 16f1947 datasheet:
When configuring and using the ADC the following
functions must be considered:
• Port configuration
• Channel selection
• ADC voltage reference selection
• ADC conversion clock source
• Interrupt control
• Result formatting
Maybe that helps to get the stuff I forgot? As an FYI there are 17 available channels for this device. Not counting the temp sense, DAC, and FVR. for a total of 20. (last 3 are internal)
Maybe also assign a variable to start conversion?
Last edited by cncmachineguy; - 15th September 2010 at 21:21.
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
WINE yes. See the site in my signature. I did not wiki it because I did not know if there would be much interest.How do you get mpasm (or do you) on to linux? Are you using WINE?
Paul,
Here is a sample or three for headers with ADC
Code:'16F88 ADC TEST FORCHANNEL 0 DEFINE OSC 4 OSCCON = %01100000 @ __config _CONFIG1, _INTRC_IO & _WDT_OFF & _LVP_OFF & _MCLR_OFF &_CP_OFF ANSEL = %00001111 TRISA = %11111111Code:'16F676 ADC ON PICKIT_1 DEFINE OSC 4 @ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _CP_OFF ANSEL = %00000001 'CHANNEL AN0 ADCON1 = %00010000 'FOSC/8 TRISA = %00000001 CMCON = %00000111Thanks Darrel!!!Code:'18F4320 ADC_FTP iChip @ __CONFIG _CONFIG1H, _HSPLL_OSC_1H @ __CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_512_2H @ __CONFIG _CONFIG4L, _LVP_OFF_4L DEFINE OSC 16 INTCON.5 = 1 T0CON = %10000101 ON INTERRUPT GOTO TLOOP ADCON1 = %00001110
Dave
Always wear safety glasses while programming.
Thank you Dave (and Bert). I might take tonight off however...
Darrel T: Can I include your "All Digital" as well?
No promises on the DT Instant Interrupts configurator. Guess I'm the last PBP guy who hasn't used it! I'll add it to the list.
Best Regards,
Paul
You can not... You are the only one workingI might take tonight off however...![]()
Dave
Always wear safety glasses while programming.
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Bookmarks