Showing posts with label FUSES. Show all posts
Showing posts with label FUSES. Show all posts

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.

Wednesday, March 17, 2010

dsPIC30F3012 hello world program

The next program flashes a LED connected in the PB0 (pin 2) of a dsPIC30F3012. The chip is running at 80MHz using a crystal of 20MHz. The PLL multiplies the half of the crystal frequency by 8.
In other words:

Wednesday, March 3, 2010

#FUSES for the PICF2550

If you are:

  • Programming using the CCS compiler.
  • Using the PIC18F2550
  • Loading the firmware using the WinPic800
  • Your Xtal is 20MHz

Then, in order for everything works fine when programming the RS232 module, you have to, either, change the parameters as showed in the below figure every time you load the firmware or define the FUSE directive as follows:

#fuses HS,NOWDT,NOPROTECT,PLL5,CPUDIV1

PLL5: defines the oscillator selection to 20MHz

CPUDIV1: Avoid a postscaler of the main clock “CPU system clock”

image

This issue made me waste a lot of time because my RS232 model was not working as expected using the CCS compiler but using the Mikro C compliler everything worked fine. Until I changed these parameters.

Related Posts Plugin for WordPress, Blogger...