树莓派使用HDMI-VGA转换器黑屏的方案
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了树莓派使用HDMI-VGA转换器黑屏的方案相关的知识,希望对你有一定的参考价值。
参考技术A 我的显示器只有VGA接口,所以要将树莓派连接到显示器上,必须使用HDMI装VGA转换器,但是在实际使用中,发现用HDMI转VGA方式连接显示器,显示器会出现黑屏的现象,无法使用,经过查找文档,终于知道了如何使用HDMI-VGA转换器将树莓派连接到显示器上,以下是教程。一、准备材料
树莓派一台,型号不限
树莓派安装 Raspbian 系统。
显示器一台
HDMI-VGA转换器一个
二、过程
首先将树莓派安装Raspbian 系统,安装方法可以查看科技爱好者博客的早期文章。在安装完成后,如果直接将显示器连接到树莓派上开机,则会出现黑屏的现象。
解决办法:
修改SD卡boot分区的config.txt文件
将SD卡插入到电脑中,首先备份config.txt文件,然后使用编辑器打开,这里不推荐记事本,可以使用 VIM 或者 notepad++ 打开。然后加入以下几个选项:
hdmi_force_hotplug=1
config_hdmi_boost=4
hdmi_group=2
hdmi_mode=35
hdmi_drive=2
hdmi_ignore_edid=0xa5000080
disable_overscan=1
这里我的显示器分辨率是1280*1024,所以修改为hdmi_mode=35,如果你的显示器分辨率不同,请查找需要修改的值。
hdmi_mode resolution frequency notes
1 640×350 85Hz
2 640×400 85Hz
3 720×400 85Hz
4 640×480 60Hz
5 640×480 72Hz
6 640×480 75Hz
7 640×480 85Hz
8 800×600 56Hz
9 800×600 60Hz
10 800×600 72Hz
11 800×600 75Hz
12 800×600 85Hz
13 800×600 120Hz
14 848×480 60Hz
15 1024×768 43Hz incompatible with the Raspberry Pi
16 1024×768 60Hz
17 1024×768 70Hz
18 1024×768 75Hz
19 1024×768 85Hz
20 1024×768 120Hz
21 1152×864 75Hz
22 1280×768 reduced blanking
23 1280×768 60Hz
24 1280×768 75Hz
25 1280×768 85Hz
26 1280×768 120Hz reduced blanking
27 1280×800 reduced blanking
28 1280×800 60Hz
29 1280×800 75Hz
30 1280×800 85Hz
31 1280×800 120Hz reduced blanking
32 1280×960 60Hz
33 1280×960 85Hz
34 1280×960 120Hz reduced blanking
35 1280×1024 60Hz
36 1280×1024 75Hz
37 1280×1024 85Hz
38 1280×1024 120Hz reduced blanking
39 1360×768 60Hz
40 1360×768 120Hz reduced blanking
41 1400×1050 reduced blanking
42 1400×1050 60Hz
43 1400×1050 75Hz
44 1400×1050 85Hz
45 1400×1050 120Hz reduced blanking
46 1440×900 reduced blanking
47 1440×900 60Hz
48 1440×900 75Hz
49 1440×900 85Hz
50 1440×900 120Hz reduced blanking
51 1600×1200 60Hz
52 1600×1200 65Hz
53 1600×1200 70Hz
54 1600×1200 75Hz
55 1600×1200 85Hz
56 1600×1200 120Hz reduced blanking
57 1680×1050 reduced blanking
58 1680×1050 60Hz
59 1680×1050 75Hz
60 1680×1050 85Hz
61 1680×1050 120Hz reduced blanking
62 1792×1344 60Hz
63 1792×1344 75Hz
64 1792×1344 120Hz reduced blanking
65 1856×1392 60Hz
66 1856×1392 75Hz
67 1856×1392 120Hz reduced blanking
68 1920×1200 reduced blanking
69 1920×1200 60Hz
70 1920×1200 75Hz
71 1920×1200 85Hz
72 1920×1200 120Hz reduced blanking
73 1920×1440 60Hz
74 1920×1440 75Hz
75 1920×1440 120Hz reduced blanking
76 2560×1600 reduced blanking
77 2560×1600 60Hz
78 2560×1600 75Hz
79 2560×1600 85Hz
80 2560×1600 120Hz reduced blanking
81 1366×768 60Hz
82 1920×1080 60Hz 1080p
83 1600×900 reduced blanking
84 2048×1152 reduced blanking
85 1280×720 60Hz 720p
86 1366×768 reduced blanking
树莓派连接显示器不亮屏的解决方案
树莓派一般可以自动检测目标设备的分辨率。但对于部分设备,分辨率可能会明显不对(过大或过小)。这时就需要给树莓派指定一个分辨率。请将SD卡插入电脑,需要修改树莓派的config.txt文件。(原来的config.txt可以备份一下。备份是个好习惯,以便错误以后及时还原)
hdmi_force_hotplug=1 config_hdmi_boost=4 hdmi_group=2 hdmi_mode=9 hdmi_drive=2 hdmi_ignore_edid=0xa5000080 disable_overscan=1
解释:
hdmi_force_hotplug:强制使用HDMI输出(强行认为HDMI口已经插入了设备)
config_hdmi_boost:HDMI信号增强。
hdmi_group、hdmi_mode:决定分辨率。group=2, mode=9 代表800×600 @ 60Hz。
(我是怎么知道我电视机的分辨率的呢,我插上HDMI线的时候,电视屏幕右上角显示的000x000,我就根据官方的那个对应表,设置了group和mode值)
hdmi_drive:强制音频输出到HDMI口(注意,仅适用于带音频的HDMI-VGA转换器!!如果想让音频从模拟输出,则去掉此项!!)
hdmi_ignore_edid:强行按hdmi_group和hdmi_mode规定的分辨率输出。不检测显示器自身的分辨率。
disable_overscan:强行禁止保留黑边功能。
这个文件会命令树莓派:强制使用800×600分辨率,60Hz刷新率,并强制从HDMI输出。请先尝试这样开机。如果开机能成功,就把hdmi_group和hdmi_mode,更改成自己显示器的分辨率即可。
如果不行,请更改hdmi_mode的值更换以下其他分辨率:
CEA分辨率
以下是CEA规定的电视规格分辨率。这些分辨率的hdmi_group=1
hdmi_mode=1 VGA hdmi_mode=2 480p 60Hz hdmi_mode=3 480p 60Hz H hdmi_mode=4 720p 60Hz hdmi_mode=5 1080i 60Hz hdmi_mode=6 480i 60Hz hdmi_mode=7 480i 60Hz H hdmi_mode=8 240p 60Hz hdmi_mode=9 240p 60Hz H hdmi_mode=10 480i 60Hz 4x hdmi_mode=11 480i 60Hz 4x H hdmi_mode=12 240p 60Hz 4x hdmi_mode=13 240p 60Hz 4x H hdmi_mode=14 480p 60Hz 2x hdmi_mode=15 480p 60Hz 2x H hdmi_mode=16 1080p 60Hz hdmi_mode=17 576p 50Hz hdmi_mode=18 576p 50Hz H hdmi_mode=19 720p 50Hz hdmi_mode=20 1080i 50Hz hdmi_mode=21 576i 50Hz hdmi_mode=22 576i 50Hz H hdmi_mode=23 288p 50Hz hdmi_mode=24 288p 50Hz H hdmi_mode=25 576i 50Hz 4x hdmi_mode=26 576i 50Hz 4x H hdmi_mode=27 288p 50Hz 4x hdmi_mode=28 288p 50Hz 4x H hdmi_mode=29 576p 50Hz 2x hdmi_mode=30 576p 50Hz 2x H hdmi_mode=31 1080p 50Hz hdmi_mode=32 1080p 24Hz hdmi_mode=33 1080p 25Hz hdmi_mode=34 1080p 30Hz hdmi_mode=35 480p 60Hz 4x hdmi_mode=36 480p 60Hz 4xH hdmi_mode=37 576p 50Hz 4x hdmi_mode=38 576p 50Hz 4x H hdmi_mode=39 1080i 50Hz reduced blanking hdmi_mode=40 1080i 100Hz hdmi_mode=41 720p 100Hz hdmi_mode=42 576p 100Hz hdmi_mode=43 576p 100Hz H hdmi_mode=44 576i 100Hz hdmi_mode=45 576i 100Hz H hdmi_mode=46 1080i 120Hz hdmi_mode=47 720p 120Hz hdmi_mode=48 480p 120Hz hdmi_mode=49 480p 120Hz H hdmi_mode=50 480i 120Hz hdmi_mode=51 480i 120Hz H hdmi_mode=52 576p 200Hz hdmi_mode=53 576p 200Hz H hdmi_mode=54 576i 200Hz hdmi_mode=55 576i 200Hz H hdmi_mode=56 480p 240Hz hdmi_mode=57 480p 240Hz H hdmi_mode=58 480i 240Hz hdmi_mode=59 480i 240Hz H H means 16:9 variant (of a normally 4:3 mode). 2x means pixel doubled (i.e. higher clock rate, with each pixel repeated twice) 4x means pixel quadrupled (i.e. higher clock rate, with each pixel repeated four times)
DMT分辨率
以下是计算机显示器使用的分辨率。这些分辨率的hdmi_group=2
hdmi_mode=1 640x350 85Hz hdmi_mode=2 640x400 85Hz hdmi_mode=3 720x400 85Hz hdmi_mode=4 640x480 60Hz hdmi_mode=5 640x480 72Hz hdmi_mode=6 640x480 75Hz hdmi_mode=7 640x480 85Hz hdmi_mode=8 800x600 56Hz hdmi_mode=9 800x600 60Hz hdmi_mode=10 800x600 72Hz hdmi_mode=11 800x600 75Hz hdmi_mode=12 800x600 85Hz hdmi_mode=13 800x600 120Hz hdmi_mode=14 848x480 60Hz hdmi_mode=15 1024x768 43Hz DO NOT USE hdmi_mode=16 1024x768 60Hz hdmi_mode=17 1024x768 70Hz hdmi_mode=18 1024x768 75Hz hdmi_mode=19 1024x768 85Hz hdmi_mode=20 1024x768 120Hz hdmi_mode=21 1152x864 75Hz hdmi_mode=22 1280x768 reduced blanking hdmi_mode=23 1280x768 60Hz hdmi_mode=24 1280x768 75Hz hdmi_mode=25 1280x768 85Hz hdmi_mode=26 1280x768 120Hz reduced blanking hdmi_mode=27 1280x800 reduced blanking hdmi_mode=28 1280x800 60Hz hdmi_mode=29 1280x800 75Hz hdmi_mode=30 1280x800 85Hz hdmi_mode=31 1280x800 120Hz reduced blanking hdmi_mode=32 1280x960 60Hz hdmi_mode=33 1280x960 85Hz hdmi_mode=34 1280x960 120Hz reduced blanking hdmi_mode=35 1280x1024 60Hz hdmi_mode=36 1280x1024 75Hz hdmi_mode=37 1280x1024 85Hz hdmi_mode=38 1280x1024 120Hz reduced blanking hdmi_mode=39 1360x768 60Hz hdmi_mode=40 1360x768 120Hz reduced blanking hdmi_mode=41 1400x1050 reduced blanking hdmi_mode=42 1400x1050 60Hz hdmi_mode=43 1400x1050 75Hz hdmi_mode=44 1400x1050 85Hz hdmi_mode=45 1400x1050 120Hz reduced blanking hdmi_mode=46 1440x900 reduced blanking hdmi_mode=47 1440x900 60Hz hdmi_mode=48 1440x900 75Hz hdmi_mode=49 1440x900 85Hz hdmi_mode=50 1440x900 120Hz reduced blanking hdmi_mode=51 1600x1200 60Hz hdmi_mode=52 1600x1200 65Hz hdmi_mode=53 1600x1200 70Hz hdmi_mode=54 1600x1200 75Hz hdmi_mode=55 1600x1200 85Hz hdmi_mode=56 1600x1200 120Hz reduced blanking hdmi_mode=57 1680x1050 reduced blanking hdmi_mode=58 1680x1050 60Hz hdmi_mode=59 1680x1050 75Hz hdmi_mode=60 1680x1050 85Hz hdmi_mode=61 1680x1050 120Hz reduced blanking hdmi_mode=62 1792x1344 60Hz hdmi_mode=63 1792x1344 75Hz hdmi_mode=64 1792x1344 120Hz reduced blanking hdmi_mode=65 1856x1392 60Hz hdmi_mode=66 1856x1392 75Hz hdmi_mode=67 1856x1392 120Hz reduced blanking hdmi_mode=68 1920x1200 reduced blanking hdmi_mode=69 1920x1200 60Hz hdmi_mode=70 1920x1200 75Hz hdmi_mode=71 1920x1200 85Hz hdmi_mode=72 1920x1200 120Hz reduced blanking hdmi_mode=73 1920x1440 60Hz hdmi_mode=74 1920x1440 75Hz hdmi_mode=75 1920x1440 120Hz reduced blanking hdmi_mode=76 2560x1600 reduced blanking hdmi_mode=77 2560x1600 60Hz hdmi_mode=78 2560x1600 75Hz hdmi_mode=79 2560x1600 85Hz hdmi_mode=80 2560x1600 120Hz reduced blanking hdmi_mode=81 1366x768 60Hz hdmi_mode=82 1080p 60Hz hdmi_mode=83 1600x900 reduced blanking hdmi_mode=84 2048x1152 reduced blanking hdmi_mode=85 720p 60Hz hdmi_mode=86 1366x768 reduced blanking
修改完以后保存config.txt文件,重启树莓派。
关注一下,更多精彩,不容错过!
??????
以上是关于树莓派使用HDMI-VGA转换器黑屏的方案的主要内容,如果未能解决你的问题,请参考以下文章