BasicMicro - Forums

www.basicmicro.com
It is currently Sat Feb 04, 2012 6:42 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: ADIN - Compile error
PostPosted: Fri Apr 02, 2010 7:32 pm 
Offline
Citizen

Joined: Fri Apr 02, 2010 10:22 am
Posts: 6
Help with ADIN

I am using an ATOM24 (not pro) and can't get the ADIN cmd to compile.
adin AX0,0,AD_RON,adcBits
returns error: [TOKEN 0]: Expected variable

Not sure why. I am following numerous examples. I declared adcBits as LONG. Tried a variable = to zero instead of zero, but no luck.

Any Ideas?

Thanks,
JP


Top
 Profile  
 
 Post subject: Re: ADIN - Compile error
PostPosted: Fri Apr 02, 2010 7:45 pm 
Offline
Master

Joined: Tue Nov 21, 2006 9:34 am
Posts: 500
What version of the IDE/Studio are you using?

I believe that the newer versions of Studio have converted the ADIN command to the new format:
adin pin, variable

Kurt


Top
 Profile  
 
 Post subject: Re: ADIN - Compile error
PostPosted: Sat Apr 03, 2010 4:51 am 
Offline
Citizen

Joined: Fri Apr 02, 2010 10:22 am
Posts: 6
I tried both version 1.0.0.15 and 1.0.0.20


Top
 Profile  
 
 Post subject: Re: ADIN - Compile error - Closed
PostPosted: Sat Apr 03, 2010 4:57 am 
Offline
Citizen

Joined: Fri Apr 02, 2010 10:22 am
Posts: 6
Thanks Kurt. I just tried ommitting the clk speed and the adsetup as you suggested and now it compiles. I guess I must be using an older manual.

JP


Top
 Profile  
 
 Post subject: Re: ADIN - Compile error
PostPosted: Sat Apr 03, 2010 9:42 am 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 784
Location: Temecula, CA
Yes, you are definitley using an old manual since we haven't released a new one yet. :)

In 1.0.0.20 you should now be getting command syntax popups after you type the command name(add a space after the command name and it should pop up) for reference.

_________________
Nathan Scherdin
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: ADIN - Compile error
PostPosted: Sat Apr 03, 2010 10:45 am 
Offline
Master

Joined: Sun Aug 17, 2008 5:26 pm
Posts: 798
Location: CA bay Area
I find the pop ups particularilly helpful. Nice touch. Thanks.
kenjj

_________________
kenjj
http://blog.basicmicro.com/
http://kjennejohn.wordpress.com/


Top
 Profile  
 
 Post subject: Re: ADIN - Compile error
PostPosted: Thu Apr 22, 2010 6:38 am 
Offline
Citizen

Joined: Wed Feb 10, 2010 1:09 pm
Posts: 16
Since we're on the subject of new/old manuals; I am trying to compile a while...wend loop in Basic Micro Atom IDE 2.2.1.1 like this:

while (x = 0)
statement
wend

and it's telling me "while without wend" error. Is that not the right syntax?


Top
 Profile  
 
 Post subject: Re: ADIN - Compile error
PostPosted: Fri Apr 23, 2010 7:04 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 784
Location: Temecula, CA
The while/wend command can't be used inside a do/while block. This is true on ALL version of our software.
Code:
do
  while(something)
     ...code...
  wend
while(something)



You can probably see why you can't use a while/wend inside a do/while block from the example code above. The compiler thinks the first while is the end of the do/while block and then it sees a wend without a starting while and pukes. :)

_________________
Nathan Scherdin
Basic Micro - Robotic Technology Evolved


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

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users 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