سلام
میخام بدونم چطوری می شه پایه 7 ds1307 )sqw/out) رو فعال کرد .
basic
avr
با سپاس ..........
میخام بدونم چطوری می شه پایه 7 ds1307 )sqw/out) رو فعال کرد .
basic
avr
با سپاس ..........
59" ' to watch the day changing valueAddress = 7 'Register NO.7 I2cstart I2cwbyte Clkic_w I2cwbyte Address 'write address for the register I2cstart I2cwbyte Clkic_r I2crbyte Data_i2c , Nack 'now read the register I2cstop Data_i2c = Data_i2c Or &B00010000 'set bit no.4 to 1 Data_i2c = Data_i2c And &B11111100 'reset first and second bit Address = 0 I2cstart I2cwbyte Clkic_w I2cwbyte Address 'write back I2cwbyte Data_i2c I2cstop
Address = 2 'Register No.2 I2cstart I2cwbyte Clkic_w I2cwbyte Address 'write address for the register I2cstart I2cwbyte Clkic_r I2crbyte Data_i2c , Nack 'now read the register I2cstop Data_i2c = Data_i2c And &B10111111 'reset first and second bit Address = 0 I2cstart I2cwbyte Clkic_w I2cwbyte Address 'write back I2cwbyte Data_i2c I2cstop
دیدگاه