Search found 10 matches

by paserra
20 October 2007, 0:51 AM
Forum: ZBasic Language
Topic: Could be possible to use the ADC in free running mode?
Replies: 48
Views: 20405

Thank You Don

Thank You Don, I'll try your code soon.
Regards.
Pier Andrea
by paserra
19 October 2007, 15:40 PM
Forum: ZBasic Language
Topic: Could be possible to use the ADC in free running mode?
Replies: 48
Views: 20405

my last DiffADC() routine

After ADLAR bit = 1 (in the ADMUX register) this is my last DiffADC() WORKING routine: Private Function DiffADC() As Single Dim acc as Long Dim adcRes as Integer Dim i as Integer ' initialize the accumulator acc = 0 'OVERSAMPLING loop For i = 0 to 1023 ' read the conversion result ad...
by paserra
18 October 2007, 23:48 PM
Forum: ZBasic Language
Topic: Could be possible to use the ADC in free running mode?
Replies: 48
Views: 20405

Don, your version of the DiffADC() works VERY WELL!!! in my application I read and transmit a DiffADC() value every 200 ms and send it to a PC via serial port... I increased the oversampling value to 1023 without problems!!!! Each ADC sample is the oversampling/decimation of 1024 values every 200 ms...
by paserra
18 October 2007, 18:00 PM
Forum: ZBasic Language
Topic: Could be possible to use the ADC in free running mode?
Replies: 48
Views: 20405

Thank you Don,
very good solution.
Thanks,
Pier Andrea.
by paserra
18 October 2007, 15:11 PM
Forum: ZBasic Language
Topic: Could be possible to use the ADC in free running mode?
Replies: 48
Views: 20405

Fantastic

Have look at this working code to read a differential signal ADC0/ADC1 with a gain of 1x or 10x and internal VRef = 2.56 volts I have to optimize the DiffADC() routine but I can read an oversampled value (plus 4/5 bits of resolution) in a short period of time: const GAIN_1 as byte = &HD0 const G...
by paserra
18 October 2007, 11:57 AM
Forum: ZBasic Language
Topic: Could be possible to use the ADC in free running mode?
Replies: 48
Views: 20405

Great ADC solution!!!

Don,
fantastic work!!! I'll try the code immediately (I'm so curious about the performance improvement!!!!)
Thank you very much!.
Regards, Pier Andrea.

p.s. Thanks to Tony too for the suggestions!!!!
by paserra
18 October 2007, 6:12 AM
Forum: ZBasic Language
Topic: Could be possible to use the ADC in free running mode?
Replies: 48
Views: 20405

Read last ADC value

Thank you Tony. My (theorical) idea is to setup one ADC channel writing the rights values on ADMUX, ADSCRA and ADSCRB registers to operate in free running mode. After that, I hope that I can obtain the last ADC value just (and only) reading ADCL and ADCH registers (my ZBasic code has to be a little ...
by paserra
18 October 2007, 2:04 AM
Forum: ZBasic Language
Topic: Could be possible to use the ADC in free running mode?
Replies: 48
Views: 20405

Could be possible to use the ADC in free running mode?

Could be possible to use the ADC in free running mode? I need to increase the speed of my ADC routine... Could be possible to have the ADC working "forever" while I read only the "last" result with my ADC routine? Do you have an example to do that with ZBasic Micro? Thank you, Pi...
by paserra
16 April 2007, 0:04 AM
Forum: ZX-24
Topic: Differential ADC?
Replies: 2
Views: 6213

thank you for the reply

:D
I'm very interested to this specific possibility offered by ZBasic. I'll ask further if I have questions.
Thank You very much.
Regards,
Pier Andrea.
by paserra
15 April 2007, 13:37 PM
Forum: ZX-24
Topic: Differential ADC?
Replies: 2
Views: 6213

Differential ADC?

Hi to all,
a simple question: may be possible to use the Differential ADC capabilities of the ATMega644 via direct register access?
Thank you very much.
Pier Andrea.