Welcome, Guest

Author Topic: PIC32-MX460LCD  (Read 2233 times)

v_savov

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
PIC32-MX460LCD
« on: April 15, 2013, 03:37:29 PM »
Hi Olimex, can you help me with the Accelerometer init in your demo?
From the demo source with YOUR .hex file everything is OK but after building the demo project and programming the device the function "Accl_init" does not work properly. To be more precise the function "I2CSetFrequency" from the I2C drivers does not set the freq. I'm debugging and watching the registers with PIC-KIT3 and MPLAB, and the value in I2C1BRG is not the right. Also the function doesn't return the right value. Can you help me fix that?
Thankyou! :)

LubOlimex

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1952
  • Karma: +50/-3
Re: PIC32-MX460LCD
« Reply #1 on: April 22, 2013, 04:16:45 PM »
Hey v_savov,

Have you modified the code? Does it compile fine at your side (if there are errors or warnings please quote them)? Which version MPLAB and which exact compiler you use to generate the code?

Did you stumble upon the datasheet of the accelerometer: http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/CD00091417.pdf?

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

v_savov

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: PIC32-MX460LCD
« Reply #2 on: May 29, 2013, 10:40:45 PM »
I didn't modify the code, it does compile fine, MPLAB v8.80, MPLAB PIC32 C Compiler.
Maybe the project and the .hex file are different. I'm trying to fix the code, bud I think it will be better for me to write a new init for the i2c and accl. Can you give me another idea for fixing.
Thankyou!