[chbot] The next steps for my bot and control board.

Carl Ranson chchrobotics@lists.linuxnut.co.nz
Fri, 29 Sep 2006 21:16:25 +1200


A low resolution is fine, 8 forward and 8 back.

I would have imagined that the servo pulses could be easily done by 
setting the port high, kicking off a timer and then clearing it when the 
interrupt fires. Alternate betwen pins A and B or as many servo channels 
as you want.

Im assuming you can fire timers as one off events like this but I 
haven't looked into it that closely.

The 16F84 rs232 servo board I did ages ago had code like this. Instead 
of trying to manage all pulses at once, do one servo channel at a time 
and take advantage of the fact that the period of the pulse is a LOT 
more important than the frequency they are repeated at.

Michael Pearce wrote:

>Hi Carl,
>
>I will be writing both Serial and RC Servo control functions 
>as I will need the same for my R2 unit.
>
>My servos arrive early next week, so cannot test until then.
>
>Both functions may be interrupt driven (Not sure how the 
>RTOS handles interrupts)
>
>Any particular ports you want to use for the rc servo 
>pulses?
>
>Also what resolution are you looking for? 8/12/16 bit?
>
>Mike
>
>
>
>On Friday 29 September 2006 20:25, Carl Ranson wrote:
>  
>
>>Previously I was using the notebooks RS232 to talk to the
>>motor controller directly but I have a layer of sensors
>>to add. I only have one serial port available, so the
>>plan is to put the dsPic board in the middle and have it
>>do the motor control and sensor monitoring.
>>
>>I've got the RTOS and range sensors working so the next
>>bit is to communicate with the pc and drive the motors.
>>The motor controller can talk serial comms or rc servo
>>pulses, so I figured i'd use servo pulses to drive the
>>motors and let the dsPic use its uart for the 232.
>>
>>Anyone got some code or exmaples to get me started?
>>(Mike, I'm looking in your direction)
>>Cheers all.
>>CR
>>
>>
>>_______________________________________________
>>Chchrobotics mailing list
>>Chchrobotics@lists.linuxnut.co.nz
>>http://lists.ourshack.com/mailman/listinfo/chchrobotics
>>    
>>
>
>  
>