RCA Module

Module 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:

RCAModule

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.png

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 module import RCAModule
 9
10
11label0 = None
12label1 = None
13module_rca = None
14
15
16def setup():
17    global label0, label1, module_rca
18
19    M5.begin()
20    Widgets.fillScreen(0x222222)
21    label0 = Widgets.Label("Core2", 133, 109, 1.0, 0xFFFFFF, 0x222222, Widgets.FONTS.DejaVu18)
22
23    module_rca = RCAModule(
24        26,
25        width=216,
26        height=144,
27        output_width=0,
28        output_height=0,
29        signal_type=RCAModule.NTSC,
30        use_psram=0,
31        output_level=0,
32    )
33    label1 = Widgets.Label(
34        "RCA", 88, 61, 1.0, 0xFFFFFF, 0x222222, Widgets.FONTS.DejaVu18, module_rca
35    )
36
37
38def loop():
39    global label0, label1, module_rca
40    M5.update()
41
42
43if __name__ == "__main__":
44    try:
45        setup()
46        while True:
47            loop()
48    except (Exception, KeyboardInterrupt) as e:
49        try:
50            from utility import print_error_msg
51
52            print_error_msg(e)
53        except ImportError:
54            print("please update to latest firmware")

Example output:

None

API

Class RCAModule

class module.rca.RCAModule(pin=26, width=216, height=144, output_width=216, output_height=144, signal_type=0, use_psram=0, output_level=0)

Bases: object

Initialize the RCA Module.

Parameters:
  • pin (int) – The dac pin to which the RCA Module is connected.

  • 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:

init.png

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)

RCAModule 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.