gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS Motion Sensor > motion pak documentation (AIN1 and AIN2)

#139662 - truedream - Sat Sep 08, 2007 7:06 pm

Hi

I am trying out a test app that checks the slot-2 motion
and I am having trouble finding the correct docs - the AIN1 and AIN2
as example, they need to be "enabled" before use, can I enable both
of them 1 time and then read ain1 and ain2 at random?
or need i enable only 1 before reading it? can I read without delay
after enabling? is first reading guaranteed accurate? etc. etc.

be noted that I test my test app against homemade motion slot-2
motion card that is trying to be compatible with the ndsmotion.c
from DKA R20 CVS

#139752 - KeithE - Sun Sep 09, 2007 8:42 pm

AIN1 and AIN2 (the extra analog inputs) must be enabled before reading them. If you are only using one of them, you can enable just that one or both of them - it doesn't matter. It is probably best to wait one vblank after enabling before you read them. I'm not going to make any guarantees on them - they are an extra "undocumented feature" that I did not test on every device before shipment.

Please note that in order to get any meaningful results from AIN1 or AIN2 you must solder vdd and gnd pads of the ds motion pak to the vdd and gnd of an analog sensor and solder the the output of an analog sensor to AIN1 or AIN2. If you don't solder anything to these pads on the DS motion pak there is no purpose to reading AIN1 and AIN2.

It is not my fault if you break your DS by trying to draw too much current from slot-2. If you want to add another sensor, please find out how much current slot-2 can handle and stay below this limit.

#139753 - truedream - Sun Sep 09, 2007 9:31 pm

KeithE wrote:
AIN1 and AIN2 (the extra analog inputs) must be enabled before reading them. If you are only using one of them, you can enable just that one or both of them - it doesn't matter. It is probably best to wait one vblank after enabling before you read them. I'm not going to make any guarantees on them - they are an extra "undocumented feature" that I did not test on every device before shipment.

Please note that in order to get any meaningful results from AIN1 or AIN2 you must solder vdd and gnd pads of the ds motion pak to the vdd and gnd of an analog sensor and solder the the output of an analog sensor to AIN1 or AIN2. If you don't solder anything to these pads on the DS motion pak there is no purpose to reading AIN1 and AIN2.

It is not my fault if you break your DS by trying to draw too much current from slot-2. If you want to add another sensor, please find out how much current slot-2 can handle and stay below this limit.


lol, eh yes sure im responsible whatever i do.

and well, i cant solder anything to ain1 or ain2 as use custom
slot-2 motion sensor ;) so there are no pads. The gadget is working
however ok. just wanted to be clear on the ainx useage thats all.

#151340 - nerkle - Sat Feb 23, 2008 8:42 pm

Hi

Now in possession of a shinny MotionPAK. Having loaded up the demo prgram the card all looks OK.

Now, I want to use AIN1 and AIN2 to take external input (say voltage from an LDR or solar cell or voltage from a thermocouple) -- as they need VDD / GND and AIN1/2 how do I go about wiring up a device such as an LDR/Solar Cell to "sense" light?

Cheers
Glen
_________________
Why am I doing this?