中级会员
- 积分
- 304
- 威望
- 230
- 贡献
- 56
- 兑换币
- 34
- 注册时间
- 2009-2-18
- 在线时间
- 9 小时
|
1贡献
我用OV6620才40行图像 但是从第10行以后数据就不准了 会出现小于16的值 前10行采集完全正确 黑线的值为16-17.哪位高手帮我分析下!
部分代码:
uint r_line[40]@0x2f00=
{2,9,16,23,30,37,44,51,58,65,72,79,86,93,100,107,114,121,128,135,142,149,
156,163,170,177,184,191,198,205,212,219,226,233,240,247,254,261,268,275
};
#pragma CODE_SEG NON_BANKED
void interrupt 13 HREF_ISR(void)
{
DisableInterrupts;
TFLG1_C5F=1;
sample_flag+=1;
if(sample_flag>280)
{
VSYNC_sample=1;
TIE_C5I=0;
return;
}
if(sample_flag==r_line[row]&&HREF_sample==0)
{
asm
{
movb PORTA,IMAGE_BUFF
movb PORTA,IMAGE_BUFF+1
movb PORTA,IMAGE_BUFF+2
movb PORTA,IMAGE_BUFF+3
movb PORTA,IMAGE_BUFF+4
movb PORTA,IMAGE_BUFF+5
movb PORTA,IMAGE_BUFF+6
movb PORTA,IMAGE_BUFF+7
movb PORTA,IMAGE_BUFF+8
movb PORTA,IMAGE_BUFF+9
movb PORTA,IMAGE_BUFF+10
movb PORTA,IMAGE_BUFF+11
movb PORTA,IMAGE_BUFF+12
movb PORTA,IMAGE_BUFF+13
movb PORTA,IMAGE_BUFF+14
movb PORTA,IMAGE_BUFF+15
movb PORTA,IMAGE_BUFF+16
movb PORTA,IMAGE_BUFF+17
movb PORTA,IMAGE_BUFF+18
movb PORTA,IMAGE_BUFF+19
movb PORTA,IMAGE_BUFF+20
movb PORTA,IMAGE_BUFF+21
movb PORTA,IMAGE_BUFF+22
movb PORTA,IMAGE_BUFF+23
movb PORTA,IMAGE_BUFF+24
movb PORTA,IMAGE_BUFF+25
movb PORTA,IMAGE_BUFF+26
movb PORTA,IMAGE_BUFF+27
movb PORTA,IMAGE_BUFF+28
movb PORTA,IMAGE_BUFF+29
movb PORTA,IMAGE_BUFF+30
movb PORTA,IMAGE_BUFF+31
movb PORTA,IMAGE_BUFF+32
movb PORTA,IMAGE_BUFF+33
movb PORTA,IMAGE_BUFF+34
movb PORTA,IMAGE_BUFF+35
movb PORTA,IMAGE_BUFF+36
movb PORTA,IMAGE_BUFF+37
movb PORTA,IMAGE_BUFF+38
movb PORTA,IMAGE_BUFF+39
movb PORTA,IMAGE_BUFF+40
movb PORTA,IMAGE_BUFF+41
movb PORTA,IMAGE_BUFF+42
movb PORTA,IMAGE_BUFF+43
movb PORTA,IMAGE_BUFF+44
movb PORTA,IMAGE_BUFF+45
movb PORTA,IMAGE_BUFF+46
movb PORTA,IMAGE_BUFF+47
movb PORTA,IMAGE_BUFF+48
movb PORTA,IMAGE_BUFF+49
movb PORTA,IMAGE_BUFF+50
movb PORTA,IMAGE_BUFF+51
movb PORTA,IMAGE_BUFF+52
movb PORTA,IMAGE_BUFF+53
movb PORTA,IMAGE_BUFF+54
movb PORTA,IMAGE_BUFF+55
movb PORTA,IMAGE_BUFF+56
movb PORTA,IMAGE_BUFF+57
movb PORTA,IMAGE_BUFF+58
movb PORTA,IMAGE_BUFF+59
movb PORTA,IMAGE_BUFF+60
movb PORTA,IMAGE_BUFF+61
movb PORTA,IMAGE_BUFF+62
movb PORTA,IMAGE_BUFF+63
movb PORTA,IMAGE_BUFF+64
movb PORTA,IMAGE_BUFF+65
movb PORTA,IMAGE_BUFF+66
movb PORTA,IMAGE_BUFF+67
movb PORTA,IMAGE_BUFF+68
movb PORTA,IMAGE_BUFF+69
movb PORTA,IMAGE_BUFF+70
movb PORTA,IMAGE_BUFF+71
movb PORTA,IMAGE_BUFF+72
movb PORTA,IMAGE_BUFF+73
movb PORTA,IMAGE_BUFF+74
movb PORTA,IMAGE_BUFF+75
movb PORTA,IMAGE_BUFF+76
movb PORTA,IMAGE_BUFF+77
movb PORTA,IMAGE_BUFF+78
movb PORTA,IMAGE_BUFF+79
movb PORTA,IMAGE_BUFF+80
movb PORTA,IMAGE_BUFF+81
movb PORTA,IMAGE_BUFF+82
movb PORTA,IMAGE_BUFF+83
movb PORTA,IMAGE_BUFF+84
movb PORTA,IMAGE_BUFF+85
movb PORTA,IMAGE_BUFF+86
movb PORTA,IMAGE_BUFF+87
movb PORTA,IMAGE_BUFF+88
movb PORTA,IMAGE_BUFF+89
movb PORTA,IMAGE_BUFF+90
movb PORTA,IMAGE_BUFF+91
movb PORTA,IMAGE_BUFF+92
movb PORTA,IMAGE_BUFF+93
movb PORTA,IMAGE_BUFF+94
movb PORTA,IMAGE_BUFF+95
movb PORTA,IMAGE_BUFF+96
movb PORTA,IMAGE_BUFF+97
movb PORTA,IMAGE_BUFF+98
movb PORTA,IMAGE_BUFF+99
movb PORTA,IMAGE_BUFF+100
movb PORTA,IMAGE_BUFF+101
movb PORTA,IMAGE_BUFF+102
movb PORTA,IMAGE_BUFF+103
movb PORTA,IMAGE_BUFF+104
movb PORTA,IMAGE_BUFF+105
movb PORTA,IMAGE_BUFF+106
movb PORTA,IMAGE_BUFF+107
movb PORTA,IMAGE_BUFF+108
movb PORTA,IMAGE_BUFF+109
movb PORTA,IMAGE_BUFF+110
movb PORTA,IMAGE_BUFF+111
movb PORTA,IMAGE_BUFF+112
movb PORTA,IMAGE_BUFF+113
movb PORTA,IMAGE_BUFF+114
movb PORTA,IMAGE_BUFF+115
movb PORTA,IMAGE_BUFF+116
movb PORTA,IMAGE_BUFF+117
movb PORTA,IMAGE_BUFF+118
movb PORTA,IMAGE_BUFF+119
movb PORTA,IMAGE_BUFF+120
movb PORTA,IMAGE_BUFF+121
movb PORTA,IMAGE_BUFF+122
movb PORTA,IMAGE_BUFF+123
movb PORTA,IMAGE_BUFF+124
movb PORTA,IMAGE_BUFF+125
movb PORTA,IMAGE_BUFF+126
movb PORTA,IMAGE_BUFF+127
movb PORTA,IMAGE_BUFF+128
movb PORTA,IMAGE_BUFF+129
movb PORTA,IMAGE_BUFF+130
movb PORTA,IMAGE_BUFF+131
movb PORTA,IMAGE_BUFF+132
movb PORTA,IMAGE_BUFF+133
movb PORTA,IMAGE_BUFF+134
movb PORTA,IMAGE_BUFF+135
movb PORTA,IMAGE_BUFF+136
movb PORTA,IMAGE_BUFF+137
movb PORTA,IMAGE_BUFF+138
movb PORTA,IMAGE_BUFF+139
movb PORTA,IMAGE_BUFF+140
movb PORTA,IMAGE_BUFF+141
movb PORTA,IMAGE_BUFF+142
movb PORTA,IMAGE_BUFF+143
movb PORTA,IMAGE_BUFF+144
movb PORTA,IMAGE_BUFF+145
movb PORTA,IMAGE_BUFF+146
movb PORTA,IMAGE_BUFF+147
}
HREF_sample=1;
row++;
}
EnableInterrupts;
} |
|