Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I write a touch screen driver for RISC OS?

36 views
Skip to first unread message

Alan Williams

unread,
Dec 10, 2009, 7:32:20 AM12/10/09
to
I have recently acquired a touch lcd from a decommissioned kiosk.
(an old version of this http://www.neoproductsgroup.com/130/neo-kiosks/pathfinder-range/)

Its serial port interfaced, quite nice 4K x 4k resolution and 0..256
for how hard you press. Its surface acoustic wave as far as I can
tell (however that may work).

I can digest the byte stream in BASIC and can plot things on the
screen according to the touch point and pressure.

I was wondering if somebody can remind me, or better still point me to
an example, of how to write a RISC OS mouse driver. I am sure I used
to know this kind of stuff once.

I am expecting to have to write a module, probably assembler. I am
wondering what the best API to use to hook into the serial port
incoming character stream is. I am a bit reluctant to resort to
reading the chip under interrupts my self.

If I decode the byte stream as it arrives I will then need to insert
mouse coordinates and button down/button up events into RISC OS. What
would the best API for that be?

I suppose that the source to an existing serial mouse driver would
really be the most useful resource to adapt to this touch screen.

Any recommendations would be gratefully received.

Alan

Rob Kendrick

unread,
Dec 10, 2009, 7:40:18 AM12/10/09
to
On Thu, 10 Dec 2009 04:32:20 -0800 (PST)
Alan Williams <a...@genesis.net.au> wrote:

> Its serial port interfaced, quite nice 4K x 4k resolution and 0..256
> for how hard you press. Its surface acoustic wave as far as I can
> tell (however that may work).

There are microphones around the edge of the screen, and a small DSP
measures the sound waves that arrive at each microphone, allowing it to
calculate where on the screen the noise came from.

I've never really much cared for them; capacitive ones always seem to
work better.

> I can digest the byte stream in BASIC and can plot things on the
> screen according to the touch point and pressure.
>
> I was wondering if somebody can remind me, or better still point me to
> an example, of how to write a RISC OS mouse driver. I am sure I used
> to know this kind of stuff once.

RISC OS's input system has no concept of pressure, so you'll have to
ignore that for now. RISC OS has also a murky past when it comes to
mouse/pointing drivers, and only quite recently has an API been devised
that even slightly covers all the bases. You can find some of it here:

http://select.riscos.com/prm/input/pointerdevices.html

B.

Steffen Huber

unread,
Dec 10, 2009, 9:57:32 AM12/10/09
to
Alan Williams wrote:
[snip]

> I was wondering if somebody can remind me, or better still point me to
> an example, of how to write a RISC OS mouse driver. I am sure I used
> to know this kind of stuff once.

Thomas Milius wrote a touchscreen driver for RISC OS. You can find it
in the RISC OS sources from RISC OS Open.

[snip]

Steffen

--
Steffen Huber
hubersn Software - http://www.hubersn-software.com/

Ste (news)

unread,
Dec 10, 2009, 11:03:17 AM12/10/09
to
In article <7ocgisF...@mid.individual.net>,

Steffen Huber <sp...@huber-net.de> wrote:
> Alan Williams wrote:
> [snip]
> > I was wondering if somebody can remind me, or better still point me to
> > an example, of how to write a RISC OS mouse driver. I am sure I used
> > to know this kind of stuff once.
>
> Thomas Milius wrote a touchscreen driver for RISC OS. You can find it
> in the RISC OS sources from RISC OS Open.

It's in:

cvsroot/bsd/RiscOS/Sources/ThirdParty/TMilius/HWSupport/Input/TchScrn

For those who are interested.

Steve

--
Steve Revill @ Home
Note: All opinions expressed herein are my own.

Alan Williams

unread,
Dec 10, 2009, 10:29:02 PM12/10/09
to
> cvsroot/bsd/RiscOS/Sources/ThirdParty/TMilius/HWSupport/Input/TchScrn

Thanks for that I am looking at it now, I also checked out sermouse
while I was at it. TchScrn seems to be for a USB device. sermouse
looks like a more straight forward proposition. If I get the external
one working with a RPC, it occurred to me that my OMAP3500 device
(devkit8000) also has a touch screen, I may be able to get that going
too.

Alan

Chris Hall

unread,
Dec 10, 2009, 1:42:48 PM12/10/09
to
In message <674503bc-e31c-44c3...@b25g2000prb.googlegro
ups.com>
Alan Williams <a...@genesis.net.au> wrote:

> I have recently acquired a touch lcd from a decommissioned kiosk.
> (an old version of this
> http://www.neoproductsgroup.com/130/neo-kiosks/pathfinder-range/)

> Its serial port interfaced, quite nice 4K x 4k resolution and 0..256
> for how hard you press. Its surface acoustic wave as far as I can
> tell (however that may work).

That's pretty good resolution for an LCD screen.

> I can digest the byte stream in BASIC and can plot things on the
> screen according to the touch point and pressure.

> I was wondering if somebody can remind me, or better still point me to
> an example, of how to write a RISC OS mouse driver. I am sure I used
> to know this kind of stuff once.

> I am expecting to have to write a module, probably assembler. I am
> wondering what the best API to use to hook into the serial port
> incoming character stream is. I am a bit reluctant to resort to
> reading the chip under interrupts my self.

> If I decode the byte stream as it arrives I will then need to insert
> mouse coordinates and button down/button up events into RISC OS. What
> would the best API for that be?

> I suppose that the source to an existing serial mouse driver would
> really be the most useful resource to adapt to this touch screen.

> Any recommendations would be gratefully received.

> Alan


--
Chris Hall <ch...@svrsig.org>

Rob Kendrick

unread,
Dec 11, 2009, 7:35:58 AM12/11/09
to
On Thu, 10 Dec 2009 18:42:48 GMT
Chris Hall <ch...@svrsig.org> wrote:

> > Its serial port interfaced, quite nice 4K x 4k resolution and 0..256
> > for how hard you press. Its surface acoustic wave as far as I can
> > tell (however that may work).

> That's pretty good resolution for an LCD screen.

It's not an LCD screen, it's a touch screen.

B.

Mark McDougall

unread,
Dec 11, 2009, 5:51:59 PM12/11/09
to
Alan Williams wrote:

> I am expecting to have to write a module, probably assembler.

If you need source for a calibration/translation routine let me know. I
found an excellent source that uses three points for calibration and
accounts for rotation errors as well...

Regards,

--
| Mark McDougall | "Electrical Engineers do it
| <http://members.iinet.net.au/~msmcdoug> | with less resistance!"

Rob Kendrick

unread,
Dec 11, 2009, 8:31:59 PM12/11/09
to
On Sat, 12 Dec 2009 09:51:59 +1100
Mark McDougall <msmc...@no.spam.iinet> wrote:

> Alan Williams wrote:
>
> > I am expecting to have to write a module, probably assembler.
>
> If you need source for a calibration/translation routine let me know.
> I found an excellent source that uses three points for calibration
> and accounts for rotation errors as well...

Yes, it's called TSLIB.

B.

Alan Williams

unread,
Dec 12, 2009, 7:44:08 AM12/12/09
to
> Yes, it's called TSLIB.

I will look at that, but probably only if it proves necessary.. From
what I have observed so far linearity is quite good. There are a
number of dos setup utilities, which I haven't tired yet, so its quite
possible that the calibration settings are stored internally.

Rob is correct, 4k x 4k is the resolution of the touch screen. The
underlying LCD screen is 1024x768.

The Touch controller is an "Intellitouch 2500S"

Unfortunately it doesn't seem to do drags all that well. Mind you its
former purpose was a job search kiosk so it probably didn't need to.
My purpose is toddler-paint. She is quite keen on the paint program
on the Chumby so I was aiming to do something similar but lots bigger.

Alan

Rob Kendrick

unread,
Dec 12, 2009, 8:35:38 AM12/12/09
to
On Sat, 12 Dec 2009 04:44:08 -0800 (PST)
Alan Williams <a...@genesis.net.au> wrote:

> Unfortunately it doesn't seem to do drags all that well. Mind you its
> former purpose was a job search kiosk so it probably didn't need to.
> My purpose is toddler-paint. She is quite keen on the paint program
> on the Chumby so I was aiming to do something similar but lots bigger.

Indeed; they work by hearing the "tap" of your finger, or rather
measuring the vibration of the glass. Your finger is too greasy to
make enough vibrations for it to pick up :) Try using a metal-pointed
stylus or similar, and it should work for drags somewhat better.

B.

Alan Williams

unread,
Dec 13, 2009, 8:14:16 AM12/13/09
to

This is getting a bit OT..

I tried drags with a number of items and the results are quite
unexpected.

I noticed that the toddler had a better result with drags than me. So
I experimented more and found that all my fingers other than my right
index finger do drag reasonably well.

I tried the Psion S5 stylus, which it did not detect at all.

Hard plastics such as a 10mm LED were not detected at all.

Some soft toy paws worked, velvet being the best, most were not
detected.

Glass (a light bulb) and wooden objects were not detected.

The only thing other than finger which worked reliably was a white
pencil eraser.

Alan

Rob Kendrick

unread,
Dec 13, 2009, 8:57:38 AM12/13/09
to
On Sun, 13 Dec 2009 05:14:16 -0800 (PST)
Alan Williams <a...@genesis.net.au> wrote:

> > Indeed; they work by hearing the "tap" of your finger, or rather
> > measuring the vibration of the glass.  Your finger is too greasy to
> > make enough vibrations for it to pick up :)  Try using a
> > metal-pointed stylus or similar, and it should work for drags
> > somewhat better.
>

