Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 20:29 26 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : hid2cdc - USB keyboard and mouse for picomite VGA

     Page 3 of 6    
Author Message
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2914
Posted: 03:10am 05 Jan 2024
Copy link to clipboard 
Print this post

Hi Robert, All,

This is looking REALLY good.

This is what I can discern,

F1-F12 keys return
<esc>{11~  (f1=11 thru to f12 24)

Both Shifts work as expected
Both Ctrls work as expected
F1-F4 work as the shortcuts to the onscreen editor as expected
Both Alts, Windows key, return nothing (not even <00>)
Prt scn, scrl lock, Pause/break, Delete, Num lock, return <00>
Both enters return <cr>
Insert returns <esc>{2~
Home returns <esc>{1~
PageUp returns <esc>{5~
PageDn returns <esc>{6~
End returns <esc>{4~

As expected, auto repeat doesn't yet work

It is now about 95% there, and is probably close to usable in its current state

`NoOne' has done a very good job on this.

Regards,

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 04:21am 05 Jan 2024
Copy link to clipboard 
Print this post

i would expect the ALT key to do nothing, and the same for the 'windows' key, PRTSCR and PAUSE/BREAK; these simply have no function on a VT100-style terminal.

does CAPS-LOCK work?
escape key?
ctrl-[, ctrl-], ctrl-\, ctrl-/, ctrl-~
(these should produce "<esc>", "<1D>", "<1C>", "<1F>", "<1E>" respectively,
ie, there should be some way to produce every control character from the keyboard)


it seems the main things we are missing now are:
DELETE key - it should produce the text "<7F>" (character 127).
CAPS-LOCK LED functioning.
possibly NUM-LOCK doing something, although that may be complicated!

i'm also going to suggest that we have some key combination that toggles a line that can be attached to the picomite's reset pin. on GFXterm this is alt-B, equally well it could be alt-break or even ctrl-alt-delete!

i'm also thinking it would be handy if output was also echoed out a serial port pin at either 38k4 or 115k2. does this sound useful?


cheers,
rob   :-)
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9307
Posted: 04:25am 05 Jan 2024
Copy link to clipboard 
Print this post

I can see the echo being useful for debugging purposes, so if it is easy to include....

Nice work, guys!    
Smoke makes things work. When the smoke gets out, it stops!
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2914
Posted: 04:30am 05 Jan 2024
Copy link to clipboard 
Print this post

Hi Rob, All,

Esc = <esc>
Ctrl [ = [ ie ctrl does no effect
Ctrl ] = ] ie ctrl does no effect
Ctrl / = / ie ctrl does no effect
Ctrl \ = \ ie ctrl does no effect
Caps lock = <00> does not function as a caps lock
Caps lock Led not illuminating
Delete = <00>
Num lock =<00> not functioning

Regards,

Mick

EDIT ***

Ctrl does work as Ctrl d = <04> but not working on the keys mentioned above

Mik
Edited 2024-01-05 14:31 by bigmik
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 12:13pm 05 Jan 2024
Copy link to clipboard 
Print this post

NoOne has posted a further update two hours ago:

  Quote  Typematic implemented, DEL is fixed,
capslock works (currently only as shiftlock),
numlock does nothing atm.
ctrl-space and [ and ] and \ [mapped] according to: https://vt100.net/docs/vt100-ug/chapter3.html#T3-5 [...]
Serial debug also implemented, sends 115200n8 at GPIO0.


as before, the firmware is here:
https://github.com/No0ne/hid2cdc/raw/main/hid2cdc.uf2

is num-lock important? are there any other keys that are missing? what do folks think of there being a key combination (such as ctrl-alt-delete) to toggle an output pin that can be used to reset the picomite?

has anyone been able to test with a non-US keyboard?

any other ideas? such as upon receiving crtl-G from the picomite pulse an output pin to control a bell? similarly mapping DC1/2/3/4 to output pins?


cheers,
rob   :-)
Edited 2024-01-05 23:26 by robert.rozee
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2129
Posted: 09:17pm 05 Jan 2024
Copy link to clipboard 
Print this post

How would I get this type of mini wifi dongle keyboard with hid2cdc.uf2 ,,, which I've not flashed yet, to work as usb keyboard and what is the mouse for?
https://www.amazon.co.uk/Rii-K01X1-Mini-Wireless-Keyboard/dp/B01G6XGLQQ/ref=asc_df_B01G6XGLQQ/
they don't make tiny ps2 kb's so usb but I lost the thread and don't want to break anything.
The point is 7" vga and mini keyboard, which I've had years for raspi.
Edited 2024-01-06 07:38 by stanleyella
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2914
Posted: 11:26pm 05 Jan 2024
Copy link to clipboard 
Print this post

Hi Stanleyella,

You just need a USB hub, see the small one I am using in the first few posts on page 1 of this thread. Rob clarifies the exact connection method a post or 2 after my image of the hub.

I haven’t yet tested wireless keyboards because I couldn’t find one (well with the matching dongle) but after seeing your small keyboard I remembered I have one like that in my old tool kit (in my kit since I retired over 5 years ago) the dongle would plug into the HUB and the PicoVGA also fed from the HUB and the HID2CDC plugs into the flying lead of the HUB (ie it more or less controls the HUB and devices).

It’s all rather simple and works well.

Regards,

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2914
Posted: 11:37pm 05 Jan 2024
Copy link to clipboard 
Print this post

Hi Rob, All,

Latest testing of HID2CDC

Caps lock works including Capslock LED
Key repeat works
Ctrl [ = <esc>  (is this right)
Ctrl ] = <1D>
Ctrl / = <1F>
Ctrl \ = <1C>
Ctrl ~ = <1E>
Ctrl space = <esc>
Delete = <7F>
Numlck no response

Re. Do we need numlock? I think yes we do as I like to use it when entering numbers.

Regards,

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 02:57am 06 Jan 2024
Copy link to clipboard 
Print this post

  stanleyella said  How would I get this type of mini wifi dongle keyboard with hid2cdc.uf2 ,,, which I've not flashed yet, to work as usb keyboard and what is the mouse for?
https://www.amazon.co.uk/Rii-K01X1-Mini-Wireless-Keyboard/dp/B01G6XGLQQ/ref=asc_df_B01G6XGLQQ/
they don't make tiny ps2 kb's so usb but I lost the thread and don't want to break anything.
The point is 7" vga and mini keyboard, which I've had years for raspi.



there should be no reason why a wireless keyboard-mouse combo would not work. basically, any combination that would work when plugged into a PC should work. the same goes for an LCD parallel or SPI panel being used instead of the VGA output. from the perspective of the HID2CDC the picomite is just a RS232 serial port that it can write to.


the mouse side of things isn't yet defined! normally a mouse, when used with a terminal emulator such as TeraTerm or GFXterm, would be associated with an on-screen mouse pointer. but with the picomite we have no such on-screen pointer yet.

it is (maybe) possible that we can repurpose a mouse reporting mode called "SET_ANY_EVENT_MOUSE" that has a VT mouse sending location information back whenever the mouse leaves a character cell. this would keep mouse traffic relatively low, and allow implementing a 'second cursor' on the picomite VGA that corresponded to the mouse location. but this would really require Peter's input.

OR, we could just invent our own mouse communications protocol. for instance, control code SO = turn on mouse reporting, DC1 = mouse north 1 cell, DC2 = mouse south one cell, DC3 = mouse east one cell, DC4 = mouse west one cell, SI = turn off mouse reporting.


Peter - is the keyboard side of things complete enough to start discussing how to get mouse control implemented? do folks even want to be able to use a mouse with the picomite?


cheers,
rob   :-)
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6790
Posted: 07:48am 06 Jan 2024
Copy link to clipboard 
Print this post

I'm still unsure about whether you could use a USB mouse in the usual manner on a PicoMite. Directly connected they produce an interrupt on every slightest vibration and a whole string of them when the mouse is moved. Even with a separate processor of some sort to handle it you are going to have to do some clever buffering and convert it to a serial stream like one of the old serial port mice. That's going to be a lot slower and would probably lead to a "jumpy" pointer. Just my thoughts.

It'll be interesting to see how this pans out.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2129
Posted: 06:10pm 06 Jan 2024
Copy link to clipboard 
Print this post

Thanks for clarifying. the pico is a usb to serial converter to another pico that doesn't see the first pico as a ps2 keyboard instead software to read serial codes.
... still thinking usb to serial ttl possibilities.
if I plug usb keyboard into usb to ttl serial and setup com port and baud and complicated,, never done it, what input would I get from the keyboard, if any?
bit off thread but relevant. stan
Edited 2024-01-07 06:33 by stanleyella
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2914
Posted: 11:35pm 06 Jan 2024
Copy link to clipboard 
Print this post

Hi Stanleyella, All,

I doubt you would get anything at all, (I could be proven wrong of course) the usb-TTL converter relies on a PC to ‘drive’ it , this is what the HID2CDC Pico is emulating. Just plugging a kb into a usb-TTL module wouldn’t work IMHO.

If you want serial (TTL) out from the keyboard the HID2CDC now exports out of a GPIO pin gp0 I think from memory.

Kind Regards,

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2914
Posted: 11:52pm 06 Jan 2024
Copy link to clipboard 
Print this post

Hi All,

@Rob,
Re. numlock, when I requested numlock it was really only for completeness, in fact the way it is at the moment the numbers are defaulted on the keypad, which is the way I would always want it to be.

Can you let ‘no0ne’ know that if it is too difficult to implement numlock leave it the way it is.

Regards,

Mick




.
Edited 2024-01-07 09:52 by bigmik
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 03:14am 08 Jan 2024
Copy link to clipboard 
Print this post

we have another update, as before the firmware is here:
https://github.com/No0ne/hid2cdc/raw/main/hid2cdc.uf2

pressing crtl-alt-delete now toggles GPIO3, which can be connected to the picomite's RESET pin to perform a reset.

the num-lock key (and other) LEDs now all work. num-lock functionality isn't there yet, but will be coming when keyboard language variants are implemented via 3 jumpers to select the language.

has anyone tested with a non-US keyboard?

Peter (or anyone else) - any input on how best to tackle mouse support? my input is that mouse wheel up/down rotation can be mapped onto the up and down arrow keys. this works well with GFXterm.

an option (that requires no modifications to the picomite VGA firmware) might be to make use of the alt key, so that while alt is held down mouse movements translate to the cursor keys. would this be a useful compromise?

another idea - what if a battery-backed RTC was attached to the USB2CDC? then a set of escape sequences could be used to set or retrieve the time from the RTC. this could free up a couple more pins on the picomite VGA.


wrt the keyboard, NoOne has written on github that the firmware is close to being at version 1.0, and i certainly agree with him. we now have picomite VGA keyboard input without need to use a PS/2 keyboard or sacrificing 2 I/O pins.


cheers,
rob   :-)
Edited 2024-01-08 13:15 by robert.rozee
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2914
Posted: 03:36am 08 Jan 2024
Copy link to clipboard 
Print this post

Hi Rob, All,

I can report that all 3 LEDS respond (CAPS, NUMLk & ScrollLk) toggle when pressed.

The Ctrl-Alt-Del also resets the PicoVGA when a wire is connected from PicoVGA pin 30 (Run/Rst) to GP3 of the HID2CDC

This is truly impressive.

Regards,

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 10:36am 09 Jan 2024
Copy link to clipboard 
Print this post

have just got a "PicoMite VGA Duo" set up and running (yes - i have officially named it) using an Fe1.1s USB 2.0 hub chip and a compact layout USB keyboard.

it works superbly!



however, the default font that the picomite uses for VGA output (including when editing) is absolutely horrendous! this is the 8x12 font that gives an 80 column by 40 line text screen. apart from the hideously mangled lower-case "m", the lack of descenders makes reading text entirely unpleasant. it looks like it has been designed for maximum characters on screen with zero regard for readability.

one alternative option:
https://int10h.org/oldschool-pc-fonts/fontlist/font?ibm_vga_8x16

this is an 8x16 font that would yield 80 columns by 30 lines. it was used in umpteen thousand cloned VGA graphics cards and is most certainly well and truly out of any copyright.

would anyone care to roll a picomite VGA .uf2 file with a different editor font?


cheers,
rob   :-)

Footnote added 2024-01-09 21:40 by robert.rozee
my setup:


Footnote added 2024-01-09 21:48 by robert.rozee
VGA components on daughterboard:
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6790
Posted: 11:27am 09 Jan 2024
Copy link to clipboard 
Print this post

Have you tested that font using TILES?
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 11:42am 09 Jan 2024
Copy link to clipboard 
Print this post

  Mixtel90 said  Have you tested that font using TILES?


TILES? please explain more.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9115
Posted: 11:47am 09 Jan 2024
Copy link to clipboard 
Print this post

  Quote  TILES? please explain more.


Manual
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 11:52am 09 Jan 2024
Copy link to clipboard 
Print this post

Automatic
Grasshopper
Octagonal
 
     Page 3 of 6    
Print this page
© JAQ Software 2024