Discussion forum for the BasicX family of microcontroller chips.
|
This may be BX off-topic but... My A/D readings from a Sharp GP2D12 are bouncing all over. 10-30 (out of 10-bits) then suddenly >100 for a few readings, then back to 10-30. The BX-24 has the same power source (external 5v regulator shared by GP2D12 and BX-24). Any ideas what could be causing this? Derek Cowburn |
|
|
|
--- In , Derek Cowburn <dcowburn@i...> wrote: > This may be BX off-topic but... > > My A/D readings from a Sharp GP2D12 are bouncing all over. 10-30 (out of > 10-bits) then suddenly >100 for a few readings, then back to 10-30. The > BX-24 has the same power source (external 5v regulator shared by GP2D12 and > BX-24). > > Any ideas what could be causing this? A possibilty. PORTA is powered by +5 VDC through a 100 Ohm resistor. This resistor is a part of a low pass filter for the A/D converters. On the down side, if you are using other bits on PORTA (13-20) to source current, the voltage on PORTA will sag which will affect the A/D converters on other terminals associated with PORTA. Thus, as a general guide, if using the A/D converters, avoid using terminals 13 - 20 to source any appreciable current such as an LED, relay or transistor driver. Rather, control LEDs and the like with an active logic zero to sink rather than source current. Peter H. Anderson, http://www.phanderson.com/basicx/ |
|
As I recall the Sharp IR rangers introduce a large pulse in the supply line when then sample. I think the manufacturer recommends putting a 10 uf Tantalum capacitor across the IR power and ground. You may want to check the data sheets on this. John Piccirillo >This may be BX off-topic but... > >My A/D readings from a Sharp GP2D12 are bouncing all over. 10-30 (out of >10-bits) then suddenly >100 for a few readings, then back to 10-30. The >BX-24 has the same power source (external 5v regulator shared by GP2D12 and >BX-24). > >Any ideas what could be causing this? > >Derek Cowburn [Non-text portions of this message have been removed] |