Hi!
After using FC6 with arduino Uno and mega 2560 for a while, I have had good experiences. Quick Compiling etc.
But I think there is an error in analog component. If I read bytes from an analog input and write to a display, the minimum byte at 0 volts at the input 4 (show 4 byte in display) and maximum 250 at 5 volt at the Analog input.
If I change the byte to int. is a minimum of 17 (in display) at 0 V and max 1000 at 5 Volts on the analog input. If I test with Aduino IDE, the values are correct.
In simulation ok, but not in real World
Best regard
Jorgen
Analog!
Moderator: Benj
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
- 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: Analog!
Hello Jorgen,
Yes compile speed is very nice outside of the PIC chip pack. We are working on improving this as PIC is currently our most popular offering.
Have you tried playing with the conversion speed and acquisition time properties of the ADC component?
Might be worth upping the Acquisition cycles to say 100 and lowering the conversion speed to see if this improves things.
Yes compile speed is very nice outside of the PIC chip pack. We are working on improving this as PIC is currently our most popular offering.
Have you tried playing with the conversion speed and acquisition time properties of the ADC component?
Might be worth upping the Acquisition cycles to say 100 and lowering the conversion speed to see if this improves things.
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
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: Analog!
Hi Benj!
I try this evening. Many thank´s for reply. You hear from me. Concening the compilingspeed for Pic, really really good.
Best regard
Jorgen
I try this evening. Many thank´s for reply. You hear from me. Concening the compilingspeed for Pic, really really good.
Best regard
Jorgen
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: Analog!
Hi Benj!
I promised a response back. It works now, yes, yes good news.
It was not Acquisition cycles but your idea to try changes in properties, did I tried to change the clock setting from the default Fosc / 8 to Fosc / 32 and above, work perfect 100% But who could know this.
Apologies for this I thought it was a bug................
But Benj, I'm not expert and knows what happens 100% in the controller. Can / will you briefly describe why this change of division osc influence Analog.
And I'm really looking forward to speed up the compilation of Pic also, it is a pure delight with Arduino.
But many thanks for your help.
Jorgen
I promised a response back. It works now, yes, yes good news.
It was not Acquisition cycles but your idea to try changes in properties, did I tried to change the clock setting from the default Fosc / 8 to Fosc / 32 and above, work perfect 100% But who could know this.
Apologies for this I thought it was a bug................
But Benj, I'm not expert and knows what happens 100% in the controller. Can / will you briefly describe why this change of division osc influence Analog.
And I'm really looking forward to speed up the compilation of Pic also, it is a pure delight with Arduino.
But many thanks for your help.
Jorgen
- 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: Analog!
Hello Jorgen,
The Acquisition time sets how long the internal capacitor is connected to the external analogue voltage. The conversion speed sets the rate at which the internal voltage is converted to a digital signal. The slower the conversion the more accurate the reading up to a point. The options are provided to allow you to get the optimal ADC sample speed no matter what your clock speed is.
The speed limitation is likely down to RC time constant characteristics in the ADC converter peripheral. An RC constant I think gives you 33% of the input voltage difference per time period, it been a long time since I learned this stuff.
This has some good AVR based info on max sample rates: http://www.avrfreaks.net/forum/max-adc-speed
The Acquisition time sets how long the internal capacitor is connected to the external analogue voltage. The conversion speed sets the rate at which the internal voltage is converted to a digital signal. The slower the conversion the more accurate the reading up to a point. The options are provided to allow you to get the optimal ADC sample speed no matter what your clock speed is.
The speed limitation is likely down to RC time constant characteristics in the ADC converter peripheral. An RC constant I think gives you 33% of the input voltage difference per time period, it been a long time since I learned this stuff.
This has some good AVR based info on max sample rates: http://www.avrfreaks.net/forum/max-adc-speed
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
- 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: Analog!
If I got my maths right each dot on the graph is a time constant.
The time constant for the actual ADC peripheral will be dependent on the internal resistance and capacitance.
The time constant for the actual ADC peripheral will be dependent on the internal resistance and capacitance.
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
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact: