Hello everyone .
I tried to use dspic30f3012 with i2c on ccs program and all's right.
Now I'm trying to use the dspic with i2c on Mplabx.
I used the mplabx with xc16 and this is the code :
Code:
I2C problem with MPLABX (XC16)
I tried to use dspic30f3012 with i2c on ccs program and all's right.
Now I'm trying to use the dspic with i2c on Mplabx.
I used the mplabx with xc16 and this is the code :
Code:
Code (Text):
- #include<i2c.h>
- void main(void )
- {
- unsigned int config2, config1;
- unsigned char *wrptr;
- unsigned char tx_data[] = {'M','I','C','R','O',’C’,'H','I','P','\0'};
- wrptr = tx_data;
- /* Baud rate is set for 100 kHz */
- config2 = 0x11;
- /* Configure I2C for 7 bit address mode */
- config1 = (I2C_ON &...