Showing posts with label RS232. Show all posts
Showing posts with label RS232. Show all posts

Friday, October 1, 2010

Accelerometer LIS3LV02DL controlled by a dsPIC, I2C communication

This post describe the basic data acquisition of an accelerometer LIS3LV02DL over I2C bus using a dsPIC30F3012.
This tri-axial accelerometer has a 12 or 16 bit digital output and can be interfaced using SPI or I2C communication.
The circuit employed is a very simple one, The dsPIC is connected to the accelerometer LIS3LV02 via I2C using the B7 and B6 pines. The dsPIC reads the data and send the results in ascii format to the PC using the bluetooth module KC21.

Friday, March 19, 2010

dsPIC30F3012 rs232 115200 bps

Now the program and circuit to connect a dsPIC 30F3012 via serial to a PC. The serial connection is made using a Bluetooth module fro kc wirefree (R). The KC21.
BLUETOOTH characteristics

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...