Sign in

username:

password:



Not a member?

Search hc11



Search tips

Subscribe to hc11



Ads

Discussion Groups

Discussion Groups | M68HC11 | Re: using MicroCore11 instead of Remote Control to Scorpion(motor c...

Technical discussions about Freescale Microcontrollers: M68HC11. (Freescale Semiconductor is a Subsidiary of Motorola).

Re: using MicroCore11 instead of Remote Control to Scorpion(motor c... - ng seng lee - Dec 2 4:03:00 2004

I had try programming it using assemble language (using the follow infomation from http://www.lynxmotion.com/Product.aspx?productID=89&CategoryID=10)

I did also try to program the correct pulse as mention from lynxmtion. But the motor did not move at all. ( greater or less than 1.5ms on time, 20ms off time)

When I try using a pulse of 40% duty cycle of 2ms, the motor did move very slower and did not complete a revolution (less that half a revolution, on & off). ( i had attached the program assemble program).

Wonder can you help me with this problem. Thanks

Regards
Ivy

From lynxmotion:
How does it work? Controlling small sized DC motors from your RC set, or microcontroller has never been easier. Just connect the HB-04 motor controller as shown in the diagram, keeping your wires short and neat. Don't forget the RFI capacitor on the motors. The motors speed and direction can then be controlled with simple 1-2mS pulses, as you would a modified servo.

Microcontroller Control To use the HB-04 motor controller, provide a repeating pulse with a 1.5mS on-time, and a 20mS off-time to the control input. At this time the motor will not be running. Now when the pulse on-time is greater than 1.5mS the motor will rotate one direction, and when the pulse is less than 1.5mS the motor will rotate the other direction. The farther you go from 1.5mS the faster the motor will run. Keep the pulses from 1mS to 2mS in normal use.

RC Control Simply plug the controller into an unused channel on the RC receiver and adjust the trim on the transmitter to stop the motor. Moving the stick one direction will cause the motor to turn one direction, and moving the stick the other direction will cause the motor to turn the other direction. The farther from the center the stick is moved the faster the motor will turn. wrote:

In a message dated 12/1/04 9:36:32 A.M. Eastern Standard Time,
writes:

Recently i am using MicroCore11(68HC11) instead of remote control to
generate PWM(pulse wide modulation) to Scorpion(a motor controller
from robot-power) to control the motors. However i am unable to
generate the correct pulse (but instead i have square waves),and the
motor can't move.

When i use function generator to generate pulse to the Scorpion, the
motor can move.
================================================
Is the scorpion using radio control servos? These require a 1.5ms pulse
every 10 ms. There are many examples of how to program rc pulse trains.... look
at the web sites in the technological arts web ring... I have a microcore11 and
I program it using imagecraft c. I can help you with your program if you
send more info in an email. [Non-text portions of this message have been removed] Yahoo! Groups SponsorADVERTISEMENT ---------------------------------
Yahoo! Groups Links

To

---------------------------------

** MOTOR CONTROL USING PWM

PORTA EQU $00 ; PORT A DATA REGISTER
PORTB EQU $04 ; PORT B DATA REGISTER
PORTE EQU $0A ; PORT E DATA REGISTER
PORTD EQU $08 ; PORT D DATA REGISTER

BAUD EQU $24 ; SCI BAUD RATE CONTROL REGISTER
SCCR2 EQU $2D ; SCI CONTROL REGISTER 2
SCCR1 EQU $2C ; SCI CONTROL REGISTER 1
SCSR EQU $2E ; SCI STATUS REGISTER
SCDR EQU $2F ; SCI DATA REGISTER

TCNT EQU $OE ; TIMER COUNTER
TOC2 EQU $18 ; contains output-compare value
TFLG1 EQU $23 ; contains OC2F flag (bit6)
TCTL1 EQU $20 ; contains OM2(bit 7) & OL2(bit 6)
TMSK2 EQU $24 ORG $E000 ; Beginning address of EEPROM

LDX #$1000

; LDAA #%00000001
; STAA TMSK2,X

LDAA #%11000000
STAA TCTL1,X

LDAA #%01000000
STAA TCTL1,X LDAA #%01000000
STAA TFLG1,X

LDD TCNT,X

AGAIN ADDD #3960 ;OFF
STD TOC2,X TIMEUP BRCLR TFLG1,X $40 TIMEUP
LDAA #%01000000
STAA TFLG1,X

LDD TOC2,X ADDD #0040 ;ON
STD TOC2,X TIMEUP1 BRCLR TFLG1,X $40 TIMEUP1

LDAA #%01000000
STAA TFLG1,X

LDD TOC2,X

BRA AGAIN

ORG $FFFE
FDB $E000
END

[Non-text portions of this message have been removed]





(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )