Skip to content
Snippets Groups Projects
Commit 26d7e47e authored by Michael DM Dryden's avatar Michael DM Dryden
Browse files

EIS: Fix DS4550 pin settings to connect cell

parent ebb6394e
Branches
No related merge requests found
......@@ -20,35 +20,35 @@ void eis_set_gain(uint8_t gain){
delay_ms(30);
switch (gain) {
case EIS_IV_GAIN_0:
ds4550_set_pins(0b110000110, 0b111000000);
ds4550_set_pins(0b110000000, 0b111000000);
printf("#INFO: EIS gain 0\r\n");
break;
case EIS_IV_GAIN_100:
ds4550_set_pins(0b111000110, 0b111000000);
ds4550_set_pins(0b111000000, 0b111000000);
printf("#INFO: EIS gain 100\r\n");
break;
case EIS_IV_GAIN_3k:
ds4550_set_pins(0b101000110, 0b111000000);
ds4550_set_pins(0b101000000, 0b111000000);
printf("#INFO: EIS gain 3k\r\n");
break;
case EIS_IV_GAIN_30k:
ds4550_set_pins(0b100000110, 0b111000000);
ds4550_set_pins(0b100000000, 0b111000000);
printf("#INFO: EIS gain 30k\r\n");
break;
case EIS_IV_GAIN_300k:
ds4550_set_pins(0b011000110, 0b111000000);
ds4550_set_pins(0b011000000, 0b111000000);
printf("#INFO: EIS gain 300k\r\n");
break;
case EIS_IV_GAIN_3M:
ds4550_set_pins(0b010000110, 0b111000000);
ds4550_set_pins(0b010000000, 0b111000000);
printf("#INFO: EIS gain 3M\r\n");
break;
case EIS_IV_GAIN_30M:
ds4550_set_pins(0b001000110, 0b111000000);
ds4550_set_pins(0b001000000, 0b111000000);
printf("#INFO: EIS gain 30M\r\n");
break;
case EIS_IV_GAIN_100M:
ds4550_set_pins(0b000000110, 0b111000000);
ds4550_set_pins(0b000000000, 0b111000000);
printf("#INFO: EIS gain 100M\r\n");
break;
default:
......@@ -69,19 +69,19 @@ void eis_set_ref(uint8_t ref){
delay_ms(30);
switch (ref) {
case EIS_REF_CELL:
ds4550_set_pins(0b000000000, 0b000110000);
ds4550_set_pins(0b000001101, 0b000111111);
printf("#INFO: EIS REF RE\r\n");
break;
case EIS_REF_R1:
ds4550_set_pins(0b000010000, 0b000110000);
ds4550_set_pins(0b000010110, 0b000111111);
printf("#INFO: EIS REF R1\r\n");
break;
case EIS_REF_R2:
ds4550_set_pins(0b000100000, 0b000110000);
ds4550_set_pins(0b000100110, 0b000111111);
printf("#INFO: EIS REF R2\r\n");
break;
case EIS_REF_PARALLEL:
ds4550_set_pins(0b000110000, 0b000110000);
ds4550_set_pins(0b000110110, 0b000111111);
printf("#INFO: EIS REF R1+2\r\n");
break;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment