2018-06-13 01:56:57 +02:00
|
|
|
#include <avr/io.h>
|
|
|
|
#include <util/delay.h>
|
|
|
|
|
|
|
|
#include "twi.h"
|
2019-01-20 16:21:51 +01:00
|
|
|
#include "uart.h"
|
2018-06-15 02:22:59 +02:00
|
|
|
#include "si5351.h"
|
2018-07-08 02:06:25 +02:00
|
|
|
#include "wspr.h"
|
2019-01-20 16:21:51 +01:00
|
|
|
#include "ov7670.h"
|
2018-06-13 01:56:57 +02:00
|
|
|
|
|
|
|
int main(void) {
|
|
|
|
|
|
|
|
twi_init();
|
2019-01-20 16:21:51 +01:00
|
|
|
uart_init();
|
2018-06-13 01:56:57 +02:00
|
|
|
|
2019-01-20 16:21:51 +01:00
|
|
|
ov7670_init();
|
2018-07-07 01:51:20 +02:00
|
|
|
|
2018-06-20 01:22:31 +02:00
|
|
|
|
2019-01-20 16:21:51 +01:00
|
|
|
//while(1) {
|
|
|
|
ov7670_wait_vsync();
|
|
|
|
ov7670_toggle_wrst();
|
|
|
|
ov7670_unset_we();
|
2018-06-15 02:22:59 +02:00
|
|
|
|
2019-01-20 16:21:51 +01:00
|
|
|
ov7670_wait_vsync();
|
|
|
|
ov7670_set_we();
|
|
|
|
ov7670_toggle_rrst();
|
2018-07-08 02:06:25 +02:00
|
|
|
|
|
|
|
|
2019-01-20 16:21:51 +01:00
|
|
|
for(uint16_t y = 0; y < 480; y++) {
|
|
|
|
for(uint16_t x = 0; x < 640; x++) {
|
|
|
|
ov7670_toggle_rck();
|
|
|
|
uint8_t bits = ov7670_read_bits();
|
|
|
|
uart_putc(bits);
|
|
|
|
}
|
|
|
|
}
|
2018-07-15 00:20:41 +02:00
|
|
|
|
2019-01-20 16:21:51 +01:00
|
|
|
uart_puts("Done");
|
2018-06-13 01:56:57 +02:00
|
|
|
|
2019-01-20 16:21:51 +01:00
|
|
|
//}
|
2018-07-07 01:51:20 +02:00
|
|
|
|
2018-06-13 01:56:57 +02:00
|
|
|
while(1);
|
|
|
|
}
|