Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Is there an encoder that does this?

Status
Not open for further replies.
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.
 
you are after a MUX
 
ok actually this is what i had in mind:

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.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top