Close

OKOS Capacitive Touch Keyboard

A project log for One Kilobyte Operating System (OKOS)

Tiny computer OS for 1kB challenge. OKOS is just ok because OKOS is just OK.

ben-henckeBen Hencke 12/20/2016 at 03:014 Comments

Oooooh, shiny!

After wrangling Eagle a bit to let me make a regular sized qwerty keyboard, I ended up just using it to draw things and trace an outline and moving the actual electronics to a separate board.

The controller is made by overlaying a bunch of the circuits before printing the tone transfer sheet.

The code for the daisy-chained keyboard works, though I had to add 1 more instruction. I've got a "clever" hack, whereby I reuse a portion of the ISR as a subroutine and keep the retfie to both return and re-enable global interrupts. The only problem is that it also corrupts PCLATH with garbage because it isn't an interrupt. You see, normally the interrupt saves a bunch of things in shadow registers before it hits the ISR, and retfie restores all this for you, but in my case the first call is made form main code, and the shadow registers are not yet initialized. Interesting things happen when PCLATH is loaded with garbage right before you try to make a call...

So 61 total instructions, or 106.75 bytes. That should still leave plenty for receiving.

Discussions

jaromir.sukuba wrote 01/04/2017 at 18:59 point

Hi Ben, did you move on with this project? 

This is my favorite project from the 1kB contest.

  Are you sure? yes | no

Ben Hencke wrote 01/06/2017 at 20:52 point

Thanks :) Yes, after the replacing the PS2 keyboard with this capacitive touch controller, I think OKOS is in pretty good shape and comes in under 1k including the keyboard. AFAIK, its all submitted for the challenge and good to go. It could use an example program that lights up the badge or something, but works otherwise. I just had a kid :D and haven't had any more time to further polish things.

  Are you sure? yes | no

jaromir.sukuba wrote 01/09/2017 at 05:58 point

Oh great. Seen others (me including) posting last-moment project entries, your last update week before deadline made me a bit nervous there is something left undone ;-)

Do you have any video with touch keyboard in action? I'd love to see how responsive it is.

  Are you sure? yes | no

MortenW wrote 01/09/2017 at 10:32 point

Hi ben, congratulations on the Kid, and for a really exiting competition entry. Having kids tends to reduce the "hacking time". 

Well worth it though.

  Are you sure? yes | no