Thursday, January 21, 2021

Dual Screen DSKY talks to host computer via Virtual Serial Port

This is a new project, a DSKY, the Display Keyboard interface for the Apollo Guidance Computer (AGC), using two 240x320 LCD screens and a keypad made with Kailh Cherry clone keys.

This DSKY uses an Arduino Mega 2560 to interface with the host computer via a USB Virtual Serial Port. The Arduino Mega uses two of its auxiliary serial ports to communicate with the Arduino Nano on each screen. The Arduino Mega is also responsible for scanning the DSKY keyboard and sending keypresses back to the host computer. 

Each indicator on the left and right screen is controlled by a command from the host computer. For example to illuminate the indicators below, the host computer sends to the Mega the following string "C F P  V00 N00 X 00000 Y 00000 Z  000  ". The Mega receives commands from the host computer and forwards them to both screens. The left screen reacts to single character commands A..O. Upper case commands illuminate an indicator, lower case commands turn them off. The right screen uses the Q command to illuminate the COMP ACTY indicator and the P, V, N, X, Y, Z commands to display numeric data which may include a leading positive or negative sign.  



This DSKY is being made to interface to a modified version of Moonjs, An Online Apollo Guidance Computer (AGC) Simulator (https://svtsim.com/moonjs/agc.html). The simulator has been modified to use the experimental Web Serial API available in the Google Chrome browser in order to both send screen data to the external DSKY as well as be controlled by keypresses from the external DSKY. 

The modified simulator accepts keypress commands from the external DSKY via Serial Port. The commands correspond to the first letter of each key legend. For example if KEY REL is pressed in the external DSKY, it sends K to the simulator. Thus, to calibrate the IMU as part of the launch checklist, the simulator receives V 3 7 E 0 1 E from the external DSKY. 

The modified simulator is available at https://gitlab.com/arduinoenigma/serialmoonjs


A PCB is being designed to hold both screens and the keypad. Each screen connects to an Arduino Uno compatible pin header and is controlled by an Arduino Nano located under it. The Arduino Nano has been rotated so the USB connector is accessible  Only the minimum number of signals needed to control the display using SPI have been routed from the Nano to the LCD screen pins. The RX pin on each Nano is connected to a separate auxiliary TX pin on the Mega. 


The minimum number of signals needed to control the SPI LCD screen was experimentally determined by using jumper wires. 


Here is an OSHPark (https://oshpark.com/profiles/ArduinoEnigma) rendering of the board design so far: