Requesting Feasibility Check / Advice -- Custom USBHID Touchscreen LCD Keyboard

Status
Not open for further replies.

starhawk

Member
I have a Teensy LC, sitting new in the bag for... quite a while (turned out QMK's relevant compatibility layer at the time... needed work) and I'd like to use it here.

I have a specific reason for wanting to do this this way. (I'm weird. Don't ask.)

I want to make an interface that acts like a USBHID keyboard (i.e., appears to a PC as a standard USB keyboard) but visually speaking looks more like an alien-of-the-week interface from 'Star Trek: Voyager', or the like.

I have two potential displays i can use... one is an SVGA job off a "Velocity Micro Cruz R101" "eReader" my mother bought at Borders just before they died... one of those lovely Android 2.x tablets that cooks itself in 6mo because the processor is overclocked double to make it slightly less awful. I have the touch panel as well... four wire resistive job on a 6pin FlexPCB connector; the outer pins are NC.

*That* LCD is a " CLAA070MA21BW " model, BTW... I have the datasheet but I'm on my phone and the PDF isn't so it's gonna have to wait (sorry). 60pin FlexPCB connector, for 24bit parallel RGB... I think?

The other LCD is a Hydis HV070WX2-1E0 off a... 2012? Nexus 7 tablet. (It got old and slow and I scrapped it out. Yay.) It has a capacitive digitizer, but I'm not sure how that connects, and there's *two* ways to drive it but both suck. It has parallel-RGB input, but the bifurcated (!) FlexPCB connectors contacts aren't the normal style, they look like the PCB edgecard contacts on an old AGP-slot graphics card! There's also a separate driver PCB under a gold fabric swatch, I've not looked at it but it has this teeny short FlexPCB that really wants to tell you that ASUS made it, with the absolute tiniest Hirose connector I think I've ever seen on the far end. 30pin job IIRC, and something like 0.25mm pitch. Yikes.

The Hydis LCD also has a much higher resolution,1280x800. This... could cause issues! ;) Honestly, I don't mind the lower resolution of the SVGA LCD.

In each case, the LC would need to handle the screen and touch panel essentially on its own (OK, the Hydis panel has a controller for that, because capacitive panel... but you know what I mean). I want to keep costs as low as possible. I have RAM chips i can maybe use for framebuffer work but they're all parallel-access SRAM or DRAM... mostly SRAM. Absolutely they're all in the KB

Is this feasible with what I describe...?
 
Datasheets. I've included the schematics for the Nexus 7 that the Hydis display was from (!!) -- I forget where I found them, it was years ago. IIRC it had developed a power-on issue (i.e., it wouldn't) that a replacement battery was unable to resolve. It's a (former) ME370-T. Also, correction... the FPC is er the touch connections. Wow. The controller is on the motherboard but uhm yeah that's a BGA part so I'll be needing to get something to replace that if that's the LCD I'm using... especially since it's really a two-chip solution, and the second chip (some kinda special vreg) is *also* a BGA... and there's NO documentation publicly available for either chip. Screw that!

So... for the Hydis display... LCD pinout, page 23 of the 44-page PDF -- it's LVDS, so it's *also* gonna need a transmitter... /sigh
Touch panel on that, page 29. It's the "FPC1" pinout shown there. Also, in both cases: ye gods that connector!

The Hydis panel's datasheet is too big for the forum attachment size which... seems a bit oddly low to me at 1.5mb, but I suppose there's a good reason. Nevertheless, that means you get a Google Drive link for that! I've still got stuff in my Google Drive that I put up on an Internet forum that I've not been on in... four or five years at least -- and another that I'm pretty sure is entirely inoperative (it's a long story) and I keep it there, because I figure someone might still need it, so this isn't going anywhere any time soon, either. Here you go -- https://drive.google.com/file/d/1urisvWlaEwTF0J6z4LfQZiyJv3WhShTF/view?usp=sharing

I still have the original PCBs for the Nexus in a box somewhere, and I think I know where, but... that's not something I'd want to try, considering the other day I was trying to put a USB3 port back on a hub where I'd screwed it up (in my defense, I was being particularly ham-handed, it was a surface-mount, straddle-mount port -- ugh! -- and the hub was out of its housing) and the hub ended up in the eWaste box because I was so good at shorting adjacent solder joints with inadvertent bridges that I was considering petitioning the local district court to have my name legally changed to Jeff!

Yeah.

Through-hole is OK as long as it's not ~3am tho... this was like 4am and surface mount.

I still think the SVGA display with its horrible, horrible resistive touch screen that you practically have to smack like [I was going to make a really crude analogy here with the intent of being funny, but I'd probably just get insta-banninated for my efforts, so... use your imagination instead! Sorry.] to make it pay *any* attention to you.
 

Attachments

  • google_nexus7.pdf
    1,018 KB · Views: 87
  • CLAA070MA21BW.pdf
    716.5 KB · Views: 64
Well shoot :( I assume an STM32 BluePill is also far too minimal? A friend gave me one of those.

I'm kinda low-income so I try to use what I have, before buying anything else. Although, I have this wild-eyed idea for something to do with a Teensy 4.1, if I could get someone to code for me. I'm best kept away from the editor, for the most part -- I can do enough to work GUISlice and make *this* thing work, probably, if I argue with it long enough... but what I'm thinking of for the Teensy 4.1... yeah that's in a league almost of its own. But then I'm a silly, silly person!

If all else fails... is there something that *could* do it, or that is fairly cheap that I could throw in between a given microcontroller (I've got the LC, the BluePill, one or two ESP8266 boards floating around... ESP-12Fs I think -- although I'd not need the WiFi and I'd *strongly* prefer on-die USB access! VUSB is not something I've any experience with -- and a good half-dozen Arduino Pro Micro eBay jobs...) and the SVGA LCD+Touch Panel? I could probably throw $20 at this without dying... not much more than that tho.
 
Just a thought... approaching this from a standpoint I'm more familiar with -- that of the retrocomputing era style of doing things...

The fact is, when using this, there's really exactly one of three things going on. (1) A new interface / set of keys / etc needs to be loaded, which refreshes the *entire freaking display*. (2) A keypress or setting-change (lock-light activation?) is detected, which requires an animation in part of the screen to be played... meaning *part of the screen* needs to be refreshed, possibly a few different times in sequence. (3) Absolutely nothing, in which case the existing output to the screen remains static.

So...

800 x 600 resolution, that's 480k pixels... 480kPx for short. RGB, each value is a byte. Parallel input, 8bits per color each R G B. So... one byte per color per pixel. Three 512k x8 SRAM chips could act as a framebuffer for the screen. Use a shift register sort of setup, something like a 74[x]595 but faster (?), to write to each one, then dump the buffer to LCD. The trickiest bit will be the timing -- the LCD panel expects a 40MHz nominal dot-clock (pixel data) rate... data is valid, per the LCD datasheeet, from when the clock cycle hits ~1vDC (30% of VCC; I'm rounding slightly) on its way to bottoming out, to when it *just* begins to lift off the peg again... which happens in a window of about 6.1nS, at the end of a frame of slightly shorter than 22.3nS (don't ask how I derived that from the datasheet, plz). That's... that's going to need to be faster than 40MHz. It's actually almost 45MHz... mind you, though, that doesn't include voltage-ramp allowances...

The Teensy LC runs at 48MHz. I'd have to buy the 512k SRAMs, sure -- but I can probably do that in April, if this is a functional concept. I should mention as well, I have an 8MB (yes, eight mega*bytes*) SPI ROM chip -- it's actually a Winbond W25Q64BVAIG, intended as a PC BIOS ROM! -- that could be used to store the image data, and in that case, I bet DMA could be used to basically just dump from ROM straight to framebuffer. At that point, all the Teensy would need to do would be to coordinate memory addresses and such for the currently-loaded interface, map keypress locations and match animations and touch 'hotspot' overlays so that when someone touches a spot over a given key, it activates that key until it's released... and each one of these things sound like good candidates for lookup tables ;) which make it all incredibly easy. Of course it also has to handle USB output and the actual touch panel inputs/etc itself, but /shrug that just basically means that it actually has things to do the vast majority oft the time.

Further, since I'm designing the interface/etc for myself, I can specifically design it so that the background/whole-screen-change thing almost never happens. The screen would have to blank during framebuffer writes (which is annoying) but whatcha gonnna do. Shouldn't take all that long with DMA and all that

Thoughts, everyone? Is this more feasible than just the "bare Teensy LC + LCD + touch panel" design? *Is* it feasible yet...?
 
Did you get either of those displays to work with the Raspberry Pi?


And just to expand on my earlier comment, that this really isn't feasible on Teensy LC, the approach you describe with a W25Q64 is unlikely to work. You'd need to access it using 1 bit SPI and as I recall, the max SPI clock Teensy LC can manage is 12 MHz (half the peripheral clock, which is half the CPU clock). Even if the DMA works out perfectly, you're looking at best 12 Mbit/sec transfer rate. But the DMA controller in Teensy LC is much less capable than in the higher Teensy models, so you'd likely run into some limitations there too. This sort of graphics update without a frame buffer on the display just isn't feasible with Teensy LC.
 
Sorry -- different display. Waveshare 7" LCD, the HDMI one that's got standard-ish netbook resolution (1024x600) and capacitive touch. IIRC it's their 7" HDMI(C) LCD offering -- and, yes, the genuine article and not a clone.

I also *had* a clone and the screen is cracked on it :( makes me a little sad that I let that happen.

Thx for the further clarity re Teensy LC.
 
Status
Not open for further replies.
Back
Top