Are there any devices that acts like an encoder to accept 4 inputs and then outputs in serial data based on the inputs so that it can be processed by the microcontroller.
Was thinking about this because i am wondering is it possible to have a switch based remote control on one side (forward, break, left, right) and then the serial data is sent via RF to the microcontroller used to control the motors.
I have a transmitter casing that is connected to the PC via serial port.
In the casing, i have a switch to choose between using the PC serial port or 4 manual switches (on the casing itself) to communicate with the microcontroller at the receiver side.
For the 4 manual switches, i am planning on using an 8 bit Parallel in/serial output shift register to send an 8 bit info to the microcontroller.
Unfortunately, i don't know where to get the clock signal from because a shift register requires a clock to work. Any ideas on how to overcome this or better way of accomplishing the required task?
If you have a spare pin on the microcontroller you can write in a clock signal for the shift register. This should be easy top do especially if you are using assembler.