Nintendo 3DS Touch Screen

Hello,

I am trying to emulate some instructions on how to control the Nintendo 3DS touch screen.

I am having trouble translating the instructions into code for the Arduino.

The wiring is all ready, I just need some help with translating these instructions into code.

Can anyone help?

PDF is attached. Details on page 7.

We only need the last two pins on the right in order to simulate a touch screen for 3DS, they
are X+ and Y+ respectively.

The reading of the touch screen is interrupt based, as described in Section 1.2 of the
document. Y+ pin is normally at VCC, which is pulled to ground when a touch occurs,
generating a touch interrupt, and starting the sampling process.

To write X coordinates, you can tie the DAC output of microcontroller directly to X+ pin in series
with a 10K resistor, so when X+ is in input mode, the DAC voltage is read, and when X+ is in
output mode, the resistor prevents the current flow. Write 0V to 1.8V for coordinate 0 to 320.

For Y coordinates, the Y+ pin is tricker, since it also generates an interrupt, so some timing is
required. After connecting it to DAC in series of a 1K resistor, pull it to ground to initiate touch
interrupt, then monitor this pin using an on-board ADC. Once the Y+ pin has been switched to
output (reading X coordinate), wait 500 microseconds, so now Y+ is in input mode, then write
the Y coordinate to Y+ using the DAC, hold for 200 microseconds, then pull it down to ground
again. Write 0V to 1.8V for coordinate 0 to 240.

PDF was too large, but can be found on Github here: 3xtDS/overview.pdf at master · dekuNukem/3xtDS · GitHub