Hi, team.
I'm having some problems with registers' configuration.
"write_ads1285_register()"is the function I use to write all registers;
"write_single_register(adress,data)"is the function I use to write single register;
"read_ads1285_register()"is the function I use to read all registers;
they transmit through SPI
{0x40, 0x0D, 0x00, 0x12, 0x00, 0x32, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80}
{0x20, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
these data is written to the registers/ to read Configuration
write_ads1285_register();
while(1) {read_ads1285_register();}
what I got is:00 12 00 32 03 00 00 00 00 00 40 08 00 80
that means GPIO0_DAT[3:3] is HIGH mode ,
and I cannot change it unless I send codes below:
write_single_register(0x4b,0x02);
read_ads1285_register();
write_single_register(0x4b,0x00);
read_ads1285_register();
and I got these:
00 12 00 32 03 00 00 00 00 00 40 02 00 80
00 12 00 32 03 00 00 00 00 00 40 00 00 80
If I only do this after I got a "08" for GPIO0_DAT[3:3]
write_single_register(0x4b,0x00);
read_ads1285_register();
what I got is still "08"
Isn't the default value of this register 0x00?Does it have any special meaning for "08"?