Skip to content

Commit aa26b41

Browse files
committed
Bugfix in rdReg
1 parent f9ebbe5 commit aa26b41

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

README

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ A3<-3
2222
2<-PCLK
2323
GND->PWDN
2424
3.3->RESET
25+
GND->GND
26+
3.3v->3.3v

ov7670.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ static uint8_t twiRd(uint8_t nack){
229229
uint8_t rdReg(uint8_t reg){
230230
uint8_t dat;
231231
twiStart();
232-
twiWriteByte(OV7670_I2C_ADDRESS,TW_MT_SLA_ACK);
232+
twiWriteByte(OV7670_I2C_ADDRESS<<1,TW_MT_SLA_ACK);
233233
twiWriteByte(reg,TW_MT_DATA_ACK);
234234
TWCR = (1<<TWINT)|(1<<TWEN)|(1<<TWSTO);//send stop
235235
_delay_ms(1);

0 commit comments

Comments
 (0)