Sign in

username:

password:



Not a member?

Search m68hc11



Search tips

Subscribe to m68hc11



m68hc11 by Keywords

27c256 | 4K81H | 68HC11A1 | 68HC11P1 | 68hc24 | 68HC711E9 | 68HC811 | 8255 | A2D | ADC | ADC12138 | Am85C30 | BRCLR | Buffalo | CMOS | EEPROM | EPROM | Ethernet | EVB | EVBU | HC11E1 | HC11E9 | HC711E9 | Horray | ImageCraft | IRQ | Keypad | LCD | MC68HC11D0FN | MC68HC11E1CFU3 | MC68HC11F1 | MC68HC711E9 | MC68HC711E9CFN2 | Microcore11 | Microstamp11 | Minikit | NVRAM | PSD | PSD8xx | PSD9xx | PT1000 | RS232 | RTS | RXD | SPI | SRAM | TXD | Watchdogs | XIRQ


Ads

Discussion Groups

See Also

DSPFPGAElectronics

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


Advertise Here

Re: using MicroCore11 instead of Remote Control to Scorpion(motor c... - Jim Peterson - Dec 2 9:28:00 2004

it sounds like the W part of PWM is missing. there is a variable, it is
the duration of the pulse. if you generate 1.0ms pulses the motors
should run at -100 speed, if you generate 2.0ms pulses the motors should
run a +100 speed. at 1.5ms they should stop. your program will need to
vary the pulse width to change the motor speed.

Good luck.
Jim

ng seng lee wrote:

>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] >Yahoo! Groups Links




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