BasicMicro - Forums

www.basicmicro.com
It is currently Mon May 21, 2012 12:58 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: ARC32 p39 usage ?
PostPosted: Tue Feb 15, 2011 10:57 am 
Offline
Citizen

Joined: Sat Jan 15, 2011 10:01 am
Posts: 16
In the PDF "B0010 - ARC32 Robotics and Servo Controller"
P39 (AUX1 pin6) is stated to be a analog/digital pin
but i cant get any analog input from it

Code:
adin P39, MeasureIn

or
Code:
adin P35, MeasureIn


Have i misunderstood something ?

it works when i do
Code:
adin P8, MeasureIn

_________________
PS
As i am both dyslectic AND Swedish, you may laugh at my spelling and grammar, but please please don’t comment it if you understand what i mean
DS


Top
 Profile  
 
 Post subject: Re: ARC32 p39 usage ?
PostPosted: Tue Feb 15, 2011 12:29 pm 
Offline
Citizen

Joined: Sat Jan 15, 2011 10:01 am
Posts: 16
Yes i have

I can't use ADIN on pin 35
(with by the way are the right pin to read analog value fron AUX1 pin 6)
but HSERVOSTATE can be used

ADIN can only be used on "direct analog pins" ie 8-15 and 24-31

_________________
PS
As i am both dyslectic AND Swedish, you may laugh at my spelling and grammar, but please please don’t comment it if you understand what i mean
DS


Top
 Profile  
 
 Post subject: Re: ARC32 p39 usage ?
PostPosted: Tue Feb 15, 2011 4:15 pm 
Offline
Master

Joined: Tue Nov 21, 2006 9:34 am
Posts: 527
Actually I think you need to use HServoStat for all of them, unless you never use any HSERVO on the Arc32.

Than maybe you can do adin on pins P39, 56, 57, 58, these 4 pins are directly hooked up to Analog input pins. For pins 8-15, 24-31 they are connected part time to pin AtoD pins through the Mux chips so for sure you need HServoStat for them. And if you do any Hservo type stuff on your arc32, probably trying to do any ADIN on the first 4 pins will probably interfere with the HservoStat code...

Kurt

P.S. - I had to figure ot some of this with my C library code, which I still need to implement this part of it (http://www.lynxmotion.net/viewtopic.php ... 559#p65925)


Top
 Profile  
 
 Post subject: Re: ARC32 p39 usage ?
PostPosted: Wed Feb 16, 2011 3:53 am 
Offline
Citizen

Joined: Sat Jan 15, 2011 10:01 am
Posts: 16
I'll try to use ADIN on some of the other ports, and rapport here as soon as i have done it

_________________
PS
As i am both dyslectic AND Swedish, you may laugh at my spelling and grammar, but please please don’t comment it if you understand what i mean
DS


Top
 Profile  
 
 Post subject: Re: ARC32 p39 usage ?
PostPosted: Wed Feb 16, 2011 10:52 am 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 903
Location: Temecula, CA
To use the ADIN command on any of the analog pins of the ARC32 you must have the HSERVO backend running. It doesn't have to be actively driving any servos but it must be running.

Add this to the beginning of your program

hservo [p0\-31000]

This will force the compiler to include the hservo backend when compiling. If you have no hservo command in your program the hservo backend is not included and the software that controls the onboard muxes will not be running, hence you will have no access to the analog pins.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO