CubieBoard中文论坛

 找回密码
 立即注册
搜索
热搜: unable
查看: 5946|回复: 4

CB1、CB2 VGA output

[复制链接]
发表于 2014-10-11 11:28:59 | 显示全部楼层 |阅读模式
本帖最后由  317443108 于 2014-10-11 11:28 编辑

    目前仍存在部分电脑只支持VGA接口等等的情况,那么在拿到CB1、CB2后,该怎么让他支持VGA输出呢?
跟大家分享一下我在别的地方看到的文章!(非原创,纯属转载分享)
   
If you bought some daughter board with VGA connector, you can go to the next step. If not, you can build your own circuit.
snapshot3.jpg
Do not use pins 33 and 35 on connector U15. It is HSYNC and VSYNC for LVDS, not VGA.
Because the HSYNC and VSYNC signals from cubieboard are 3.3V levels, they should be buffered by CMOS gates to 5V levels to reach the VGA specifications, but I found out, that every monitor I have tryed handled 3.3V signals without buffers, directly connected to VGA connector.
Each VGA analog signal (red, green and blue) should be loaded by nominal impedance of VGA. That means 75R resistors connected between color signal and ground. Without them the analog signa is very messy and picture on the monitor is quite ugly like on following photo.
That means, the minimal schematic diagram can look like this:
snapshot2.jpg
Much better schematic is on the next picture. The 5V can be found on conn. U15 – pin 1.
snapshot1.jpg
Sunxi-tools instalation
Install required packages
  1. apt-get install libusb-1.0-0-dev pkg-config
复制代码
download the sinxi-tools source and compile it
  1. git clone git://github.com/linux-sunxi/sunxi-tools/
  2. cd sunxi-tools
  3. make
复制代码
VGA output configuration
Backup the script.bin
  1. cp /boot/script.bin /boot/script.bin.bck
复制代码
Convert the script.bin into .fex file (text config file)
  1. ./bin2fex /boot/script.bin /boot/script.fex
复制代码
Open the script.fex with some text editor
  1. nano /boot/script.fex
复制代码
Find the block starting with „[disp_init]“ and edit the lines by following values:
  • disp_init_enable: 0 to disable;1 to enable
  • disp_mode: Display mode to use:

snapshot4.jpg
screen0_output_type: Output type for screen0:
snapshot5.jpg
  • screen1_output_type: Output type for screen1: same as previous
  • screen0_output_mode: Output mode for screen0:
    snapshot6.jpg

    • screen1_output_mode: Output mode for screen1: same as previous
    • fb0_framebuffer_num: fb0 buffer number, use 2 for double buffering
    • fb1_framebuffer_num: fb1 buffer number, use 2 for double buffering
    • fb0_format: pixel format for fb0:


snapshot7.jpg
  • fb1_format: pixel format for fb1: same as previous
  • fb0_pixel_sequence: fb0 pixel sequence (0 generally for linux, 2 for android):

snapshot8.jpg
  • fb1_pixel_sequence: fb1 pixel sequence (0 generally for linux, 2 for android): same as previous
  • fb0_scaler_mode_enable: 0 to disable; 1 to enable
  • fb0_scaler_mode_enable: 0 to disable; 1 to enable
so the part of .fex file can look like this:
  1. [disp_init]
  2. disp_init_enable = 1
  3. disp_mode = 0
  4. screen0_output_type = 4
  5. screen0_output_mode = 4
  6. screen1_output_type = 2
  7. screen1_output_mode = 14
  8. fb0_framebuffer_num = 2
  9. fb0_format = 10
  10. fb0_pixel_sequence = 0
  11. fb0_scaler_mode_enable = 1
  12. fb1_framebuffer_num = 2
  13. fb1_format = 10
  14. fb1_pixel_sequence = 0
  15. fb1_scaler_mode_enable = 1
复制代码
It is configured for vga output with resolution 1024x768 on screen0 with framebuffer tb0 double buffered. The screen1 is disabled by „disp_mode=0“ and screen1 parameters are ignored.
Convert the edited script.fex back into .bin file
  1. ./fex2bin /boot/script.fex /boot/script.bin
复制代码
Turn of the cubieboard
  1. shutdown –h now
复制代码
and then disconnect the powerplug for a few seconds and connect it back. Now you should see the booting cubian system on your VGA monitor.




回复

使用道具 举报

发表于 2014-10-11 19:10:24 | 显示全部楼层
转载要给出处
回复 支持 反对

使用道具 举报

发表于 2014-10-11 22:49:09 | 显示全部楼层
cubieplayer 发表于 2014-10-11 19:10
转载要给出处


回复 支持 反对

使用道具 举报

发表于 2014-10-13 09:21:17 | 显示全部楼层



{:soso_e179:}

回复 支持 反对

使用道具 举报

 楼主| 发表于 2014-10-13 10:38:33 | 显示全部楼层
cubieplayer 发表于 2014-10-11 19:10
转载要给出处

不好意思,忘记了。
貌似转的就是你的文章。哈哈
抱歉


贴上,转自    https://github.com/cubieplayer/Cubian/wiki/VGA-output
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|粤ICP备13051116号|cubie.cc---深刻的嵌入式技术讨论社区

GMT+8, 2024-11-23 12:53 , Processed in 0.027048 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2012 Comsenz Inc. | Style by Coxxs

返回顶部