RCA Unit
Unit RCA is a female jack terminal block for transmitting composite video (audio or video), one of the most common A/V connectors, which transmits video or audio signals from a component device to an output device (i.e., a display or speaker).
Support the following products:
UiFlow2 Example
Draw Text
Open the core2_rca_example.m5f2 project in UiFlow2.
This example displays the text “RCA” on the screen.
UiFlow2 Code Block:
Example output:
None
MicroPython Example
Draw Text
This example displays the text “RCA” on the screen.
MicroPython Code Block:
1# SPDX-FileCopyrightText: 2024 M5Stack Technology CO LTD 2# 3# SPDX-License-Identifier: MIT 4 5import os, sys, io 6import M5 7from M5 import * 8from unit import RCAUnit 9 10 11label0 = None 12label1 = None 13rca_0 = None 14 15 16def setup(): 17 global label0, label1, rca_0 18 19 M5.begin() 20 Widgets.fillScreen(0x222222) 21 label0 = Widgets.Label("Core2", 133, 109, 1.0, 0xFFFFFF, 0x222222, Widgets.FONTS.DejaVu18) 22 23 rca_0 = RCAUnit( 24 (36, 26), 25 216, 26 144, 27 output_width=0, 28 output_height=0, 29 signal_type=RCAUnit.NTSC, 30 use_psram=0, 31 output_level=0, 32 ) 33 label1 = Widgets.Label("RCA", 88, 61, 1.0, 0xFFFFFF, 0x222222, Widgets.FONTS.DejaVu18, rca_0) 34 35 36def loop(): 37 global label0, label1, rca_0 38 M5.update() 39 40 41if __name__ == "__main__": 42 try: 43 setup() 44 while True: 45 loop() 46 except (Exception, KeyboardInterrupt) as e: 47 try: 48 from utility import print_error_msg 49 50 print_error_msg(e) 51 except ImportError: 52 print("please update to latest firmware")
Example output:
None
API
Class RCAUnit
- class unit.rca.RCAUnit(port=(36, 26), width=216, height=144, output_width=0, output_height=0, signal_type=0, use_psram=0, output_level=0)
Bases:
objectInitialize the RCA Unit.
- Parameters:
port (tuple) – The port to which the RCA Unit is connected. port[0]: not used, port[1]: dac pin.
width (int) – The width of the RCA display.
height (int) – The height of the RCA display.
output_width (int) – The width of the output of the RCA display.
output_height (int) – The height of the output of the RCA display.
signal_type (int) – The signal type of the RCA display. NTSC=0, NTSC_J=1, PAL=2, PAL_M=3, PAL_N=4.
use_psram (int) – The use of psram of the RCA display.
output_level (int) – The output level of the RCA display.
UiFlow2 Code Block:

MicroPython Code Block:
from module import RCAModule module_rca = RCAModule(26, width=216, height=144, output_width=0, output_height=0, signal_type=RCAModule.NTSC, use_psram=0, output_level=0)
RCAUnit class inherits Display class, See hardware.Display for more details.
- NTSC = 0
signal type. National Television System Committee.
- NTSC_J = 1
signal type. National Television System Committee Japan.
- PAL = 2
signal type. Phase Alternating Line.
- PAL_M = 3
signal type. Phase Alternating Line M.
- PAL_N = 4
signal type. Phase Alternating Line N.

