The simple answer is yes. You can plug in all 5 channels from your receiver into 5 pins on the Atom Pro bot board and plug your servos into other pins on the Bot board.
The simplist approach would be to simply us the pulsin command to read in the pulse values that are coming from your receiver.
Something like:
[code] ;Read input pulse lengths in the correct order that take shortest time
PULSIN RCCh0, 0, RCInput(0)
PULSIN RCCh2, 0, RCInput(2)
PULSIN RCCh4, 0, RCInput(4)
PULSIN RCCh1, 0, RCInput(1)
PULSIN RCCh3, 0, RCInput(3)
[/code]
If you do a serach on the forums here for pulsin, you will find several examples. If you are using pulsin to read the values in, it is highly unlikely that you will be able to read two consecutive channels that your receiver generates without having to wait awhile, That is why this code skips channels to speed up the code. However the best order depends on your receiver.
I do have some assembly language code that can read in all the channels in one pass, that you can find if you do a search on “mpulsin” but you might want to wait to try that until you get it limping along and decide you need the speed improvements.
A simple program could probably be layed out like:
;[con]
; define constants
RCCh0 con P0
RCCh1 con P1
RCCh2 con P2
RCCh3 con P3
RCCh4 con P4
SRVO0 con P11
SRVO1 con P12
SRVO2 con P13
SRVO3 con P14
SRVO4 con P15
;[vars]
RCInput var word(5)
HServoOutput var sword(5)
i var byte
;...
;[init]
;Interrupt init
ENABLEHSERVO
;... all of the stuff you need to initialize your setup
;[main loop]
main:
;
; Read in the pulse values
; Read input pulse lengths in the correct order that take shortest time
PULSIN RCCh0, 0, RCInput(0)
PULSIN RCCh2, 0, RCInput(2)
PULSIN RCCh4, 0, RCInput(4)
PULSIN RCCh1, 0, RCInput(1)
PULSIN RCCh3, 0, RCInput(3)
; convert the 5 channels into hservo values -12000 to 12000
; note: this calculation will probably need to be tweaked!!!
for i = 0 to 4
HServoOutput(i) = (RcInput(i) -1500) * (12000/1500)
next
; now output the values to hservo
hservo [SRVO0\RCInput(0),SRVO1\RCInput(1),SRVO2\RCInput(2),SRVO3\RCInput(3),SRVO4\RCInput(4)]
; and go back to do again
goto main
Note, I quickly typed this up so there are probably mistakes and the conversion values may not work correctly… But it might get you along the right track.
Kurt