void VGA_ad9984_inital()
{
ad9984_wr(0x01,0x54);//1024x768
ad9984_wr(0x02,0x00);
ad9984_wr(0x03,0xa0);
ad9984_wr(0x04,0x20);
ad9984_wr(0x05,0x40);///////////////////////////
ad9984_wr(0x06,0x00);
ad9984_wr(0x07,0x40);
ad9984_wr(0x08,0x00);
ad9984_wr(0x09,0x40);
ad9984_wr(0x0A,0x00);
ad9984_wr(0x0B,0x00);//rgb=4
ad9984_wr(0x0C,0x80);
ad9984_wr(0x0D,0x00);
ad9984_wr(0x0E,0x80);
ad9984_wr(0x0F,0x00);
ad9984_wr(0x10,0x80);
ad9984_wr(0x11,0x40);
ad9984_wr(0x12,0x08);//c8);
ad9984_wr(0x13,0x20);
ad9984_wr(0x14,0x08);
//c8);
ad9984_wr(0x15,0x0a);
ad9984_wr(0x16,0x02);
ad9984_wr(0x17,0x0a);
ad9984_wr(0x18,0x00); //clamp very important
ad9984_wr(0x1A,0x20);
ad9984_wr(0x1B,0x33); //clamp very important
ad9984_wr(0x1C,0xff);
ad9984_wr(0x1D,0x78);
ad9984_wr(0x1E,0xa4);
ad9984_wr(0x1F,0x92);
ad9984_wr(0x20,0x07);
ad9984_wr(0x21,0x20);
ad9984_wr(0x22,0x32);
// ad9984_wr(0x23,0x10);
//
ad9984_wr(0x28,0xbf);
ad9984_wr(0x29,0x02);
//
ad9984_wr(0x2C,0x00);
ad9984_wr(0x2D,0xe8);
ad9984_wr(0x2E,0xe0); //clamp very important
// ad9984_wr(0x3C,0x0e);
}
void ad9984_1080P60_PC_set()
{
ad9984_wr(0x01,0x89);
ad9984_wr(0x02,0x80);
ad9984_wr(0x03,0xE8);
ad9984_wr(0x11,0x20);
ad9984_wr(0x12,0x18);
ad9984_wr(0x13,0x2c);
ad9984_wr(0x14,0x18);
ad9984_wr(0x36,0x00);
ad9984_wr(0x1E,0xa4);
ad9984_wr(0x1F,0x92);
ad9984_wr(0x18,0x00);
}
void ad9984_720P60_stand_set()
{
ad9984_wr(0x01,0x67);
ad9984_wr(0x02,0x20);
ad9984_wr(0x03,0xA8);
ad9984_wr(0x36,0x00);
ad9984_wr(0x1E,0xA4);
ad9984_wr(0x18,0x00); //0x60
ad9984_wr(0x11,0x20);
ad9984_wr(0x12,0x18);
ad9984_wr(0x13,0x28);
ad9984_wr(0x14,0x18);
}
void ad9984_640x480P60_set()
{
ad9984_wr(0x01,0x32);
ad9984_wr(0x02,0x00);
ad9984_wr(0x03,0x28);
ad9984_wr(0x11,0x20);
ad9984_wr(0x12,0xa0);
ad9984_wr(0x13,0x60);
ad9984_wr(0x14,0x00);
ad9984_wr(0x36,0x00);
ad9984_wr(0x1E,0xA4);
ad9984_wr(0x19,0x01); //can not be 0
ad9984_wr(0x1A,0x20);//clamp very important
// ad9984_wr(0x1B,0xd3); //自动增益关掉,手动调好用 //用渐变平分来调
//
// ad9984_wr(0x0B,0x60);//clamp to GND , control brightness
// ad9984_wr(0x0C,0x00);
// ad9984_wr(0x0D,0x58);
// ad9984_wr(0x0E,0x00);
// ad9984_wr(0x0F,0x5d);
// ad9984_wr(0x10,0x00);
}
void ad9984_800x600P60_set()
{
ad9984_wr (0x01,0x42);
ad9984_wr (0x02,0x00);
ad9984_wr (0x03,0x68);
ad9984_wr (0x11,0x20);
ad9984_wr (0x12,0xb8);
ad9984_wr (0x13,0x80);
ad9984_wr (0x1e,0xa4);
ad9984_wr (0x36,0x00);
ad9984_wr(0x19,0x01); //can not be 0
}
void ad9984_VGA1024768_set()
{
ad9984_wr(0x01,0x54);
ad9984_wr(0x02,0x00);
ad9984_wr(0x03,0xa0);
ad9984_wr(0x11,0x20); //for 720P60,this reg must be 0x40
ad9984_wr(0x12,0xa0);
ad9984_wr(0x13,0x88);
ad9984_wr(0x14,0x00);
ad9984_wr(0x1b,0xf3);
ad9984_wr(0x19,0x01); //clamp very important //can not be 0
}
void ad9984_VGA1280_set_v2()
{
ad9984_wr(0x01,0x69);
ad9984_wr(0x02,0x80);
ad9984_wr(0x03,0xB0);
ad9984_wr(0x11,0x20);
ad9984_wr(0x12,0xb8);
ad9984_wr(0x13,0x70);
ad9984_wr(0x14,0x18);
ad9984_wr(0x1E,0xa4);
ad9984_wr(0x1F,0x92);
ad9984_wr(0x19,0x04); //can not be 0
ad9984_wr(0x1A,0x28);
}
void ad9984_1360x768P60_set()
{
ad9984_wr(0x01,0x70);
ad9984_wr(0x02,0x00);
ad9984_wr(0x03,0xa0);
ad9984_wr(0x11,0x20);
ad9984_wr(0x18,0x00);
ad9984_wr(0x19,0x01); //can not be 0
ad9984_wr(0x1b,0xf3);
}
- 1
- 2
前往页