I2C on PIC32
-
- Posts: 5
- Joined: Sun Jun 06, 2010 8:25 pm
I2C on PIC32
Hi Lubin,
I'm having some problems building a model to communicate between a PIC32 (32MX360F256L) and a Bosch accelerometer (BMA180) using an I2C bus for a heli autopilot application. Looking through the posts on the forum I think this problem was found by another user earlier this year and seems to fall over at the following point during the build..
dsPIC_32MX360F256L_AccelI2C.c:1: warning: Compiler option ignored due to lite-mode limitations
dsPIC_32MX360F256L_AccelI2C.c: In function `dsPIC_32MX360F256L_AccelI2C_step':
dsPIC_32MX360F256L_AccelI2C.c:48: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:55: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:58: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:68: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:71: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:78: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:81: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:93: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:96: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:103: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:106: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:118: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:121: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:128: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:131: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:142: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:145: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:162: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:165: error: union has no member named `MI2C1IF'
gmake: *** [dsPIC_32MX360F256L_AccelI2C.o] Error 1
### Real-Time Workshop build procedure for model: 'dsPIC_32MX360F256L_AccelI2C' aborted due to an error.
C32 Compiler found
C32 Compiler found
C32 Compiler found
I saw that you intended to take a look at the I2C blockset for PIC32F and was wondering if you had managed to make any progress on this issue? If you need any info from me please let me know.
Many thanks,
Ed Laurence
I'm having some problems building a model to communicate between a PIC32 (32MX360F256L) and a Bosch accelerometer (BMA180) using an I2C bus for a heli autopilot application. Looking through the posts on the forum I think this problem was found by another user earlier this year and seems to fall over at the following point during the build..
dsPIC_32MX360F256L_AccelI2C.c:1: warning: Compiler option ignored due to lite-mode limitations
dsPIC_32MX360F256L_AccelI2C.c: In function `dsPIC_32MX360F256L_AccelI2C_step':
dsPIC_32MX360F256L_AccelI2C.c:48: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:55: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:58: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:68: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:71: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:78: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:81: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:93: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:96: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:103: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:106: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:118: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:121: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:128: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:131: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:142: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:145: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:162: error: union has no member named `MI2C1IF'
dsPIC_32MX360F256L_AccelI2C.c:165: error: union has no member named `MI2C1IF'
gmake: *** [dsPIC_32MX360F256L_AccelI2C.o] Error 1
### Real-Time Workshop build procedure for model: 'dsPIC_32MX360F256L_AccelI2C' aborted due to an error.
C32 Compiler found
C32 Compiler found
C32 Compiler found
I saw that you intended to take a look at the I2C blockset for PIC32F and was wondering if you had managed to make any progress on this issue? If you need any info from me please let me know.
Many thanks,
Ed Laurence
-
- Posts: 14
- Joined: Sat Jan 23, 2010 9:20 am
problem with IC7&IC8
Hi Lubin
I want to read freq by using Input Capture. Can I use IC7 Capture in demo version?.
I want to read freq by using Input Capture. Can I use IC7 Capture in demo version?.
-
- Posts: 14
- Joined: Sat Jan 23, 2010 9:20 am
time delay of serial port transmission
Hi Lubin
How can I find the time delay of serial port rs232 data transmission?.
Thanking You
Kavitha
How can I find the time delay of serial port rs232 data transmission?.
Thanking You
Kavitha
-
- Site Admin - Expert
- Posts: 616
- Joined: Wed Mar 07, 2007 11:23 pm
- Location: Bayonne- France
- Contact:
Re: problem with IC7&IC8
it should be Ok if the microcontroller has an IC7 pin. If it does not work, it's a bug, please report !jkavitha_john wrote:Hi Lubin
I want to read freq by using Input Capture. Can I use IC7 Capture in demo version?.
could you define what is time delay ?jkavitha_john wrote:time delay of serial port rs232 data transmission?
The rs232gui interface allow to do real time visualisation, but is not a true real time system. Delay (added to natural bits transmission delay) can appears due to windows, java, and also from bluetooth or USB if you are using a virtual port com (over bluetooth os USB)
-
- Posts: 14
- Joined: Sat Jan 23, 2010 9:20 am
Re: Gui Interface
Hi Lubin,
thanks for ur reply. The IC7 & IC8 blocks are compiled sucessfully without any error report but its not read any values from the input signal . The IC1 & IC2 blocks read the input signal correctly.
And I have one more doubt, Can I send a single 16 bit data to dsPIC Controller through GUI Interface? Its posibilites or not.
Thanking you,
Kavitha
thanks for ur reply. The IC7 & IC8 blocks are compiled sucessfully without any error report but its not read any values from the input signal . The IC1 & IC2 blocks read the input signal correctly.
And I have one more doubt, Can I send a single 16 bit data to dsPIC Controller through GUI Interface? Its posibilites or not.
Thanking you,
Kavitha
-
- Site Admin - Expert
- Posts: 616
- Joined: Wed Mar 07, 2007 11:23 pm
- Location: Bayonne- France
- Contact:
Re: I2C on PIC32
thus, there should be a problem. Could you check at generated C code if you can identify the problem ? otherwise, post your simulink model on the forum, i'll could try to have a look.jkavitha_john wrote:but its not read any values from the input signal
GUI interface can only send 8 bits data. Thus, you have to build your own decoder on the embedded system (typically, through a simulink subsystem) to reconstruct a 16 bit data from two or more 8 bits data...jkavitha_john wrote:Can I send a single 16 bit data to dsPIC Controller through GUI Interface?
-
- Posts: 14
- Joined: Sat Jan 23, 2010 9:20 am
Re: I2C on PIC32
hi Lubin,
Here attached the simulink model which I am working for IC7 & IC8.Which is not working. please give solution to this.
How can I read position from QEI.
Thanks.
Here attached the simulink model which I am working for IC7 & IC8.Which is not working. please give solution to this.
How can I read position from QEI.
Thanks.
- Attachments
-
- dcpos_ol.mdl
- (31.58 KiB) Downloaded 831 times
Who is online
Users browsing this forum: Google [Bot] and 26 guests