Difference: TerminalIO (9 vs. 10)

Revision 102020-05-22 - PeterSchmid

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
%DASHBOARD{ section="banner" image="/twiki/pub/Cosmac/ForthSTM32WB/nucleo-header.jpg"
Changed:
<
<
title="Terminal IO (Serial Communication)"
>
>
title="Terminal I/O (Serial Communication)"
  titlestyle="color:#F00000;" }%
Intro
Line: 11 to 11
  To work with a Forth system you need some kind of a console. A text terminal with RS-232 port has been used for this purpose in the past, today's PCs have software to emulate terminals but have no more any RS-232 interface. But there are usually USB interfaces instead. The USB-CDC appears as a traditional RS-232 port in your operating system (Linux /dev/ttyACMx, Windoze COMx). No need to bother with baud rates, handshaking, parity and other awkward things.

Changed:
<
<
>
>
There is also a wireless console for PCs and mobile devices. The proprietary STM BLE Cable Replacement Service is used as communication protocol.
 
Line: 52 to 52
 

Changed:
<
<
>
>
 

USB-CDC Serial Communication (API)

Buffered USB-CDC serial communication. The USB-CDC appears as a traditional RS-232 port in your operating system (Linux /dev/ttyACMx, Windoze COMx). No need to bother with baud rates, handshaking, parity and other awkward things.
Added:
>
>
USB_USER CN1 Micro USB connector on the MB1355 Nucleo Board. USB_USER CN3 USB A plug on the MB1293 dongle.
 
cdc-emit   ( c -- ) Emits one character to the USB-CDC interface. Blocking if the Buffer is full.
cdc-key    ( -- c ) Waits and gets one character from the USB-CDC interface. Blocking if the buffer is empty.

Line: 66 to 68
 

UART Serial Communication (API)

Added:
>
>
USB-CDC on the ST-LINK Micro USB connector on the MB1355 Nucleo Board. Serial port UART1 on PB6/PB7 (remove jumper SB2, close jumper SB6) on the MB1293 dongle.
 
serial-emit  ( c -- ) Emits one character to the UART interface. Blocking if the Buffer is full.
serial-key   ( -- c ) Waits and gets one character from the UART interface. Blocking if the buffer is empty.

Line: 80 to 83
 
Changed:
<
<
>
>
 

BLE Cable Replacement Serial Communication (API)

Added:
>
>
Classic Bluetooth has a Serial Port Profile (SPP). It emulates a serial cable to provide a simple substitute for existing RS-232, including the familiar control signals. But for BLE there is no official/standard service for serial communication. Many chip manufactures have their own proprietary service.

My own CRS Terminal is derived from Danila Loginov's Progressive Web App Web-Bluetooth-Terminal and is based on Web Bluetooth.

 https://spyr.ch/crs-terminal/
Added:
>
>
This Progressive Web App works in the Chrome browser on Linux, OSX, and Windows operating systems. It also works on Android devices, you can download the App and use it offline.
 

Changed:
<
<
crs-emit ( c -- ) Emits one character to the UART interface. Blocking if the Buffer is full. crs-key ( -- c ) Waits and gets one character from the UART interface. Blocking if the buffer is empty.
>
>
crs-emit ( c -- ) Emits one character to the BLE Cable Replacement Service. Blocking if the Buffer is full. crs-key ( -- c ) Waits and gets one character from the BLE Cable Replacement Service. Blocking if the buffer is empty.
 crs-emit? ( -- ? ) Ready to send a character. Buffer is not full. crs-key? ( -- ? ) Checks if a character is in the buffer.
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback