03/02/2021 at 02:24 •
The idea is to have messages from 2 serial ports being displayed and scrolled up. I would call it semi-duplex, as ideally one side sends a command/line and the the other side. If both sides send characters at the same time, they get mixed with each other in the same line. Different colours for the 2 sides are used, so it is visible if that happens.
Arduino Mega with P42 Video4 VGA Shield
Standard serial port setup as SERIAL 115200 8N1
2nd serial port setup as SERIAL1 38400 8N1 (this is also a hardware serial port on the Mega on pins 18:TX 19:RX). The baudrate is set to 38400 to be operational with the Arduino SoftwareSerial library as well. For the 2nd serial port a TTl-UART adapter is required with connections to RX, TX and GND.
!!! The Arduino Serial Monitor is not suitable for this setup. A proper terminal software is required, I use two instances of TeraTerm, configured with the correct serial settings, local echo and transmit CR+LF.
The display shows the 2 different sources in light and dark colour.
The global variables ScreenX and ScreenY as well as the function printlineXY() are the heart of this demo.
ScreenX, ScreenY point to the coordinate of the screen where the next character will be printed. Function: byte printlineXY ( byte channel, char* Text, byte colour, bool ln )
byte channel: is the video channel used for display; can be one of CH0, CH1, CH2, CH3.
char* Text: pointer to a string, null terminated. To print a single character, the character + a NULL byte need to be content of the string. Maximum string length is the remainder of the current line + a full additional line as only one linebreak is currently implemented.
byte colour: a 8-bit colour value picked from the colour table in the user guide.
bool ln: of TRUE a CR+LF is performed to start a new line after the string got printed. byte return value: currently always 0.
At the bottom of the screen, if the last line is full or LF = TRUE, a line scrolling is implemented to make room for the next line of text. Implemented control codes:
0x08 : Backspace, the last character gets deleted to free the area for the next character to be printed, so technically it is a 'delete char'
0x0A : LF Linefeed, cursor go to next line, but same horizontal position 0x0D : CR Carriage return, cursor goes to the beginning of the current line
01/29/2021 at 00:57 •
Revision 2 of the board is running as planned. I replaced the trusted level shifter buffer 74LVC4245A with a TI TXS0108, which is automatically bi-directional. The bi-dir feature is not needed here, but a good exercise for future use. Attention has to be paid, as there is also a TXB010x family which works better with fully driven signals. The TXS0108 is on order for open drain signals, e.g. the MISO sinal on SPI slave devices.
Channel 0 is on the RCA connector, channels 1,2,3 are on the VGA connector, accessible with a VGA to 3x RCA cable.
03/22/2020 at 12:53 •
Soldering the BGA was amazingly easy. I use some low-temperature solder paste and a boatload of flux with my hot air pencil and everything aligned itself into place. How do I know that I have good contact? Measuring with a multimeter in diode mode, I see a diode drop of ~0.55V between every IO and Vcc. Now I have to solder all the other parts and start talking to the chip. Then comes the hard part, writing good driver software and config code...
The other parts went on just as easy... Well, mostly.
This looks like a nice schematic, all signals are there (sigh):
The board needed some wire surgery, but in the end it works and now I have 16Mbit of SPI Flash for character sets and images.