twiddling bits and atoms's blog

Posted Tue 01 April 2014

TV-OUT on Olimex's A10-LIME

I got my hands on Olimex's new A10-OLinuXino-LIME as a potential replacement for RaspberryPi which I fried by accident. One specific requirement I had was a composite TV output (PAL/NTSC). It is not mentioned anywhere in product briefs by Olimex, but this SBC does have an analog video output- both VGA and composite. I believe it also supports RGB with sync mode but don't quote me on that.

I purchased mine from a local distributor- Magic Smoke Refill Labs. I can highly recommend purchasing from them, as they are nice people to deal with. Their name is also quite an irony because I actually purchased my board to replace one which put out a bit of smoke.

Getting TV output to work was actually pretty straightforward:

  1. Connect TVOUT0 (GPIO_1 pin 20) and AGND (GPIO_1 pin 4) to display.
  2. Make a few simple changes to FEX file and compile it to binary configuration file:

    mkdir -p /mnt/mmc
    mount /dev/mmcblk0p1 /mnt/mmc
    /opt/sunxi-tools/bin2fex /mnt/mmc/script.bin > new.fex
    # ... edit the new.fex file ...
    /opt/sunxi-tools/fex2bin new.fex > /mnt/mmc/script.bin
    umount /mnt/mmc
    reboot
    
  3. Summary of the changes to new.fex is shown below. Full file is available here.

    --- prev.fex    2014-03-10 19:58:50.000000000 +0000
    +++ new.fex     2014-04-01 14:39:13.000000000 +0000
    @@ -321,20 +321,18 @@
    [disp_init]
    disp_init_enable = 1
    disp_mode = 0
    -screen0_output_type = 4
    -screen0_output_mode = 5
    -screen1_output_type = 1
    -screen1_output_mode = 4
    +screen0_output_type = 2
    +screen0_output_mode = 11
    +screen1_output_type = 2
    +screen1_output_mode = 11
    fb0_framebuffer_num = 2
    fb0_format = 10
    fb0_pixel_sequence = 0
    fb0_scaler_mode_enable = 1
    -fb0_width = 1366
    -fb0_height = 768
    fb1_framebuffer_num = 2
    fb1_format = 10
    fb1_pixel_sequence = 0
    -fb1_scaler_mode_enable = 0
    +fb1_scaler_mode_enable = 1
    lcd0_bright = 240
    lcd1_bright = 197
    lcd0_screen_bright = 50
    @@ -347,7 +345,7 @@
    lcd1_screen_hue = 50
    
    [lcd0_para]
    -lcd_used = 1
    +lcd_used = 0
    lcd_x = 1366
    lcd_y = 768
    lcd_dclk_freq = 70
    @@ -476,7 +474,7 @@
    
    [tv_out_dac_para]
    dac_used = 1
    -dac0_src = 4
    +dac0_src = 0
    dac1_src = 5
    dac2_src = 6
    dac3_src = 0
    
  4. Profit!

Screensaver running on display connected to TV-out of A10-LIME

Category: misc

Comments