Thursday, August 12, 2010

The internal oscillator in the pic12f629

Recently I’ve been using the small pic12f629. My interest was to use it as a cheap D/A converter using PWM. Unfortunately, I chose this pic at the store without check the characteristics first, yeah, I know, how stupid of me! :-(
I thought it had a PWM module as well as a ADC converter, but not, no PWM and no ADC, but anyway, for my purposes it could works! Also, the price was good! just 1000 yen for 10 SO chips plus one DILP!  :-)
So, I present a program to read three inputs “quasi-digital” coming from a FSR sensor and then, according to the inputs, the pic will generate a PWM signal with width of pulse depending on the combination of the input signals.

Friday, August 6, 2010

Analog Digital converter of dsPIC30F3012 using internal ADC clock

I have been reading about the ADC for the dspic30F3012 or the family of these dsPICs.
As I explained in the anterior post, the data sheet mentions an internal clock exclusive for the ADC. From this clock depends the conversion time and then the sampling rate, so, it’s very important to know that data. Surprisingly I didn’t find that data neither the datasheet nor the family reference manual. Probably it exists there but very very hidden. 

Thursday, August 5, 2010

PWM using the dsPIC30F3012 with internal oscillator

This time let’s generate a PWM signal using the dsPIC30F3012 running with its internal oscillator in order to have the RC15 pin available for other applications.
The internal oscillator of this device runs at 7.37MHz and is possible to multiply it by 4, or 16 using the PLL.
In this example I’m using the PLL16 which combined with the 7.37MHz internal oscillator gives a total clock frequency of 117.92MHz, or 29.48 MIPS.
I’m using the circuit depicted below.
Related Posts Plugin for WordPress, Blogger...