A standalone basic machine on PSoC (If I may insist) CY8CKIT-044

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

A couple of years ago I ported SPI TFT driver from mbed to PSoC Creator for my first demo.

2年前、最初のデモの為に mbed から TFT ドライバを移植しました。

Maze, my first demo binary

I have been thinking that connecting a full keyboard is not practical,

but with an I2C card keyboard, easily we can.

フルセットのキーボードを接続するのはあまり現実的ではないと考えていたのですが、

I2C接続のカード型キーボードが発売されていたので、容易に接続することが出来ました。

TSoC I2C Full Keyboard Sample (CardKb)

Then I made a dumb typewrite by connecting them together.

その二つを組み合わせて、簡単なタイプライタもどきが作れました。

Another dumb typewriter sample (CY8CKIT-044 version)

Meantime, I excavated an ancient treasure the Toyoshiki TinyBasic.

並行して古代の秘宝豊四季タイニーベーシックも出土することに成功しました。

Tiny Basic for PSoC (CY8CKIT-044 / TSoC / CY8CKIT-059 / CY8CKIT-062-BLE)

Mingling these together brought me a standalone basic machine (if I may insist so) 😉

全部合わせてかき混ぜるとスタンドアローンのベーシックマシンの出来上がりです。

(そう言い張って良いのであればですが)

OverView.JPG

Since this has a keyboard and a TFT display, the program should work without PC, but 5V external power.

キーボードと TFT ディスプレイが付いているので、PC に接続しなくても、5V電源だけ供給してあげれば動作します。

I entered a simple basic program. (Not an easy task with this keyboard...)

And list command showed the entered program. (Tab/space and letter cases are gone)

簡単なベーシックのプログラムを入力してみました。(このキーボードだと結構大変です。)

その後、リスト(list) を取ると、プログラムが表示されます。

(しかしスペースや大文字・小文字の区別はなくなっています。)

IMG_4178.JPG

When I entered "run", a prompt asking for the value of A shows up.

Entering 10 caused list of sum from 1 to 10.

And entering 0 caused the program to stop. The prompt of TinyBasic returns.

"run" と入力すると、変数 A  を要求するプロンプトが表示されます。

10 と入れると、1 から 10 までの和が順次表示されます。

0 と入力するとプログラムは終了してベーシックのプロンプトに戻ります。

IMG_4179.JPG

Note: Since I have not been able to implement display scroll, when the cursor moves from the bottom line,

it causes the all screen erased and start again from the top-left.

To have a little control over this, I just added "Pushing ESC key" causes screen clear and substitute input from ESC to CR.

So that the prompt will show up from the top-left.

注意:まだ画面スクロールの機能は実装できていませんので、カーソルが一番下の行にいて

更に下に移動しようとしたときに画面をクリアして、また左上からスタートするようにしました。

それだけですと、流石に使いにくかったので、ESC キーを押したときだけは、画面クリアをして改行が入力されたのと

同様の動きをするようにしてみました。

The project seems to be a little crowded now.

色々と組み合わせたので、プロジェクトもにぎやかになってきました。

000-Project-overivew.JPG

schematic

001-schematic.JPG

Pins

002-pins.JPG

This implementation is minimum set of TinyBasic, so it must be difficult to say "Usable."

But it was a fun trip 😉

これは TinyBasic の最少機能だけの実装となっていますので、実用性はあまりないと思います。

しかし楽しいプロジェクトでした。(^ ^)V

Keybaord:

M5Stack Official CardKB Mini Keyboard Unit MEGA328P GROVE I2C USB ISP Programmer for ESP32 Arduino D...

M5Stack用カード型キーボードユニット - スイッチサイエンス

TFT Display:

Adafruit 2.8" TFT Touch Shield.

https://www.adafruit.com/product/1651

But I hope that this will work with SPI driven ILI9341 TFTs...

この TFT.[ch] は他の SPI  接続の ILI9341 TFT も動くとは思います・・・

moto

1 Reply
Takashi_M
Moderator
Moderator
Moderator
1000 replies posted 500 solutions authored 750 replies posted

Dear Moto-san,

We appreciate your contribution for this.

Best regards.