BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Sat Jan 20, 2018 7:44 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: ADIN error with switch from basic atom 40 to atom 40 rev D.
PostPosted: Sun Jul 18, 2010 4:45 pm 
Offline
Citizen

Joined: Thu May 06, 2010 2:43 pm
Posts: 16
I'm using Studio 1.0.0.32.

My code has the following line:
Code:
adin ax1, potread

which causes the following compile errors:

Code:
Message[306]   C:\Program Files\BasicMicro\Basic Micro Studio\system\mbasic14\mbasicadin.lib 760 : Crossing page boundary -- ensure page bits are set.
Message[306]   C:\Program Files\BasicMicro\Basic Micro Studio\system\mbasic14\mbasicadin.lib 763 : Crossing page boundary -- ensure page bits are set.
Message[306]   C:\Program Files\BasicMicro\Basic Micro Studio\system\mbasic14\mbasicadin.lib 768 : Crossing page boundary -- ensure page bits are set.
Message[306]   C:\Program Files\BasicMicro\Basic Micro Studio\system\mbasic14\mbasicadin.lib 773 : Crossing page boundary -- ensure page bits are set.
Message[306]   C:\Program Files\BasicMicro\Basic Micro Studio\system\mbasic14\mbasicadin.lib 778 : Crossing page boundary -- ensure page bits are set.
Message[306]   C:\Program Files\BasicMicro\Basic Micro Studio\system\mbasic14\mbasicadin.lib 783 : Crossing page boundary -- ensure page bits are set.
Message[306]   C:\Program Files\BasicMicro\Basic Micro Studio\system\mbasic14\mbasicadin.lib 788 : Crossing page boundary -- ensure page bits are set.
Message[306]   C:\Program Files\BasicMicro\Basic Micro Studio\system\mbasic14\mbasicadin.lib 793 : Crossing page boundary -- ensure page bits are set.


While this wasn't an issue with the atom 40, it makes the ADIN command non-functional with the new atom 40 Rev D.

If I delete the adin commands from the code, save it, and recompile, everything is fine. Nathan, you already have the code I'm working with. Any ideas?

Thanks,
Blake


Top
 Profile  
 
 Post subject: Re: ADIN error with switch from basic atom 40 to atom 40 rev
PostPosted: Sun Jul 18, 2010 6:20 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
I found these messages a couple days ago. However they are not errors or even warnings, they are messages. I checked the code that generates them and the page bits are being set correctly. The message number is just not being disabled around that block of code so these messages appear. This does not stop the code from compiling or programming. Only errors can stop the compiling/programming. Warnings are usually serious and need to be checked, but messages are in most cases benign. In this case the assembler always throws a message about page boundary crossing if the call crosses a page boundary. The assembler can not tell that the page bits were correctly set in the commands before the call. Most of the library calls have errorlevel settings to disable this warning. I just missed putting them in around this block of calls.

The next release will have these messages disabled around this block of code so you won't get the messages anymore.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: ADIN error with switch from basic atom 40 to atom 40 rev
PostPosted: Sun Jul 18, 2010 6:59 pm 
Offline
Citizen

Joined: Thu May 06, 2010 2:43 pm
Posts: 16
Got it to work finally.

Instead of using AX1, as in:
Code:
adin ax1, potread

I had to switch my potentiometer lead to pin 0, and change the code to:
Code:
adin P0, potread


This is a brand new RevD board, and I'm not sure why the ax pin (A/D channel 1) didn't work for a A/D pot reading but a general purpose I/O pin (A/D channel 12 on RevD) did.

Other than moving the lead of the pot from one pin to the other and changing the pin number in the code, literally nothing else has changed.

Blake


Top
 Profile  
 
 Post subject: Re: ADIN error with switch from basic atom 40 to atom 40 rev
PostPosted: Mon Jul 19, 2010 2:00 am 
Offline
Master

Joined: Mon Aug 18, 2008 1:26 am
Posts: 799
Location: CA bay Area
Hello, Blake. Perhaps the AX pins can be addressed as P# pins. Try
P28 for AX0
P29 for AX1
P30 for AX2
and P31 for AX3.
The demo code for Nano 40s uses P30 and P31 instead of AX pins.
Let us know how it goes.

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


Top
 Profile  
 
 Post subject: Re: ADIN error with switch from basic atom 40 to atom 40 rev
PostPosted: Mon Jul 19, 2010 4:31 am 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
The AX0 to AX3 pins can also be address as P28,P29,P30 and P31

This is the prefered naming of the pins as well. We are trying ot phase out the AX pin naming convention.

_________________
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 [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


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