Putting robotics at your service™

Free shipping on orders over $200

Processing Interrupts with a Basic Atom Pro

Print view Share :
Previous topicNext topic

Page 2 of 2 [ 22 posts ]

1, 2
Rookie ( offline )
Posts: 28
Posted: 2010-02-25 22:04 
Thank you Kurt, that did it.

I seem to be having the same issue with the C code that I am using. So I have been searching for the C equivalent of the basic ENABLE (with no arguments) to enable global interrupts.

I read this comment in a post by Nathan: "manually enable the global interrupt flag(its in the CCR register and can only be set or cleared using the special CCR specific asm commands)."
so I am trying to use assembly to set the I (Interrupt Enable) bit of the Condition Code Register (CCR)

the code below compiles in a basic file, but I can't figure out how to compile this in a C file:

asm
{
.macro _ints_enable
bset #0,@SYSF:8
andc #0x7F,ccr
.endm
}

Any ideas?

Edit: I still don't know how to call asm routines from C, but adding this code to start.s will enable the global interrupts in a C program by clearing the interrupt enable bit in the condition code register:
andc #0x7F,ccr

-Bob


User avatar
Expert ( offline )
Posts: 628
Posted: 2010-04-04 16:28 
I added predefined macros for C/C++ that let you read/modify/write the ccr register in 1.0.0.20.

_________________
Basicmicro


User avatar
Guru ( offline )
Posts: 4914
Posted: 2010-04-04 17:24 
Thanks Nathan,

I missed the previous post.


Rookie ( offline )
Posts: 28
Posted: 2010-04-13 13:02 
Thanks for the macros Nathan, that's just what I needed.
Unfortunately, I cannot run any release beyond 1.0.0.16.
Here's the message I get from version 1.0.0.17 through 1.0.0.23:

Starting Compiler...
This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.


I've created new basic and c projects but still get the same error.

-Bob


User avatar
Expert ( offline )
Posts: 628
Posted: 2010-04-13 13:32 
I'm going to need more info. What OS are you using(32bit or 64bit as well). Have you installed any software that is out of the ordinary? Have you had any problems with other software recently? Do you have a second PC you can test on? Are you uninstalling all the old IDEs/Studios before install the new ones? Are you using a User account or an Admin account when running the software? What virus scanning software are you using? Are you using any other security software?

At this point no one else has reported this and I can't reproduce it. If anyone else is having this problem please post it here.

Based on this error message and other posts I've found online about this error message this appears to be a VC 2008 runtime problem on your PC. Our installer installs these runtimes automatically into the installation folder but there could be something wrong with your PC causing the locally installed copy to not be detected/used. Try installing them using this link which installes them for the entire PC:

http://www.microsoft.com/downloads/deta ... laylang=en

One other thing. Make sure your PC has all the updates.service packs for tour OS.

_________________
Basicmicro


User avatar
Guru ( offline )
Posts: 9257
Posted: 2010-04-13 17:45 
FYI, We just installed 1.0.0.23 on a 32 bit Vista machine and it went well. We can compile.

_________________
Jim Frye, the Robot Guy
http://www.lynxmotion.com
I've always tried to do my best...


Rookie ( offline )
Posts: 28
Posted: 2010-04-13 21:27 
Problem is resolved. I have Visual Studio 2005 installed on my systems. The Basic Micro Studio installer did not install the VS2008 run-time, perhaps because of the VS2005 install. I manually installed VS2008 run-time and Basic Micro Studio 1.0.0.23 is now compiling my applications.
Thank you for your help!
I will be testing my Basic and C drivers with 1.0.0.23 very soon.
-Bob


1, 2

All times are UTC - 5 hours [ DST ]. It is currently 2014-10-31 08:43
Feedback Form
Feedback Form