Main > Lightguns |
Question: DIY Wiicam for 3.3V boards? |
<< < (2/2) |
Prow:
I've directly connected a Wii camera module to an RP2040 and it works fine as they are both 3.3V devices. For the I2C connection, I used 4.7K pull-up resistors and this worked fine up to 1MHz. I can't remember if I tested without the resistors but I doubt the I2C could run that fast with the weak internal pull-ups. I used the RP2040 to generate a 25MHz clock for the Wii camera. There are two easy ways to do this. You can use the clock generator output or the PWM peripheral with a 50% duty cycle. Set the System Clock to 125 or 100 MHz to target 25MHz output. When looking at the clock signal on a scope, there was large overshoot and undershoot. Perhaps it's severe ringing due to an impedance mismatch? Is it a potential issue? :dunno A 50 to 100 ohm resistor (in series) fixed this. The RP2040 has a drive strength adjustment but I haven't yet tested if there's a setting that would help clean up the clock signal without requiring a resistor. |
RandyT:
--- Quote ---I used the RP2040 to generate a 25MHz clock for the Wii camera. There are two easy ways to do this. You can use the clock generator output or the PWM peripheral with a 50% duty cycle. Set the System Clock to 125 or 100 MHz to target 25MHz output. --- End quote --- It's good to hear a confirmation that this is achievable. The oscillators are available, but not the easiest to come by and add some expense and complexity. *edit* Here is a good explanation for using the PIO. It looks as though the PIO can be on any GPIO pin and it essentially runs code separate from the main CPU. Seems like a good approach for a clock output and there is even some sample code for generating a square wave output. --- Quote from: Prow on January 12, 2024, 11:46:55 am ---When looking at the clock signal on a scope, there was large overshoot and undershoot. Perhaps it's severe ringing due to an impedance mismatch? Is it a potential issue? :dunno A 50 to 100 ohm resistor (in series) fixed this. The RP2040 has a drive strength adjustment but I haven't yet tested if there's a setting that would help clean up the clock signal without requiring a resistor. --- End quote --- I think you are onto something with that. Based on a paper I just read, there are multiple drive gates in parallel and using all of them can cause current spikes which may be overdriving the signal. It's certainly something worth exploring. If the BOM to interface the camera to the RP2040 ends up being just a few resistors, that would be pretty nice! |
Navigation |
Message Index |
Previous page |