To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 1812
1811  |  1813
Subject: 
Re: Assembly in my C-program
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Wed, 28 Mar 2001 13:37:21 GMT
Viewed: 
1290 times
  
Actually I am trying to control a stepper motor. So when i need to send 50 pulses
fast, motor on and off takes same time because there same other tasks running at
the same time.
So it would be much quicker if I could just call motor speed (50), and Legos would

perform the on off for me (as it does now, but not continuously -pwm).

Regards,
Athanasios Kostakos




Jakob Engblom wrote:

In lugnet.robotics.rcx.legos, Athanasios Kostakos writes:
HI,

I was wondering if I could write assembly code in my c-program. I would like • to
access the motor output port as a digital port and control when it is on and
when off (possibly writting something like "mov.b r6l,@0xf000:16").

This should be performed by mapping a variable on top of the memory location,
and NOT by inline assembly.

Or can I change the dmotor.h file and when I call the "motor_a_speed(1-255)",
actually to control the times the motor output port will go on and off?

What is wrong with speed=0 for off and speed=255 for on?

/jakob



Message has 2 Replies:
  Re: Assembly in my C-program
 
(...) If you want to drive directly the motors you should first disable motor handling in legOS (remove CONF_DMOTOR definition in config.h). Then you can create a high priority task that switches motors on and off writing in the motor output port. (...) (23 years ago, 28-Mar-01, to lugnet.robotics.rcx.legos)
  Re: Assembly in my C-program
 
(...) pulses (...) at (...) would (...) Hmmmm. This should be possible, but it's a bit more tricky with stepper motors - you have to allow for the speed-up and slow-down. Thus just calling motor_speed(50) would have to initiate a task that starts (...) (23 years ago, 28-Mar-01, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: Assembly in my C-program
 
(...) to (...) This should be performed by mapping a variable on top of the memory location, and NOT by inline assembly. (...) What is wrong with speed=0 for off and speed=255 for on? /jakob (23 years ago, 28-Mar-01, to lugnet.robotics.rcx.legos)

5 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR