์ด ๋น๋์ค๋ GPIO ์ปค๋ฅํฐ๋ฅผ ํตํด FPGA Mars Rover3rpi(Cyclone IV) ๋ณด๋๊ฐ ์ฐ๊ฒฐ๋๊ณ HDMI ๋ชจ๋ํฐ๊ฐ ์ฐ๊ฒฐ๋ Raspberry Pi2 ๋ณด๋๋ฅผ ๋ณด์ฌ์ค๋๋ค. ๋ ๋ฒ์งธ ๋ชจ๋ํฐ๋ ํ์ค Raspberry Pi3 HDMI ์ปค๋ฅํฐ๋ฅผ ํตํด ์ฐ๊ฒฐ๋ฉ๋๋ค. ๋ชจ๋ ํจ๊ป ๋์ผ ๋ชจ๋ํฐ ์์คํ ์ฒ๋ผ ์๋ํฉ๋๋ค.
๋ค์์ผ๋ก ๊ตฌํ ๋ฐฉ๋ฒ์ ์๋ ค ๋๋ฆฌ๊ฒ ์ต๋๋ค.
๋๋ฆฌ ์ฌ์ฉ๋๋ Raspberry Pi3 ๋ณด๋์๋ ์ผ์, LED, ์คํ ํผ ๋ชจํฐ ๋๋ผ์ด๋ฒ ๋ฑ ๋ค์ํ ํ์ฅ ๋ณด๋๋ฅผ ์ฐ๊ฒฐํ ์ ์๋ GPIO ์ปค๋ฅํฐ๊ฐ ์์ต๋๋ค. ์ปค๋ฅํฐ์ ์๋ ๊ฐ ํ์ ํน์ ๊ธฐ๋ฅ์ ํฌํธ ๊ตฌ์ฑ์ ๋ฐ๋ผ ๋ค๋ฆ ๋๋ค. GPIO ALT2 ๊ตฌ์ฑ์ ์ฌ์ฉํ๋ฉด ์ปค๋ฅํฐ๋ฅผ DPI ์ธํฐํ์ด์ค ๋ชจ๋์ธ ๋์คํ๋ ์ด ๋ณ๋ ฌ ์ธํฐํ์ด์ค๋ก ์ ํํ ์ ์์ต๋๋ค. DPI๋ฅผ ํตํด VGA ๋ชจ๋ํฐ๋ฅผ ์ฐ๊ฒฐํ๊ธฐ ์ํ ํ์ฅ ๋ณด๋๊ฐ ์์ต๋๋ค. ๊ทธ๋ฌ๋ ์ฒซ์งธ, VGA ๋ชจ๋ํฐ๋ ๋ ์ด์ HDMI๋งํผ ์ผ๋ฐ์ ์ด์ง ์์ผ๋ฉฐ ๋์งธ, ๋์งํธ ์ธํฐํ์ด์ค๊ฐ ์๋ ๋ก๊ทธ๋ณด๋ค ์ข์์ง๊ณ ์์ต๋๋ค. ๋ํ ์ด๋ฌํ VGA ํ์ฅ ์นด๋์ DAC๋ ์ผ๋ฐ์ ์ผ๋ก R-2-R ์ฒด์ธ ํํ๋ก ๋ง๋ค์ด์ง๋ฉฐ ์ข ์ข ์์๋น 6๋นํธ๋ฅผ ๋์ง ์์ต๋๋ค.
ALT2 ๋ชจ๋์์ GPIO ์ปค๋ฅํฐ์ ํ์ ๋ค์๊ณผ ๊ฐ์ ์๋ฏธ๋ฅผ ๊ฐ์ต๋๋ค.
์ฌ๊ธฐ์์๋ ์ปค๋ฅํฐ์ RGB ํ์ ๊ฐ๊ฐ ๋นจ๊ฐ์, ๋
น์ ๋ฐ ํ๋์์ผ๋ก ์ฑ์ํ์ต๋๋ค. ๋ค๋ฅธ ์ค์ํ ์ ํธ๋ V-SYNC ๋ฐ H-SYNC ์ค์ ๋๊ธฐ ์ ํธ์ CLK์
๋๋ค. CLK ํด๋ก ์ฃผํ์๋ ํฝ์
๊ฐ์ด ์ปค๋ฅํฐ๋ก ์ถ๋ ฅ๋๋ ์ฃผํ์์ด๋ฉฐ ์ ํํ ๋น๋์ค ๋ชจ๋์ ๋ฐ๋ผ ๋ค๋ฆ
๋๋ค.
๋์งํธ HDMI ๋ชจ๋ํฐ๋ฅผ ์ฐ๊ฒฐํ๋ ค๋ฉด DPI ์ธํฐํ์ด์ค ์ ํธ๋ฅผ ์บก์ฒํ์ฌ HDMI ์ ํธ๋ก ๋ณํํด์ผ ํฉ๋๋ค. ์๋ฅผ ๋ค์ด FPGA ๋ณด๋๋ฅผ ์ฌ์ฉํ์ฌ ์ด ์์ ์ ์ํํ ์ ์์ต๋๋ค. ๊ฒฐ๊ณผ์ ์ผ๋ก Mars Rover2rpi ๋ณด๋๊ฐ ์ด๋ฌํ ๋ชฉ์ ์ ์ ํฉํฉ๋๋ค. ์ค์ ๋ก ํน์ ์ด๋ํฐ๋ฅผ ํตํด ์ด ๋ณด๋๋ฅผ ์ฐ๊ฒฐํ๋ ์ฃผ์ ์ต์ ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
์ด ๋ณด๋๋ GPIO ํฌํธ ์๋ฅผ ๋๋ฆฌ๊ณ ๋ผ์ฆ๋ฒ ๋ฆฌ์ ๋ ๋ง์ ์ฃผ๋ณ ์ฅ์น๋ฅผ ์ฐ๊ฒฐํ๋ ๋ฐ ์ฌ์ฉ๋ฉ๋๋ค. ๋์์ ์ด ์ฐ๊ฒฐ์ด ์๋ 4๊ฐ์ GPIO ์ ํธ๊ฐ JTAG ์ ํธ์ ์ฌ์ฉ๋๋ฏ๋ก ๋ฐฐํฌํ์ ํ๋ก๊ทธ๋จ์ด FPGA ํ์จ์ด๋ฅผ FPGA์ ๋ก๋ํ ์ ์์ต๋๋ค. ์ด ๋๋ฌธ์ ์ด๋ฌํ ์ผ๋ฐ ์ฐ๊ฒฐ์ด ๋์๊ฒ ์ ํฉํ์ง ์๊ณ 4 DPI ์ ํธ๊ฐ ๋จ์ด์ง๋๋ค. ์ด ์ข๊ฒ๋ ๋ณด๋์ ์ถ๊ฐ ๋น์๋ Raspberry ํธํ ํ์์์ด ์์ต๋๋ค. ๋ณด๋๋ฅผ 90๋ ํ์ ํ๊ณ ์ฌ์ ํ ๋ด ๋ผ์ฆ๋ฒ ๋ฆฌ์ ์ฐ๊ฒฐํ ์ ์๋๋ก:
๋ฌผ๋ก ์ธ๋ถ JTAG ํ๋ก๊ทธ๋๋จธ๋ฅผ ์ด์ฉํด์ผ ํ๊ฒ ์ง๋ง ์ด๊ฒ์ ๋ฌธ์ ๊ฐ ๋์ง ์๋๋ค.
์ฌ์ ํ ์์ ๋ฌธ์ ๊ฐ ์์ต๋๋ค. ๋ชจ๋ FPGA ํ์ ํด๋ก ์ ๋ ฅ์ผ๋ก ์ฌ์ฉํ ์ ์๋ ๊ฒ์ ์๋๋๋ค. ์ด ์ฉ๋๋ก ์ฌ์ฉํ ์ ์๋ ์ ์ฉ ํ์ ๋ช ๊ฐ๋ฟ์ ๋๋ค. ๊ทธ๋์ ์ฌ๊ธฐ์์ GPIO_0 CLK ์ ํธ๊ฐ FPGA ํด๋ญ ์ ๋ ฅ์ผ๋ก ์ฌ์ฉํ ์ ์๋ FPGA ์ ๋ ฅ์ ๋๋ฌํ์ง ์๋๋ค๋ ๊ฒ์ด ๋ฐํ์ก์ต๋๋ค. ๊ทธ๋์ ๋๊ฐ์ด ์ค์นดํ์ ํ๋์ ๊ฒ์๋ฌผ์ ๋์ ธ์ผํ์ต๋๋ค. ๋ณด๋์ GPIO_0๊ณผ KEY[1] ์ ํธ๋ฅผ ์ฐ๊ฒฐํฉ๋๋ค.
์ด์ FPGA์ ํ๋ก์ ํธ์ ๋ํด ์กฐ๊ธ ๋ง์๋๋ฆฌ๊ฒ ์ต๋๋ค. HDMI ์ ํธ ํ์ฑ์ ์ฃผ์ ์ด๋ ค์์ ๋งค์ฐ ๋์ ์ฃผํ์์
๋๋ค. HDMI ์ปค๋ฅํฐ์ ํ์์์ ๋ณด๋ฉด RGB ์ ํธ๊ฐ ์ด์ ์ง๋ ฌ ์ฐจ๋ ์ ํธ์์ โโ์ ์ ์์ต๋๋ค.
์ฐจ๋ ์ ํธ๋ฅผ ์ฌ์ฉํ๋ฉด ์ ์ก ๋ผ์ธ์ ๊ณตํต ๋ชจ๋ ๋
ธ์ด์ฆ๋ฅผ ์ฒ๋ฆฌํ ์ ์์ต๋๋ค. ์ด ๊ฒฝ์ฐ ๊ฐ ์์ ์ ํธ์ ์๋ 10๋นํธ ์ฝ๋๋ 10๋นํธ TMDS(Transition-minimized Differential Signaling)๋ก ๋ณํ๋ฉ๋๋ค. ์ด๊ฒ์ ์ ํธ์์ DC ์ฑ๋ถ์ ์ ๊ฑฐํ๊ณ ์ฐจ๋ ๋ผ์ธ์์ ์ ํธ ์ ํ์ ์ต์ํํ๊ธฐ ์ํ ํน์ ์ธ์ฝ๋ฉ ๋ฐฉ๋ฒ์
๋๋ค. ์ด์ ์ง๋ ฌ ํ์ ์ ํตํด ์์ ๋ฐ์ดํธ๋น 10๋นํธ๋ฅผ ์ ์กํ ์ ์์ผ๋ฏ๋ก ์ง๋ ฌ ๋ณํ๊ธฐ์ ํด๋ก ์ฃผํ์๋ ํฝ์
์ ํด๋ก ์ฃผํ์๋ณด๋ค 1280๋ฐฐ ๋์์ผ ํฉ๋๋ค. ์๋ฅผ ๋ค์ด ๋น๋์ค ๋ชจ๋๊ฐ 720x60 74,25Hz์ธ ๊ฒฝ์ฐ ์ด ๋ชจ๋์ ํฝ์
์ฃผํ์๋ 742,5MHz์
๋๋ค. ์ง๋ ฌ ๋ณํ๊ธฐ๋ XNUMXMHz์ฌ์ผ ํฉ๋๋ค.
๋ถํํ๊ฒ๋ ๊ธฐ์กด์ FPGA๋ ์ผ๋ฐ์ ์ผ๋ก ์ด๋ฅผ ์ํํ ์ ์์ต๋๋ค. ๊ทธ๋ฌ๋ ๋คํ์ค๋ฝ๊ฒ๋ FPGA์๋ DDIO ํ์ด ๋ด์ฅ๋์ด ์์ต๋๋ค. ์ด๊ฒ์ ์ด๋ฏธ 2-to-1 serializer์ธ ๊ฒฐ๋ก ์ ๋๋ค. ์ฆ, ์์น ๋ฐ ํ๊ฐ ํด๋ญ ์ฃผํ์๋ฅผ ๋ฐ๋ผ 740๋นํธ๋ฅผ ์์ฐจ์ ์ผ๋ก ์ถ๋ ฅํ ์ ์์ต๋๋ค. ์ด๊ฒ์ FPGA ํ๋ก์ ํธ์์ 370MHz๊ฐ ์๋ 370MHz๋ฅผ ์ฌ์ฉํ ์ ์์ง๋ง FPGA์์ DDIO ์ถ๋ ฅ ์์๋ฅผ ์ฌ์ฉํด์ผ ํจ์ ์๋ฏธํฉ๋๋ค. ์ฌ๊ธฐ์ 1280MHz๋ ์ด๋ฏธ ๋ฌ์ฑ ๊ฐ๋ฅํ ์ฃผํ์์ ๋๋ค. ์ํ๊น๊ฒ๋ 720ร2 ๋ชจ๋๊ฐ ํ๊ณ์ ๋๋ค. RoverXNUMXrpi ๋ณด๋์ ์ค์น๋ FPGA Cyclone IV์์๋ ๋ ๋์ ํด์๋๋ฅผ ์ป์ ์ ์์ต๋๋ค.
๋ฐ๋ผ์ ํ๋ก์ ํธ์์ ์ ๋ ฅ ํฝ์ ์ฃผํ์ CLK๋ PLL์ ๊ณต๊ธ๋๋ฉฐ ์ฌ๊ธฐ์ 5๊ฐ ๊ณฑํด์ง๋๋ค. ์ด ์ฃผํ์์์ R, G, B ๋ฐ์ดํธ๋ ๋นํธ ์์ผ๋ก ๋ณํ๋ฉ๋๋ค. ์ด๊ฒ์ด TMDS ์ธ์ฝ๋๊ฐ ํ๋ ์ผ์ ๋๋ค. Verilog HDL์ ์์ค ์ฝ๋๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
module hdmi(
input wire pixclk, // 74MHz
input wire clk_TMDS2, // 370MHz
input wire hsync,
input wire vsync,
input wire active,
input wire [7:0]red,
input wire [7:0]green,
input wire [7:0]blue,
output wire TMDS_bh,
output wire TMDS_bl,
output wire TMDS_gh,
output wire TMDS_gl,
output wire TMDS_rh,
output wire TMDS_rl
);
wire [9:0] TMDS_red, TMDS_green, TMDS_blue;
TMDS_encoder encode_R(.clk(pixclk), .VD(red ), .CD({vsync,hsync}), .VDE(active), .TMDS(TMDS_red));
TMDS_encoder encode_G(.clk(pixclk), .VD(green), .CD({vsync,hsync}), .VDE(active), .TMDS(TMDS_green));
TMDS_encoder encode_B(.clk(pixclk), .VD(blue ), .CD({vsync,hsync}), .VDE(active), .TMDS(TMDS_blue));
reg [2:0] TMDS_mod5=0; // modulus 5 counter
reg [4:0] TMDS_shift_bh=0, TMDS_shift_bl=0;
reg [4:0] TMDS_shift_gh=0, TMDS_shift_gl=0;
reg [4:0] TMDS_shift_rh=0, TMDS_shift_rl=0;
wire [4:0] TMDS_blue_l = {TMDS_blue[9],TMDS_blue[7],TMDS_blue[5],TMDS_blue[3],TMDS_blue[1]};
wire [4:0] TMDS_blue_h = {TMDS_blue[8],TMDS_blue[6],TMDS_blue[4],TMDS_blue[2],TMDS_blue[0]};
wire [4:0] TMDS_green_l = {TMDS_green[9],TMDS_green[7],TMDS_green[5],TMDS_green[3],TMDS_green[1]};
wire [4:0] TMDS_green_h = {TMDS_green[8],TMDS_green[6],TMDS_green[4],TMDS_green[2],TMDS_green[0]};
wire [4:0] TMDS_red_l = {TMDS_red[9],TMDS_red[7],TMDS_red[5],TMDS_red[3],TMDS_red[1]};
wire [4:0] TMDS_red_h = {TMDS_red[8],TMDS_red[6],TMDS_red[4],TMDS_red[2],TMDS_red[0]};
always @(posedge clk_TMDS2)
begin
TMDS_shift_bh <= TMDS_mod5[2] ? TMDS_blue_h : TMDS_shift_bh [4:1];
TMDS_shift_bl <= TMDS_mod5[2] ? TMDS_blue_l : TMDS_shift_bl [4:1];
TMDS_shift_gh <= TMDS_mod5[2] ? TMDS_green_h : TMDS_shift_gh [4:1];
TMDS_shift_gl <= TMDS_mod5[2] ? TMDS_green_l : TMDS_shift_gl [4:1];
TMDS_shift_rh <= TMDS_mod5[2] ? TMDS_red_h : TMDS_shift_rh [4:1];
TMDS_shift_rl <= TMDS_mod5[2] ? TMDS_red_l : TMDS_shift_rl [4:1];
TMDS_mod5 <= (TMDS_mod5[2]) ? 3'd0 : TMDS_mod5+3'd1;
end
assign TMDS_bh = TMDS_shift_bh[0];
assign TMDS_bl = TMDS_shift_bl[0];
assign TMDS_gh = TMDS_shift_gh[0];
assign TMDS_gl = TMDS_shift_gl[0];
assign TMDS_rh = TMDS_shift_rh[0];
assign TMDS_rl = TMDS_shift_rl[0];
endmodule
module TMDS_encoder(
input clk,
input [7:0] VD, // video data (red, green or blue)
input [1:0] CD, // control data
input VDE, // video data enable, to choose between CD (when VDE=0) and VD (when VDE=1)
output reg [9:0] TMDS = 0
);
wire [3:0] Nb1s = VD[0] + VD[1] + VD[2] + VD[3] + VD[4] + VD[5] + VD[6] + VD[7];
wire XNOR = (Nb1s>4'd4) || (Nb1s==4'd4 && VD[0]==1'b0);
wire [8:0] q_m = {~XNOR, q_m[6:0] ^ VD[7:1] ^ {7{XNOR}}, VD[0]};
reg [3:0] balance_acc = 0;
wire [3:0] balance = q_m[0] + q_m[1] + q_m[2] + q_m[3] + q_m[4] + q_m[5] + q_m[6] + q_m[7] - 4'd4;
wire balance_sign_eq = (balance[3] == balance_acc[3]);
wire invert_q_m = (balance==0 || balance_acc==0) ? ~q_m[8] : balance_sign_eq;
wire [3:0] balance_acc_inc = balance - ({q_m[8] ^ ~balance_sign_eq} & ~(balance==0 || balance_acc==0));
wire [3:0] balance_acc_new = invert_q_m ? balance_acc-balance_acc_inc : balance_acc+balance_acc_inc;
wire [9:0] TMDS_data = {invert_q_m, q_m[8], q_m[7:0] ^ {8{invert_q_m}}};
wire [9:0] TMDS_code = CD[1] ? (CD[0] ? 10'b1010101011 : 10'b0101010100) : (CD[0] ? 10'b0010101011 : 10'b1101010100);
always @(posedge clk) TMDS <= VDE ? TMDS_data : TMDS_code;
always @(posedge clk) balance_acc <= VDE ? balance_acc_new : 4'h0;
endmodule
๊ทธ๋ฐ ๋ค์ ์ถ๋ ฅ ์์ด DDIO ์ถ๋ ฅ์ผ๋ก ๊ณต๊ธ๋์ด ์์น โโ๋ฐ ํ๊ฐ ์ XNUMX๋นํธ ์ ํธ๋ฅผ ์์ฐจ์ ์ผ๋ก ์์ฑํฉ๋๋ค.
DDIO ์์ฒด๋ ๋ค์๊ณผ ๊ฐ์ด Verilog ์ฝ๋๋ก ์ค๋ช ํ ์ ์์ต๋๋ค.
module ddio(
input wire d0,
input wire d1,
input wire clk,
output wire out
);
reg r_d0;
reg r_d1;
always @(posedge clk)
begin
r_d0 <= d0;
r_d1 <= d1;
end
assign out = clk ? r_d0 : r_d1;
endmodule
ํ์ง๋ง ์๋ง ๊ทธ๋ฐ ์์ผ๋ก ์๋ํ์ง ์์ ๊ฒ์ ๋๋ค. ์ค์ ๋ก DDIO ์ถ๋ ฅ ์์๋ฅผ ์ฌ์ฉํ๋ ค๋ฉด Altera์ ALTDDIO_OUT ๋ฉ๊ฐ ํจ์๋ฅผ ์ฌ์ฉํด์ผ ํฉ๋๋ค. ๋ด ํ๋ก์ ํธ์์ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๊ตฌ์ฑ ์์ ALTDDIO_OUT์ด ์ฌ์ฉ๋ฉ๋๋ค.
์กฐ๊ธ ๊น๋ค๋ก์ ๋ณด์ผ ์ ์์ง๋ง ์๋ํฉ๋๋ค.
Verilog HDL๋ก ์์ฑ๋ ์ ์ฒด ์์ค ์ฝ๋๋ฅผ ๋ณผ ์ ์์ต๋๋ค.
FPGA์ฉ์ผ๋ก ์ปดํ์ผ๋ ํ์จ์ด๋ Mars Rover2rpi ๋ณด๋์ ์ค์น๋ EPCS ์นฉ์ ๋ด์ฅ๋์ด ์์ต๋๋ค. ๋ฐ๋ผ์ FPGA ๋ณด๋์ ์ ์์ด ๊ณต๊ธ๋๋ฉด FPGA๊ฐ ํ๋์ ๋ฉ๋ชจ๋ฆฌ์์ ์ด๊ธฐํ๋๊ณ ์์๋ฉ๋๋ค.
์ด์ Raspberry ์์ฒด์ ๊ตฌ์ฑ์ ๋ํด ์กฐ๊ธ ์ด์ผ๊ธฐํด์ผ ํฉ๋๋ค.
Debian Buster, ๋ฒ์ : 32๋
2020์,
์ถ์์ผ:2020-08-20, ์ปค๋ ๋ฒ์ :5.4.
๋ค์ ๋ ๊ฐ์ง๋ฅผ ์ํํด์ผํฉ๋๋ค.
- config.txt ํ์ผ์ ํธ์งํฉ๋๋ค.
- ๋ ๋์ ๋ชจ๋ํฐ์์ ์๋ํ๋๋ก X ์๋ฒ ๊ตฌ์ฑ์ ๋ง๋ญ๋๋ค.
/boot/config.txt ํ์ผ์ ํธ์งํ ๋ ๋ค์์ ์ํํด์ผ ํฉ๋๋ค.
- i2c, i2s, spi์ ์ฌ์ฉ์ ๋นํ์ฑํํฉ๋๋ค.
- ์ค๋ฒ๋ ์ด๋ก DPI ๋ชจ๋ ํ์ฑํ dtoverlay=dpi24;
- ๋น๋์ค ๋ชจ๋ ์ค์ 1280ร720 60Hz, DPI๋น ํฌ์ธํธ๋น 24๋นํธ;
- ํ์ํ ํ๋ ์ ๋ฒํผ ์ 2 ์ง์ (max_framebuffers=2, ๋ ๋ฒ์งธ ์ฅ์น /dev/fb1์ด ํ์๋จ)
config.txt ํ์ผ์ ์ ์ฒด ํ ์คํธ๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=1
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16
# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720
# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1
# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2
# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4
# uncomment for composite PAL
#sdtv_mode=2
#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800
# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on
dtparam=i2c_arm=off
dtparam=spi=off
dtparam=i2s=off
dtoverlay=dpi24
overscan_left=0
overscan_right=0
overscan_top=0
overscan_bottom=0
framebuffer_width=1280
framebuffer_height=720
display_default_lcd=0
enable_dpi_lcd=1
dpi_group=2
dpi_mode=87
#dpi_group=1
#dpi_mode=4
dpi_output_format=0x6f027
dpi_timings=1280 1 110 40 220 720 1 5 5 20 0 0 0 60 0 74000000 3
# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18
# Additional overlays and parameters are documented /boot/overlays/README
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
#dtoverlay=vc4-fkms-v3d
max_framebuffers=2
[all]
#dtoverlay=vc4-fkms-v3d
max_framebuffers=2
๊ทธ๋ฐ ๋ค์ ๋ ๊ฐ์ ํ๋ ์ ๋ฒํผ /dev/fb0 ๋ฐ /dev/fb1์์ ๋ ๊ฐ์ ๋ชจ๋ํฐ๋ฅผ ์ฌ์ฉํ๋ ค๋ฉด X ์๋ฒ์ ๋ํ ๊ตฌ์ฑ ํ์ผ์ ๋ง๋ค์ด์ผ ํฉ๋๋ค.
๋ด ๊ตฌ์ฑ ํ์ผ์ ๋ค์๊ณผ ๊ฐ์ด /usr/share/x11/xorg.conf.d/60-dualscreen.conf์ ๋๋ค.
Section "Device"
Identifier "LCD"
Driver "fbturbo"
Option "fbdev" "/dev/fb0"
Option "ShadowFB" "off"
Option "SwapbuffersWait" "true"
EndSection
Section "Device"
Identifier "HDMI"
Driver "fbturbo"
Option "fbdev" "/dev/fb1"
Option "ShadowFB" "off"
Option "SwapbuffersWait" "true"
EndSection
Section "Monitor"
Identifier "LCD-monitor"
Option "Primary" "true"
EndSection
Section "Monitor"
Identifier "HDMI-monitor"
Option "RightOf" "LCD-monitor"
EndSection
Section "Screen"
Identifier "screen0"
Device "LCD"
Monitor "LCD-monitor"
EndSection
Section "Screen"
Identifier "screen1"
Device "HDMI"
Monitor "HDMI-monitor"
EndSection
Section "ServerLayout"
Identifier "default"
Option "Xinerama" "on"
Option "Clone" "off"
Screen 0 "screen0"
Screen 1 "screen1" RightOf "screen0"
EndSection
์, ์์ง ์ค์นํ์ง ์์๋ค๋ฉด Xinerama๋ฅผ ์ค์นํด์ผ ํฉ๋๋ค. ๊ทธ๋ฌ๋ฉด ์์ ๋ฐ๋ชจ ๋น๋์ค์์ ๋ณผ ์ ์๋ฏ์ด ๋ฐ์คํฌํฑ ๊ณต๊ฐ์ด ๋ ๊ฐ์ ๋ชจ๋ํฐ๋ก ์์ ํ ํ์ฅ๋ฉ๋๋ค.
๊ทธ๊ฒ ๋ค์ผ ๊ฒ์ ๋๋ค. ์ด์ Raspberry Pi3 ์์ ์๋ ๋ ๊ฐ์ ๋ชจ๋ํฐ๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค.
Mars Rover2rpi ๋ณด๋์ ์ค๋ช
๋ฐ ๋ค์ด์ด๊ทธ๋จ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
์ถ์ฒ : habr.com