Search found 190 matches
- Fri Feb 01, 2013 10:49 pm
- Forum: Flowcode V5
- Topic: Problems with I2C
- Replies: 6
- Views: 3663
Problems with I2C
Hello MM, Have you changed anything in the I2C CAL files, or anywhere else? Because I am having trouble getting any data from all 5 different sensors I have. I checked the connections, checked voltages, everything is ok, except that I get zero responce from them...anyone else experiencing similar pr...
- Fri Feb 01, 2013 3:22 pm
- Forum: Flowcode V5
- Topic: Help needed from ARM experts to access Flash memory
- Replies: 3
- Views: 2661
Help needed from ARM experts to access Flash memory
Hello everyone, So here is the story: I have several I2C sensors. I do some value reading cycles, then some voodoo magic to do the calibration, and I get 21 parameters (as floats) which I need to save to AT91SAM7128 chip, to store the calibration data, so at next start up I wouldn't need to do the c...
- Thu Jan 31, 2013 10:19 pm
- Forum: Flowcode V5
- Topic: Flowcode v5.5 with DSP for all variants
- Replies: 59
- Views: 103915
Re: Flowcode v5.5 with DSP for all variants
Hi Jonny,
One more thing, you forgot to fix the sqrt() function in the ARM version, cause I still get an error while compiling...undefined reference to float32_sqrt
Cheers,
Mantas
One more thing, you forgot to fix the sqrt() function in the ARM version, cause I still get an error while compiling...undefined reference to float32_sqrt
Cheers,
Mantas
- Tue Jan 29, 2013 4:12 pm
- Forum: Flowcode V5
- Topic: Flowcode v5.5 with DSP for all variants
- Replies: 59
- Views: 103915
Re: Flowcode v5.5 with DSP for all variants
Hi Mantas Can you post som screenshots of the error messages and what file you were trying to import etc. Ive attached the sample files below already saved in arm version Regards Dazz arm.zip Hello Dazz, Jonny, First of all thank you very much for the arm files :wink: Can you make the last one, exa...
- Tue Jan 29, 2013 11:03 am
- Forum: Flowcode V5
- Topic: Flowcode v5.5 with DSP for all variants
- Replies: 59
- Views: 103915
Re: Flowcode v5.5 with DSP for all variants
Hello. It seems from these posts there is a problem importing DSP programs from one version of Flowcode to another (so dsPIC to PIC). If this is something that will commonly need to be done we may need to produce a patch for this, though I would rather not produce a new Flowcode release so if these...
- Tue Dec 11, 2012 10:16 am
- Forum: Flowcode V5
- Topic: Setting Interrupt to 512Hz
- Replies: 9
- Views: 6533
Re: Setting Interrupt to 512Hz
Good morning,
I can confirm that ARM7TDMI executes instruction in 3 cycles. More info can be found here: http://infocenter.arm.com/help/index.js ... CJEHC.html
Best regards,
Mantas
I can confirm that ARM7TDMI executes instruction in 3 cycles. More info can be found here: http://infocenter.arm.com/help/index.js ... CJEHC.html
Best regards,
Mantas
- Tue Dec 11, 2012 9:43 am
- Forum: Flowcode V5
- Topic: BMP085 barometric pressure/temperature sensor.
- Replies: 23
- Views: 11823
Re: BMP085 barometric pressure/temperature sensor.
Hi,
Good to hear that it worked out for you. Just its's very strange...i have like 5 different i2c sensors, and they all seem to work fine with that macro n>1...well anyway, glad that it worked our for you.
Best regards,
Mantas
Good to hear that it worked out for you. Just its's very strange...i have like 5 different i2c sensors, and they all seem to work fine with that macro n>1...well anyway, glad that it worked our for you.
Best regards,
Mantas
- Tue Dec 11, 2012 12:27 am
- Forum: Flowcode V5 Suggestions
- Topic: Fast inverse of square root
- Replies: 1
- Views: 7112
Re: Fast inverse of square root
For the time being here is a macro if someone needs to use it in the FC before we have it in the library. I have attached a sample program if anyone needs to test it. You can clearly see how accurate the answer is.
Best regards,
Mantas
Best regards,
Mantas
- Mon Dec 10, 2012 8:54 pm
- Forum: Flowcode V5
- Topic: Setting Interrupt to 512Hz
- Replies: 9
- Views: 6533
Re: Setting Interrupt to 512Hz
Thank You Enamul, You are as always very helpful! :) So basically the formula I derived from your post is: tmr0=(2^bit_count)-(system_clock/(prescalar*req_freq*clock_exe_cycle)) It would be nice if flowcode would let to choose the required frequency and do this calc automatically, without too much o...
- Mon Dec 10, 2012 6:57 pm
- Forum: Flowcode V5
- Topic: Setting Interrupt to 512Hz
- Replies: 9
- Views: 6533
Re: Setting Interrupt to 512Hz
What about ARM? any clue where I can find this info?
Best regards,
Mantas
Best regards,
Mantas
- Mon Dec 10, 2012 4:38 pm
- Forum: Flowcode V5
- Topic: Setting Interrupt to 512Hz
- Replies: 9
- Views: 6533
Re: Setting Interrupt to 512Hz
One small question, why 4*T? does this have to do something with clock edges?
- Mon Dec 10, 2012 4:16 pm
- Forum: Flowcode V5
- Topic: BMP085 barometric pressure/temperature sensor.
- Replies: 23
- Views: 11823
Re: BMP085 barometric pressure/temperature sensor.
I would suggest you read about the I2C interface a little bit, on how it works, then study my code on how it is implemented, and using BMP085 datasheet try to follow it. Than try to do some debugging yourself, because I can't help you anymore. Best of luck.
Best regards,
Mantas
Best regards,
Mantas
- Mon Dec 10, 2012 4:10 pm
- Forum: Flowcode V5
- Topic: Setting Interrupt to 512Hz
- Replies: 9
- Views: 6533
Re: Setting Interrupt to 512Hz
Thanks Enamul, Those interrupts always make my head hurt :D I was thinking about the same, how to make it overflow at different count. I will check your code, but I think I will have to recalculate the value as the tmr0 for arm is running at 47923200Hz. Can anyone from MM can confirm that calling tm...
- Mon Dec 10, 2012 10:39 am
- Forum: Flowcode V5
- Topic: Setting Interrupt to 512Hz
- Replies: 9
- Views: 6533
Setting Interrupt to 512Hz
Hello everyone, Can anyone help me with setting interrupt service routine to run at 512.0 Hz ? This is for ARM chip on EB031 board. I was trying the settings inside flowcode, but it is either above or bellow the required frequency. I think that it needs a bit of C code to do this, am I right? I need...
- Mon Dec 10, 2012 9:47 am
- Forum: Flowcode V5
- Topic: BMP085 barometric pressure/temperature sensor.
- Replies: 23
- Views: 11823
Re: BMP085 barometric pressure/temperature sensor.
Can you please upload your updated flowcode file? I will check if everything is ok with the code itself. But it seems that the problem is somewhere else if you get one cycle completed correctly.
Best regards,
Mantas
Best regards,
Mantas
- Sun Dec 09, 2012 9:11 pm
- Forum: Flowcode V5
- Topic: BMP085 barometric pressure/temperature sensor.
- Replies: 23
- Views: 11823
Re: BMP085 barometric pressure/temperature sensor.
One more thing you can try, just to make sure that it is not the fault of the EOC pin, is to disconnect the EOC, disable interrupts and disable delay loop (or just delete it), and use a constant delay of 26ms, in the bmp085_read_uval macro, as you are just sampling every 60s. Let me know how it goes...
- Sun Dec 09, 2012 10:44 am
- Forum: Flowcode V5 Suggestions
- Topic: Fast inverse of square root
- Replies: 1
- Views: 7112
Fast inverse of square root
Hello MM, As you know sometimes microcontrollers struggle with computation intensive functions, and you want to optimize the code to make life easier for them. So you probably remember the famous hack from Quake ||| to compute the inverse square root of x, if not, here is a remainder how it looks: f...
- Sun Dec 09, 2012 9:52 am
- Forum: Flowcode V5
- Topic: BMP085 barometric pressure/temperature sensor.
- Replies: 23
- Views: 11823
Re: BMP085 barometric pressure/temperature sensor.
Hi, here is an example. It is made for ARM, but just use the import function from the main menu and you should be fine. Do everything the same and it should work, at least it works for me. Just set up your interrupt correctly in the bmp085_init and the I2C connections. Good luck. Best regards, Mantas
- Sat Dec 08, 2012 10:24 pm
- Forum: Flowcode V5
- Topic: BMP085 barometric pressure/temperature sensor.
- Replies: 23
- Views: 11823
Re: BMP085 barometric pressure/temperature sensor.
I didn't look at your code, but saying briefly, in the main program you first call macro BMP085_init to initialize sensor registers, as per setup config, and and then create a loop while(1) to create an infinite loop, in which you call BMP085_get_press. And do the rest like i told you in the previou...
- Fri Dec 07, 2012 3:44 pm
- Forum: Flowcode V5
- Topic: BMP085 barometric pressure/temperature sensor.
- Replies: 23
- Views: 11823
Re: BMP085 barometric pressure/temperature sensor.
Hello Speedy2k, Yes you have to import every macro but use the (bitwise) macros instead of the ones without the prefix, as far as I remember, Just make sure you select a different interrupt on the initialization macro, as I had it set up for ARM chip, not for pic. But you can just delete it if you w...
- Fri Dec 07, 2012 11:16 am
- Forum: Flowcode V5
- Topic: BMP085 barometric pressure/temperature sensor.
- Replies: 23
- Views: 11823
Re: BMP085 barometric pressure/temperature sensor.
Hi Speedy2k,
To save you time, here is a present for you merry x-mas
After calling macro get_pressure do the following math:
Best regards,
Mantas
To save you time, here is a present for you merry x-mas
After calling macro get_pressure do the following math:
Code: Select all
pressure = P * 0.01 //pressure in mbar
Mantas
- Fri Dec 07, 2012 2:06 am
- Forum: Flowcode V5
- Topic: Macro local variable limit
- Replies: 7
- Views: 4128
Re: Macro local variable limit
As you probably know, but to be clear I use ARM v5.
Your suggestion to use the array is really good, I will try to do it tomorrow, or is it already today...heh time to go to bed...its not healthy to do quaternion calcs after the midnight
Best regards,
Mantas
Your suggestion to use the array is really good, I will try to do it tomorrow, or is it already today...heh time to go to bed...its not healthy to do quaternion calcs after the midnight
Best regards,
Mantas
- Fri Dec 07, 2012 1:43 am
- Forum: Flowcode V5
- Topic: Macro local variable limit
- Replies: 7
- Views: 4128
Re: Macro local variable limit
Hello Jonny, Yes I agree, it strange, but it only to improve macros speed, so I use auxiliary variables to avoid repeated arithmetic. I am doing a code for MARG, so all calculations are for quaternion. Quite a lot of math ops so even after reduction using aux var it still is 277 math ops with floats...
- Fri Dec 07, 2012 12:44 am
- Forum: Flowcode V5
- Topic: Macro local variable limit
- Replies: 7
- Views: 4128
Re: Macro local variable limit
Hey Enamul, I was writing a macro and I have a list of 35 local variables, so 31 squeezed in, but 4 were left out, and its annoying, because it's all about order. Now some of the variables used in calculations are with prefix .(dot) and other four are without, cause i had to move the other 4 to glob...
- Thu Dec 06, 2012 11:33 pm
- Forum: Flowcode V5
- Topic: Macro local variable limit
- Replies: 7
- Views: 4128
Macro local variable limit
Hello MM,
I was creating a macro an I encountered a limit of available macro local variables which is I believe 31. Why is there a limit, and how to remove it? Or does it need an update in software itself?
Best regards,
Mantas
I was creating a macro an I encountered a limit of available macro local variables which is I believe 31. Why is there a limit, and how to remove it? Or does it need an update in software itself?
Best regards,
Mantas