change iic speed to 20K

This commit is contained in:
2024-12-19 20:12:28 +08:00
parent fd06d54fdc
commit e2c2e81247
3 changed files with 67 additions and 16 deletions

View File

@@ -60,20 +60,23 @@ int main(void) {
printf("\r\n");
delay_ms(500);
ldc1612_iic_get_sensor_infomation();
uint16_t device_id = 0;
device_id = ldc1612_get_deveice_id();
printf("device id = 0x%x\r\n", device_id);
delay_ms(100);
device_id = 0;
device_id = ldc1612_get_manufacturer_id();
printf("device id = 0x%x\r\n", device_id);
uint8_t data[2] = {0x05, 0x36};
ldc1612_iic_write_16bits(SET_CONVERSION_TIME_REG_START, data);
// uint16_t device_id = 0;
// device_id = ldc1612_get_deveice_id();
// printf("device id = 0x%x\r\n", device_id);
//
// delay_ms(100);
//
// device_id = 0;
// device_id = ldc1612_get_manufacturer_id();
// printf("device id = 0x%x\r\n", device_id);
uint16_t result = {0x0546};
uint8_t data[2] = {0};
data[0] = (result >> 8) & 0xFF;
data[1] = result & 0xFF;
printf("data[0] = 0x%x, data[1] = 0x%x\r\n", data[0], data[1]);
while (1) {
// delay_ms(1000);