Hi,
ich teste hier nun schon seit einigen Tagen mit meiner GB-Cam rum. Es funktioniert mittlerweile soweit, dass READ auf High geht. Allerdings geht es nach 16384 weiteren Takten (und auch sonst nie) nicht wieder auf Low. Vielleicht findet ja jemand von euch den Denkfehler...
Das Oszi zeigt auch an, dass sich am XCK nichts ändert, unverändert wird die Kamera getaktet.
Hier mein Code:
(die led-methoden schalten nur entsprechende LEDs an / aus, alle anderen Methoden sollten sich selbsterklären)Code:// reset CAM_PORT &= ~(1<<CAM_XCK); // xck lo cam_wait(4); // experimental CAM_PORT &= ~(1<<CAM_RESET); // reset lo cam_wait(4); // tSXR CAM_PORT |= (1<<CAM_XCK); // xck hi cam_wait(4); // tHXR CAM_PORT |= (1<<CAM_RESET); // reset hi // regsets cam_regset(0, 0x80); cam_regset(1, 0x0E); cam_regset(2, 0x06); cam_regset(3, 0x00); cam_regset(4, 0x01); cam_regset(5, 0x00); cam_regset(6, 0b00000101); cam_regset(7, 0x07); // start CAM_PORT |= (1<<CAM_START); // start hi cam_wait(4); // tSST (?) CAM_PORT |= (1<<CAM_XCK); // xck hi cam_wait(4); // tHST (?) CAM_PORT &= ~(1<<CAM_START); // start lo cam_wait(4); // experimental CAM_PORT &= ~(1<<CAM_XCK); // xck lo cam_wait(4); // experimental // wait for read hi while (!(CAM_PIN & (1<<CAM_READ))) { CAM_PORT |= (1<<CAM_XCK); cam_wait(8); //tWHX CAM_PORT &= ~(1<<CAM_XCK); cam_wait(8); // tWLX } led(led2,1); // while read hi while (CAM_PIN & (1<<CAM_READ)) { led(led3, 1); CAM_PORT |= (1<<CAM_XCK); cam_wait(8); // experimental CAM_PORT &= ~(1<<CAM_XCK); cam_wait(8); // experimental } led(led4, 1); // end / back to start







Zitieren

Lesezeichen