pic32mx470F512L help please!

mikroC, mikroBasic and mikroPascal PRO for Microchip’s 32-bit PIC MCUs
Post Reply
Author
Message
engahmed
Posts: 92
Joined: 14 May 2013 19:13

pic32mx470F512L help please!

#1 Post by engahmed » 23 Sep 2020 09:28

Hello every one really im very apercaite this web for helping people like me thanks alot .

i try to interface DS1307 with pic32mx470f512l using Soft i2c library in micro32 lib. but no response at all the configuration as this
DEVCFG3 : $1FC02FF0 : 0xF0070000
DEVCFG2 : $1FC02FF4 : 0x00008074
DEVCFG1 : $1FC02FF8 : 0x0354C603
DEVCFG0 : $1FC02FFC : 0x110FF01B

the micro all other process very well

note
1-external osc 20mHz.

2-
// Software I2C connections
sbit Soft_I2C_Scl at RG12_bit;
sbit Soft_I2C_Sda at RG14_bit;
sbit Soft_I2C_Scl_Direction at TRISG12_bit;
sbit Soft_I2C_Sda_Direction at TRISG14_bit;
// End Software I2C connections
i try to change the micro to pic32mx460F512L it work very well with DS1307 also my main
CHECON = 0x32;
CM1CON=0;CM2CON=0;
// Mapping SPI1 & SPI2
SDI1Rbits.SDI1R = 0xa; // SDI1 to C4
RPD0Rbits.RPD0R = 0x8; // SDO1 to D0
SDI2Rbits.SDI2R = 0x1; // SDI2 to G7
RPG8Rbits.RPG8R = 0x6; // SDO2 to G8
////PWM///// // oc2 to D1
RPD1Rbits.RPD1R = 0xB;
/////UART 2
RPF5Rbits.RPF5R =0x1;
/////UART 4
RPF8Rbits.RPF8R =0x2;
ANSELA = 0x0000;ANSELB = 0x0000;ANSELG = 0x0000;ANSELF = 0x0000;
ANSELC = 0x0000;ANSELE = 0x0000;ANSELD = 0x0000; delay_ms(100);
LATA=0x0000;LATB=0x0102;LATC=0x0010;LATD=0x0000;LATE=0x0000;LATG=0x8080;LATF=0x0010;
TRISA=0x0000;TRISC=0x0010;TRISD=0x0000;TRISE=0x0000;TRISF=0x0010;TRISG=0x8080;TRISB=0x0102;delay_ms(100);
PORTA=0;PORTC=0;PORTD=0;PORTE=0;PORTF=0;PORTG=0;PORTB=0;delay_ms(100);


thanks alot waiting your help :mrgreen:

User avatar
filip.grujcic
Posts: 822
Joined: 14 May 2018 08:34

Re: pic32mx470F512L help please!

#2 Post by filip.grujcic » 24 Sep 2020 10:09

Hello,

Could you rather zip and attach your project for inspection please?

Regards,
Filip Grujcic

Post Reply

Return to “PIC32 PRO Compilers”