hi mike,
first of all i really hope i can learn programming skills that you all guys have in this forum. i m a begginner in pic and i m looking forward i learn from you.
my project is to control a robotic arm. I achieved the first object by controlling the robotic arm with USB connection with computer and VB software.
now i designed a mobile base for the arm. my goal is to control 7 servos on the arm, and 2 DC motors of the differential mobile base.
to do this, i will use RF link. first pic is 16f628 ( or any other pic ) is the sender pic. i connected joystich potentiometers to it and used PICbasic pro to read potentiometers and send the data serially to RF transmitter. i used serout command but i think i should switch to mikrobasic and find another way with hard usart.
the second pic is 18f2550 , it is the receiving end, it must recieve the data from RF receiver and use it to generate PWM signals for servos and DC motors.
the most important thing is to generate servos signals, since DC motors could simply switched on and off ( i.e. no speed control ).
the data sent from the sending end must be 7 bytes as following
1- the first byte is for servo 1 and 2. since they are on the same joint, if receiving pic receives a byte that is equal to 200, this will be control byte for servo1, and 256 - 200 will be the control byte for the second servo
2- servos 5,6 are on the same joint also , and need only a byte
3- three more bytes for 3 other servos
4- 1 byte for dc motors ( on , off , right , or left )
5- a qualifier byte ( if needed )
my problem is how to modify the code provided in the first post of this thread to control only 8 servos. and is it possible to use usart in the way i described ? is it possible to use serout from sender pic and receive it with usart ?
i m using pic basic pro , but i m switching to mikrobasic. ( i m a beginner )