Maker Pro
Maker Pro

Which IC will do this?

BenR

Dec 12, 2012
3
Joined
Dec 12, 2012
Messages
3
I need an IC which takes 3 bytes from one input but ignores the second byte and replaces it with a byte from another input. I'm pretty new to circuit design so I'm not sure if there's an IC which can do this. Basically, I have an optic mouse sensor which is constantly outputting three bytes (the first a set of booleans, the second showing the movement on the x-axis and the third showing the movement on the y-axis). I want to replace the x-axis value with a value from an accelerometer which I'm going to attach to the mouse.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,749
Joined
Nov 17, 2011
Messages
13,749
Use a small microcontroller to do this. have one port read the input data. A second port read the accelerometer data. A third port to output the remixed data stream.
 

BenR

Dec 12, 2012
3
Joined
Dec 12, 2012
Messages
3
Use a small microcontroller to do this. have one port read the input data. A second port read the accelerometer data. A third port to output the remixed data stream.

Great. Thanks. But how do I make that work? Do I have to program the microcontroller? Sorry. I'm really new to making circuits.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,749
Joined
Nov 17, 2011
Messages
13,749
I'm pretty sure there is no ready-made chip or controller for your idea. Someone else might prove me wrong, though.
You would need a small microcontroller with some additional hardware (interfaces for receiving and sending data, possibly a clock generator, power supply).
You will have to write code for your purpose and program this code into the microcontroller.

You will also have to take care of the correct data format for the accelerometer values so they can be interpreted by the receiving end (PC?).
Are you aware that a mouse doesn't send absolute coordinates but relative data (delta-x, delta-y)? If you move a mouse with (more or less) constant velocity across a surface, it will send (equally more or less) constant delta-x and delta-y values.
If you move an accelerometer with constant velocity, it will send no value at all, since constant velocity means no acceleration. You will get an output from the accelerometer only if the velocity changes (acceleration or deceleration).

Harald
 

BenR

Dec 12, 2012
3
Joined
Dec 12, 2012
Messages
3
I'm pretty sure there is no ready-made chip or controller for your idea. Someone else might prove me wrong, though.
You would need a small microcontroller with some additional hardware (interfaces for receiving and sending data, possibly a clock generator, power supply).
You will have to write code for your purpose and program this code into the microcontroller.

You will also have to take care of the correct data format for the accelerometer values so they can be interpreted by the receiving end (PC?).
Are you aware that a mouse doesn't send absolute coordinates but relative data (delta-x, delta-y)? If you move a mouse with (more or less) constant velocity across a surface, it will send (equally more or less) constant delta-x and delta-y values.
If you move an accelerometer with constant velocity, it will send no value at all, since constant velocity means no acceleration. You will get an output from the accelerometer only if the velocity changes (acceleration or deceleration).

Harald

I thought an accelerometer showed how much it was leaning? I'm going to have this attached to a smartphone once I've got an OTG adapter for it. I didn't think about the mouse sending absolute coordinates. I'll have to take that into consideration too.I'm going to have to do quite a bit of research to get this working. The most complicated circuit I've ever made is a bulb connected to a battery so I'm jumping right into the deep end here.
 

sirch

Dec 6, 2012
109
Joined
Dec 6, 2012
Messages
109
You are correct that you can use an accelerometer to detect tilt because gravity is a form of acceleration. So if the axis of the accelerometer is vertical you will get a constant reading. As it tilts away from vertical the output will change, the value read will be proportional to the tilt.

Assuming the output from the mouse is serial, I also wonder if you couldn't use a shift register (or 3) to do this? As a first thought I guess you could feed the mouse into 3 serial-to-parallel shift registers and then take the the parallel out from reg 1 and 3 to 2 parallel-to-serial registers and feed the accelerometer into a third. This of course doesn't take care of scaling the accelerometer to a value appropriate for whatever you are connecting the mouse to.

That said, assuming you use 1 byte registers, that's 6 shift registers, timing circuit, scaling for the accelerometer, etc, etc. so as others have suggested using a micro-controller is probably simpler.
 
Last edited:
Top