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

Michael Pearce chchrobotics@lists.linuxnut.co.nz
Fri, 29 Sep 2006 21:43:37 +1200


What frequency are you running the processor at?
 the full 30MIPS?

Mike


On Friday 29 September 2006 21:25, Michael Pearce wrote:
> That is what I was planning to do as well.
>
> 1. calc time needed 0 to 1ms then add 1ms
>    convert to timer compare value
>
> 2. start timer, set flag indicating port that was used
>
> 3. On interrupt
>    a. check flag and turn that port off
>       (Or turn them all off)
>    b. stop timer
>    c. clear int flag etc
>
> mike
>
> On Friday 29 September 2006 21:16, Carl Ranson wrote:
> > 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/chchroboti
> > >>cs
> >
> > _______________________________________________
> > Chchrobotics mailing list
> > Chchrobotics@lists.linuxnut.co.nz
> > http://lists.ourshack.com/mailman/listinfo/chchrobotics

-- 
KIWACAN 
Electronics Design
Concept to Production

Mobile:  +64-21-249-5674
Phone:   +64-3-347-3311
Fax:     +64-3-347-2123
Website: http://www.kiwacan.co.nz