siteswapjuggler / ADS8688a

ADS8688a Library
GNU General Public License v3.0
18 stars 4 forks source link

Getting 0xFF as output when using read_channel example code #2

Closed ehteshamul51haque closed 2 years ago

ehteshamul51haque commented 2 years ago

Hey Sylvain!

I am trying to simulate ADS8688a ADC on proteus which is coded on using arduino IDE using the library contributed by you on GitHub. I am hereby attaching the schematic being used.

We are trying to use an external clock from the microcontroller. When the code read_channel.ino from the example folder of Github is being executed, we are getting a full scale reading of 5.12V (0xFF) even though we are connecting a 3.7V source to AIN0P pin, AIN0_GND being grounded.

Could you please help us in trying to debug this asap?

Regards,

Ehteshamul

Code:

/ ADS8688 library example

include

ADS8688 bank = ADS8688(); // Instantiate ADS8688 with PIN 10 as default CS void setup() { bank.setChannelSPD(0b00000010); // enable channel 0, power-down the others bank.setChannelRange(0,R6); // set all channel range to +- 1.25*Vref bank.autoRst(); // reset auto sequence Serial.begin(115200); // start serial communication } void loop() { Serial.print("CH0: "); // print label uint16_t val = bank.noOp(); // trigger sampling Serial.print(bank.I2V(val,R1)); // print value in Volts Serial.println(" V"); // print Volt label delay(500); // wait for 500 milliseconds } Screenshot 2022-01-27 111551

siteswapjuggler commented 2 years ago

Hello,

what I can tell so far is that this example has been tested in real life with the real component and it was working well. Perhaps you should start by asking proteus about this.

I can also check... again... in real condition to see if nothing is broken in arduino about this but I'm running out of time so I cannot promess anything shortly.

By the mean time you can also give it a try with the real component by yourself and correct the library in you found something wrong. Contributing instead of requiring is also way to go with open source code.

Have a nice day

ehteshamul51haque commented 2 years ago

Thanks for the reply. Can you just check if the connections done are correct or not?

siteswapjuggler commented 2 years ago

This my test breadboard schematic : ADS8688a_breakboard_schematic

The pin connection to the Arduino are written in the example :

SUGURESHM commented 2 years ago

hi can you share driver code for ads8688

siteswapjuggler commented 2 years ago

Hi @SUGURESHM what exactly to you mean by "sharing driver code" ? I mean this is litteraly a deposit with an arduino library source code for the ADS8688, just download and use it...

SUGURESHM commented 2 years ago

yes but i tried to convert into c code but its not worked can you please send generalized c code so i can follow the steps, i need c code because I'm working on c. thank you. @siteswapjuggler

siteswapjuggler commented 2 years ago

@SUGURESHM it's almost already c code (cpp is I mean very close to standard c). By the way I'm just publishing this arduino library as it is, it's not an official Texas Instrument repository... If you want further information in a non-arduino context please contact appropriate support.

I mean you claim for answers quiet in an appropriate way in this case... you use an open issue as a chat, you don't explain the context of you problem neither the problem itself and you require things with innapproprait insistment.

Subject close to me, if you have a legit question about this code for what it is (an arduino library) please open an appropriate issue and explain clearly the context of your demand.

SUGURESHM commented 2 years ago

thank you for your assist ill check. @siteswapjuggler

SUGURESHM commented 2 years ago

No i need C generalised code i tried to convert aurdino but its not worked.

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows

From: Sylvain @.> Sent: 10 June 2022 01:15 AM To: @.> Cc: Suguresh @.>; @.> Subject: Re: [siteswapjuggler/ADS8688a] Getting 0xFF as output when using read_channel example code (Issue #2)

Hi @SUGURESHMhttps://github.com/SUGURESHM what exactly to you mean by "sharing driver code" ? I mean this is litteraly a deposit with an arduino library source code for the ADS8688, just download and use it...

— Reply to this email directly, view it on GitHubhttps://github.com/siteswapjuggler/ADS8688a/issues/2#issuecomment-1151552540, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AZRZA4QNUR52IWTGEJVD7VDVOJCW7ANCNFSM5M46RL7Q. You are receiving this because you were mentioned.Message ID: @.***>