> This is getting a bit OT..

And thus interesting :)



> I tried drags with a number of items and the results are quite
> unexpected.
>
> I noticed that the toddler had a better result with drags than me. So
> I experimented more and found that all my fingers other than my right
> index finger do drag reasonably well.

Your right index finger most likely has the smoothest surface.

> I tried the Psion S5 stylus, which it did not detect at all.

Indeed; it'll have a smooth nib, designed for a resistive screen (which
is two layers, and it detects where you're pressing because the two
layers touch and have different resistance depending on where)

> The only thing other than finger which worked reliably was a white
> pencil eraser.

I can imagine that working quite well, as it variations between it
gripping and slipping would cause the vibrations the panel detects.
Try an empty biro (carefully.)

B.

Dave Higton

unread,
Dec 13, 2009, 12:15:32 PM12/13/09
to
In message
<c1bfc9f7-5931-414b...@b36g2000prf.googlegroups.com>
Alan Williams <a...@genesis.net.au> wrote:

> The only thing other than finger which worked reliably was a white
> pencil eraser.

This suggests that what the screen needs is an item that absorbs
acoustic energy. Hard items reflect rather than absorb. Rubber
is used as a damping material.

Dave

Jeremy Nicoll - news posts

unread,
Dec 13, 2009, 12:59:38 PM12/13/09
to
Dave Higton <daveh...@dsl.pipex.com> wrote:

Or that it needs something which grips a bit but slips, causing sound for
the mics to pick up.

--
Jeremy C B Nicoll - my opinions are my own.

Email sent to my from-address will be deleted. Instead, please reply
to newsre...@wingsandbeaks.org.uk replacing "nnn" by "284".

Martin Wuerthner

unread,
Dec 14, 2009, 10:51:21 AM12/14/09
to
In message <20091210124...@trite.i.flarn.net.i.flarn.net>
Rob Kendrick <nn...@rjek.com> wrote:

> RISC OS's input system has no concept of pressure, so you'll have to
> ignore that for now.

The de facto standard for pressure information is the interface
introduced by Eesox for their pressure sensitive tablets. It was later
used by the table driver by Paradise, too. Using that interface would
allow PhotoDesk to use the pressure information.

Martin
--
---------------------------------------------------------------------
Martin Wuerthner MW Software http://www.mw-software.com/
ArtWorks 2 -- Designing stunning graphics has never been easier
spam...@mw-software.com [replace "spamtrap" by "info" to reply]

0 new messages