
dknovick
EstablishedMember-
Content Count
9 -
Joined
-
Last visited
Community Reputation
0 NeutralAbout dknovick
-
Rank
Newbrie
Contact Methods
-
Website URL
http://
-
ICQ
0
-
Yahoo
dknovick
Profile Information
-
Location
Albuquerque, NM
-
Using Boostc To Read Adc Input?
dknovick replied to Louhimo's topic in BoostC and Chameleon compilers programming
In that case, I'll definitely look into it. I still do some things old-school. -
Using Boostc To Read Adc Input?
dknovick replied to Louhimo's topic in BoostC and Chameleon compilers programming
I guess I answered my own question, the code seems to work in hardware. I blink an LED after the while loop... and, well, the LED blinks. Next up, hooking a pot to the input to see if I can turn the LED on at a certain voltage. -
Using Boostc To Read Adc Input?
dknovick replied to Louhimo's topic in BoostC and Chameleon compilers programming
Haven't had the time to dig into serial stuff yet (that's next). -
Using Boostc To Read Adc Input?
dknovick replied to Louhimo's topic in BoostC and Chameleon compilers programming
So, how would be know if it has a compatible ADC? -
Using Boostc To Read Adc Input?
dknovick replied to Louhimo's topic in BoostC and Chameleon compilers programming
Maybe this will help us both out. I'm using a PIC16F88 to read in an A/D value. I have it set up to use the RC oscillator (INTRC) so that it runs as 31.25 kHz (I need to use it as a nanoWatt device). Here's my small bit of code: #include <system.h> #pragma DATA _CONFIG1, _CP_OFF & _CCP1_RB0 & _DEBUG_OFF & _WRT_PROTECT_OFF & _CPD_OFF & _LVP_ON & _BODEN_ON & _MCLR_OFF & _PWRTE_ON & _WDT_OFF & _INTRC_CLKOUT #pragma DATA _CONFIG2, _IESO_ON & _FCMEN_ON // Set 20MHz clock frequency #define CLOCK 31250 #pragma CLOCK -
Ahhh yes, that did it! page 153 for the 'A'. I hadn't looked at that part of the manual. Thanks!
-
You are right! page 153 for the 'A'. I hadn't made it that far into the manual. I dug through the timer 0 and timer 1 descriptions. And now it just does! Thanks!
-
I'm using a PIC 16F876A Is there only one interrupt service routine (ISR)? void interrupt( void ) I ask, because I'm trying to use timer1 to set the duty cycle and frequency of a output, and while that works, I have to have timer0 running in order for the ISR to be called. Stepping through the program, I can watch TMR1 increment and on overflow it sets TMR1IF of the PIR1 register. However interrupt() isn't called until TMR0 rolls over. Maybe I'm doing something wrong? Here's my code: #include <system.h> #pragma DATA _CONFIG, _CP_OFF & _DEBUG_OFF &