Hi
I am unable to compile to chip when I use the i2c components.
If I add the mpu6050 component to FC6 for a 30f3013 I get the following messages, do I have to add anything to the Cal_I2C.C Function?:-
http://www.matrixmultimedia.com
Launching the compiler...
C:\Program Files\Flowcode 6\compilers\pic16\batchfiles\pic16_C30_comp.bat "Flowcode1" "C:\Users\Ando's\DOWNLO~1\" "30F3013"
Launching compiler...
C:\Users\Ando's\DOWNLO~1>pic30-gcc -c -mcpu="30F3013" -funsigned-char -fno-short-double -Os -I"C:\PROGRA~1\FLOWCO~3\COMPIL~1\pic16\BATCHF~1\..\support\h" -I"C:\PROGRA~1\FLOWCO~3\COMPIL~1\pic16\BATCHF~1\..\MX_support" -Wall -std=gnu99 "Flowcode1".c -o "Flowcode1".o
In file included from C:\Program Files\Flowcode 6\CAL\includes.c:155,
from Flowcode1.c:251:
C:\Program Files\Flowcode 6\CAL\/PIC16BIT\PIC16BIT_CAL_I2C.c: In function 'FC_CAL_I2C_Master_Init_1':
C:\Program Files\Flowcode 6\CAL\/PIC16BIT\PIC16BIT_CAL_I2C.c:111: error: 'I2C1CONbits' undeclared (first use in this function)
C:\Program Files\Flowcode 6\CAL\/PIC16BIT\PIC16BIT_CAL_I2C.c:111: error: (Each undeclared identifier is reported only once
C:\Program Files\Flowcode 6\CAL\/PIC16BIT\PIC16BIT_CAL_I2C.c:111: error: for each function it appears in.)
etc
Thanks
Andy
mpu6050 Component
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: mpu6050 Component
Hi Andy,
I believe we have fixed this bug now and the fix should be included in the next release. For now you should be able to solve the issue yourself by copying the attached file below into your "Flowcode v6/FCD/PIC16/" folder before starting Flowcode. Hopefully the I2C will then compile correctly.
I believe we have fixed this bug now and the fix should be included in the next release. For now you should be able to solve the issue yourself by copying the attached file below into your "Flowcode v6/FCD/PIC16/" folder before starting Flowcode. Hopefully the I2C will then compile correctly.
- Attachments
-
- 30F3013.fcdx
- (19.42 KiB) Downloaded 297 times
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: mpu6050 Component
Thanks Ben
Any reason why the xyz Gyro's return -1?
I read with interest your quadcopter blog.
I think the idea of using the hardware to output the data and flowcode using it to develop the math is cool.
I was wondering how you get the comport to connect, I assume a drop down box but don't see it.
Maybe a global variable that I have overlooked, my serial port is com10.
Also it would be good to have a kalman filter example, I got a shed load of dsp components that I have no idea how to use.
Thanks
Andy
Any reason why the xyz Gyro's return -1?
I read with interest your quadcopter blog.
I think the idea of using the hardware to output the data and flowcode using it to develop the math is cool.
I was wondering how you get the comport to connect, I assume a drop down box but don't see it.
Maybe a global variable that I have overlooked, my serial port is com10.
Also it would be good to have a kalman filter example, I got a shed load of dsp components that I have no idea how to use.
Thanks
Andy
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: mpu6050 Component
Hi Andy,
Values of -1 represent that the value received is 0xFFFF so the pin you are reading from is always high. Have you got the ADR0 pin pulled to the correct voltage rail?
The COM port can be selected in the sensor read examples to match the COM port assigned by Windows to the ECIO with the USB Serial component running on it. Simply select the RS232 component and then one of the properties should be COM/Injector and then if you select COM you are presented with a list of active COM ports.
Just brought in the finished quad to work today to rev it up and see if it would take the 830g weight. Well it took it but then shattered one of the 3D printed arms due to the kick from starting up the motors. Bit more CAD work required I feel.
I posted some v6 DSP examples here if you want to have a play.
http://www.matrixmultimedia.com/mmforum ... =25#p52092
Values of -1 represent that the value received is 0xFFFF so the pin you are reading from is always high. Have you got the ADR0 pin pulled to the correct voltage rail?
The COM port can be selected in the sensor read examples to match the COM port assigned by Windows to the ECIO with the USB Serial component running on it. Simply select the RS232 component and then one of the properties should be COM/Injector and then if you select COM you are presented with a list of active COM ports.
Just brought in the finished quad to work today to rev it up and see if it would take the 830g weight. Well it took it but then shattered one of the 3D printed arms due to the kick from starting up the motors. Bit more CAD work required I feel.
I posted some v6 DSP examples here if you want to have a play.
http://www.matrixmultimedia.com/mmforum ... =25#p52092
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: mpu6050 Component
Hi Ben;
I updated the V6.0.2.0 patch and the gyro values spring into life.
The component structure is a good feature of flowcode I like the way the MPU6050 is derived from the I2C component.
Would it be possible to show the MPU6050 project before it is exported into a component?
Andy
I updated the V6.0.2.0 patch and the gyro values spring into life.
The component structure is a good feature of flowcode I like the way the MPU6050 is derived from the I2C component.
Would it be possible to show the MPU6050 project before it is exported into a component?
Andy
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: mpu6050 Component
Thanks Andy,
I have PM'd you with the source.
I have PM'd you with the source.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel