Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:41 29 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 : PicoMite: I have a dream

     Page 3 of 4    
Author Message
Calli
Regular Member

Joined: 20/10/2021
Location: Germany
Posts: 74
Posted: 04:51pm 27 Mar 2023
Copy link to clipboard 
Print this post

So, some time has passed.

We have now a console on a TFT.

How about a i2c keyboard for editing? Or did I miss that again?

Thats how my dream looks right now



The "case" is just the packaging of the small keyboard :)

Oh yes, it contains a RP2040... It also should (is maybe) be possible to have serial output... I mean...

Best,
Carsten
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6812
Posted: 05:27pm 27 Mar 2023
Copy link to clipboard 
Print this post

I suspect that using a i2c keyboard for editing won't be possible. Not without major changes to MMBasic anyway. You really need to convert the i2c to PS2 somehow.

That's a nice looking little keyboard. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 831
Posted: 06:36am 28 Mar 2023
Copy link to clipboard 
Print this post

Hi Calli,

I have something similar in mind. I think it is best to connect the keyboard as a matrix to a small controller and read the corresponding characters via the UART as a console.
Can you tell me where you bought the keyboard? Maybe the controller of your keyboard can be reprogrammed...

Frank
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3815
Posted: 08:06am 28 Mar 2023
Copy link to clipboard 
Print this post

Maybe add a second Pico to convert the I2C keyboard to (PS/2?).

Could be a better chip to do that...

John
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6812
Posted: 09:06am 28 Mar 2023
Copy link to clipboard 
Print this post

maybe not for that price, John. :)
If it was just a ROM it would be easy, but PS2 and I2C have different timing and data format. A pico might be ideal.
Mick

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

Joined: 20/10/2021
Location: Germany
Posts: 74
Posted: 12:08pm 28 Mar 2023
Copy link to clipboard 
Print this post

The keyboard: https://linktr.ee/bbq20kbd

It is open hardware but the developer also sells it. Check the GitHub etc.

And sure enough it has a rp2040 as CPU. And comes with the source.

There is even a serial port which is used for debug.

While the console way is certainly possible it would mean to do a vt100 emulation to use the internal editor. I am not sure how the VGA/PS2 Version does this.

Cheers,
Carsten
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4253
Posted: 04:06pm 28 Mar 2023
Copy link to clipboard 
Print this post

You can write an mmbasic sub that reads the i2c keyboard and outputs keys on the serial port.

Connect this to a second pico that has serial as console.

2 pico's, done...
Edited 2023-03-29 02:07 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6812
Posted: 04:16pm 28 Mar 2023
Copy link to clipboard 
Print this post

Two Picos is just a bit heavy on batteries, but doable.
Mick

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

Joined: 31/07/2019
Location: Australia
Posts: 483
Posted: 12:15am 29 Mar 2023
Copy link to clipboard 
Print this post

A dream is great as a hobby...
Personally I regard TBS as something of a null device, where non-Mite projects tend to get a little interest and are then politely left to wither on the vine. It is good entertainment though.
Edited 2023-03-29 10:15 by zeitfest
 
Quazee137

Guru

Joined: 07/08/2016
Location: United States
Posts: 573
Posted: 05:25am 29 Mar 2023
Copy link to clipboard 
Print this post

Calli have a look at this as a ref point.
 C64-pico


 Could be two pico's like other designs done here. Display/keyboard done with
 one pico and the second running MMBasic.

Im now looking at doing one with 4"Display / keyboard as a VT100 stand alone.
 
com I/O could be RS232/Tx,Rx/HC-12/any of the many WiFi modules. Could have all
and select current com from keyboard.

Many ideas passed on here to play with. Oh such FUN to be had.


Quazee137
Edited 2023-03-29 15:28 by Quazee137
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6812
Posted: 07:19am 29 Mar 2023
Copy link to clipboard 
Print this post

If the keyboard has a RP2040 and comes with the source code then you know the pins used and what for - and how to scan the keys. The I2C output routine needs to be modified to be a PS2 output routine and the scan code lookup table may need to be changed to suit the PA2 standard. I wonder if there's any chance of the designer making a PS2 version? It's lucky that we only want 3V3 PA2 - there's no level shifting.

I wonder if the keyboard could be re-programmed to run MMBasic to make things easier for us to do it? You'd need to check what pins have been used and what for.

I hope the LCD display is one that's compatible with a PicoMite. With the keyboard reprogrammed and connected as PS2 and a non-VGA PicoMite added and linked to the display all is well.
Mick

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

Joined: 20/10/2021
Location: Germany
Posts: 74
Posted: 06:58am 05 Apr 2023
Copy link to clipboard 
Print this post

  Mixtel90 said  If the keyboard has a RP2040 and comes with the source code then you know the pins used and what for - and how to scan the keys. The I2C output routine needs to be modified to be a PS2 output routine and the scan code lookup table may need to be changed to suit the PA2 standard. I wonder if there's any chance of the designer making a PS2 version? It's lucky that we only want 3V3 PA2 - there's no level shifting.

I wonder if the keyboard could be re-programmed to run MMBasic to make things easier for us to do it? You'd need to check what pins have been used and what for.

I hope the LCD display is one that's compatible with a PicoMite. With the keyboard reprogrammed and connected as PS2 and a non-VGA PicoMite added and linked to the display all is well.


It comes with source.

I guess it could run MMBasic, but there are few GPIOs avaible ob the PCB.

The Display is a Pico ResTouch from Waveshare.

Still many things to think over and try but where is the fun in not trying? :)

Carsten
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9139
Posted: 07:03am 05 Apr 2023
Copy link to clipboard 
Print this post

Have you seen that I have included full support for that keyboard in the firmware?
See here
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 831
Posted: 07:28am 05 Apr 2023
Copy link to clipboard 
Print this post

@Peter:

Do you have documentation on the I2C commands (and addresses) you implemented? It might be useful to build your own I2C keyboard...

THANKS!

Frank
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9139
Posted: 07:31am 05 Apr 2023
Copy link to clipboard 
Print this post

As per the docs for the keyboard https://github.com/solderparty/i2c_puppet
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 831
Posted: 07:31am 06 Apr 2023
Copy link to clipboard 
Print this post

Thanks for the link!
...I'll have to get some help to extract the information I need...

Frank
 
Calli
Regular Member

Joined: 20/10/2021
Location: Germany
Posts: 74
Posted: 12:18pm 11 Apr 2023
Copy link to clipboard 
Print this post

  matherp said  Have you seen that I have included full support for that keyboard in the firmware?
See here


You are awesome!
 
jaybek
Newbie

Joined: 25/05/2020
Location: Greenland
Posts: 18
Posted: 03:37pm 18 Apr 2023
Copy link to clipboard 
Print this post

@ calli - I too have a vision, quite related to yours, but maybe a bit more boiled down and more for beginners/teaching purposses.

I'ts a combo of 4 elements, - a smartphone/tablet, usb-cable, picomite and a breadboard.

Additionaly a matchbox with some jumperwires, resistors, leds and switches and maybe a potmeter and a servo.

You can actually teach a lot of programing with only a few components.

Picture you are having the above items in your pockets boardering a 14 hr long boring flight, sitting next to your 13 yo nephew/niece, who will be forced to listen to their uncle, you may be able to make a few hours a bit more interesting for them, and you may be able to ignite a sparkle of interest, and maybe someone someday will bring this cheap combo with them to school and play around with it during breaks, and maybe some surrounding students will catch an interest and they will get their own "Tamagotchi" too, and maybe ....
We will never know what starts a trend, will we?
(Now remember - this is just a vision)

Or is it?
I mean, all the ingridiens are there, are they not?
The most expensive part of the combo is the phone, but the majority of kids allready have that glued in their hand all day.
Cable, pico, breadboard and a little startbox, - that could make a cheap birthday pressent. And then there is....
Oh yeah, - the missing ingridient...
The Terminal app
                               


Way more than a year ago, i started seaching for a terminal app that:

● Connects via Usb
● Surports the VT100 protocol

There is a lot of terminals out there for phones, but they connect via either bluetooth or wifi,- i only found 1 that connected via Usb written by a german named Kai Morich, but that does not surport the VT100 protocol.
So i wrote to him, asking him if he had any plans on implimenting the protocol.
He answered back that he had considered it during the planing of the app, but had dropped the idea, and he did not have any updates on his agenta.

So, - dead end!

Since i have, when ever it has crosed my mind, made a search for a 'usb vt100 terminal emulator' on google playstore.
Yesterday a new app showed up, written by Lior Hass, and in its description it states that:



UsbTerminal is a terminal emulator (sometimes called "monitor"). It is intended to be used with a physical connection to the device
via the phone or tablet’s USB port.
The phone or tablet must support USB-Host Mode a.k.a USB On-The-Go (USB-OTG),
and a USB-OTG cable is required.
Typical use-cases for this app are:
● Controlling an IoT device like an Arduino, ESP32, etc
● Controlling a communication device such as a router that has a serial console connector (this may require a USB to RS232 converter cable)

UsbTerminal is open-source. See https://github.com/liorhass/UsbTerminal

Features:
● Support devices with the following USB to Serial protocols/chips: CDC-ACM (e.g. Arduino Uno R3), FTDI (FT232R, FT232H, FT2232H, FT4232H,
   FT230X, FT231X, FT234XD), Prolific PL2303, CH34x, Silabs CP210x (e.g. ESP32 dev boards from Espressif)


● Support two keyboard input modes:
 1. Auto - Like on a “real” terminal, there is no dedicated input field. Characters are sent to the serial device immediately as keys are clicked on the keyboard. This is the default mode.
 2. Dedicated input field - Keyboard input goes to a dedicated input field and is sent to the device only after a “Send” button is pressed.
● Partial support of ANSI/VT100 escape sequences including text coloring
● Two display modes: Text and Hex


● Background communication - the app can maintain connection and
 continue receiving data even when it is in the background
● Log sessions to files. These log files can then be viewed or shared in
 order to be analyzed with external tools
● Sending control character (e.g. Ctrl-C)
● Controlling of DTR and CTS
● Large scroll-back buffer
● Blinking cursor
● Status line indicating connection state, error messages, screen size,
 cursor location and display mode
● Built-in help
● Built-in shortcuts to reset an Arduino and ESP32 dev boards
● No root required
● No special permissions required

A note to Arduino users:
One advantage of UsbTerminal is the way it handles DTR. Typically when an Arduino board is connected to a PC, it will reboot every time a terminal emulator application is connected to it. This is because the PC drops the DTR signal low whenever a connection is formed, and Arduino is designed to reset when DTR line is dropped low. UsbTerminal on the other hand, doesn’t automatically set or reset the DTR signal. When you connect a phone or tablet to an Arduino and open UsbTerminal, your Arduino continues whatever it was doing at the time. If you want it to reboot, you can easily control the DTR signal from UsbTerminal with a dedicated button.


Now me, allways being hunted down by Murphys Low, - i'm not in a location nor possion to try out this Usb Terminal right now, so can anyone please answer me this:
● Will this app bring up an MMBasic editor on my phone?
● If so, how does it react to a bootsel hookup?

Now, i know it't only a vision, but....

Jens
#MeTo ZX81
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6812
Posted: 03:47pm 18 Apr 2023
Copy link to clipboard 
Print this post

Would a HC-05 help? It links bluetooth to serial TTL, so links a PicoMite to a bluetooth termianal.
Mick

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

Joined: 18/11/2011
Location: United Kingdom
Posts: 3815
Posted: 04:20pm 18 Apr 2023
Copy link to clipboard 
Print this post

Just tried UsbTerminal with an OTG cable & CH340 with TxD / RxD cross-connected (loopback).

Worked but looks to do local echo i.e. everything you type it prints and sends so you see things twice. I couldn't find a setting to turn the echo off.

Plausibly will work with a Picomite etc.

I see there are other similar apps... could be worth trying. I like this one being open source.

John
Edited 2023-04-19 02:22 by JohnS
 
     Page 3 of 4    
Print this page
© JAQ Software 2024