I cannot find some sfr names for PIC32MX320 when using code assistance. Is it possible to add them?
For example
I2COV_I2C2STAT_bit <---- can be found
PEN_I2C2CON_bit <---- can be found
I2COV_I2C1STAT_bit <---- cannot be found
PEN_I2C1CON_bit <---- cannot be found
I can only found PEN_bit or I2COV_bit. All I want is to check whether there is an overflow of the I2C buffer and clear it. Set the Stop bit for I2C communication in I2C1 module in case there is an error.
Does I2C2CON.PEN_bit means the same as PEN_I2C2CON_bit?
How to add missing sfr names?
- Aleksandar.Mitrovic
- mikroElektronika team
- Posts: 1697
- Joined: 11 Mar 2015 12:48
Re: How to add missing sfr names?
Hi,
Thank you for your observations. We will investigate a little bit further this behavior and let you know the results soon.
Best regards,
Aleksandar
Thank you for your observations. We will investigate a little bit further this behavior and let you know the results soon.
Best regards,
Aleksandar
- Aleksandar.Mitrovic
- mikroElektronika team
- Posts: 1697
- Joined: 11 Mar 2015 12:48
Re: How to add missing sfr names?
Hello,
I investigate you problem and find that bits in I2C1CON is defined as following:
For example if you want to use PEN bit in I2C1CON you should use PEN_bit.
To see definition file, use Ctrl+Alt+D in compiler.
Regards,
Aleksandar
I investigate you problem and find that bits in I2C1CON is defined as following:
Code: Select all
// I2C1CON bits
sbit ON__I2C1CON_bit at I2C1CON.B15;
sbit SIDL_I2C1CON_bit at I2C1CON.B13;
const register unsigned short int SCLREL = 12;
sbit SCLREL_bit at I2C1CON.B12;
const register unsigned short int STRICT = 11;
sbit STRICT_bit at I2C1CON.B11;
const register unsigned short int A10M = 10;
sbit A10M_bit at I2C1CON.B10;
const register unsigned short int DISSLW = 9;
sbit DISSLW_bit at I2C1CON.B9;
const register unsigned short int SMEN = 8;
sbit SMEN_bit at I2C1CON.B8;
const register unsigned short int GCEN = 7;
sbit GCEN_bit at I2C1CON.B7;
const register unsigned short int STREN = 6;
sbit STREN_bit at I2C1CON.B6;
const register unsigned short int ACKDT = 5;
sbit ACKDT_bit at I2C1CON.B5;
const register unsigned short int ACKEN = 4;
sbit ACKEN_bit at I2C1CON.B4;
const register unsigned short int RCEN = 3;
sbit RCEN_bit at I2C1CON.B3;
const register unsigned short int PEN = 2;
sbit PEN_bit at I2C1CON.B2;
const register unsigned short int RSEN = 1;
sbit RSEN_bit at I2C1CON.B1;
const register unsigned short int SEN = 0;
sbit SEN_bit at I2C1CON.B0;
To see definition file, use Ctrl+Alt+D in compiler.
Regards,
Aleksandar