paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] ADC Codes


From: Gautier Hattenberger
Subject: Re: [Paparazzi-devel] ADC Codes
Date: Fri, 03 Oct 2008 09:36:45 +0200
User-agent: Thunderbird 2.0.0.17 (X11/20080925)

X and Y should be replaced by the ADC number on your tiny board. So for you :

-DUSE_ADC_5 -DUSE_ADC_6 (you probably have some flags already set if you are using IR sensors)
-DADC_CHANNEL_GENERIC1=ADC_5 -DADC_CHANNEL_GENERIC1=ADC_6

You don't care about the ADC bank, it is describe in a header in conf/autopilot. For example in tiny_2_1.h:67, ADC_0 is on bank 1 pin 6 and the flag USE_AD1_6 is defined for you.

Gautier


Brendan Chen a écrit :
Thanks for the reply Gautier, something I dont quite understand, with the ADC_X 
and ADC_Y, are they suppose to be 0, 1 or 2 or are they suppose to be AD0_X and 
AD0_Y if I'm using ADC0? For my case I'm using channel 5 and 6 of ADC0, how 
should I activate that?

Should I put '...-DUSE ADC_0_5 (and ADC_5_6) or should i put '...-DUSE AD0_5 
(and AD0_6)'?

Thanks
Kind Regards,
Brendan



________________________________________
From: address@hidden address@hidden On Behalf Of Gautier Hattenberger 
address@hidden
Sent: Friday, 3 October 2008 2:07 AM
To: address@hidden
Subject: Re: [Paparazzi-devel] ADC Codes

Hi,

If you just want to read the value of some ADC from the ground, you just
need to use the "adc_generic" code. This will automaticaly send 1 or 2
adc values (you can read them with the messages application).

To use this code:
ap.CFLAGS += -DUSE_ADC_GENERIC -DADC_CHANNEL_GENERIC1=ADC_X -DUSE_ADC_X
[-DADC_CHANNEL_GENERIC1=ADC_Y -DUSE_ADC_Y]
ap.srcs += adc_generic.c

where ADC_X and ADC_Y are of course the channel you want to read !

(maybe a flag is missing, let me know if it doesn't work)

Gautier

Brendan Chen a écrit :
Hi all,

What kind of ADC codes should I use if i just simply want to plug in an analog 
voltage from sensors?

And I would like to transmit that converted value to the GCS, I have the 
receiving end sorted ( I think ) but I was wondering if an of the xml files I 
may need to simply modify to get the ADC to work with a specific channel.

Also how would I connect the converted value and get that sent via wireless 
downlink?

Thanks


Kind Regards,
Brendan


_______________________________________________
Paparazzi-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/paparazzi-devel



_______________________________________________
Paparazzi-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/paparazzi-devel


_______________________________________________
Paparazzi-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/paparazzi-devel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]