-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32-S3-Mini and MCP3462R not working in Mux Mode #13
Comments
I was running at 10MHz. I lowered to 200KHz and still no change. |
If you have access to a scope, can you check the activity on MISO? |
Sorry for the delay. Was feeling rather unwell this weekend. Working on it now. |
MISO and MOSI seem to show reasonable signals. Seems like the second picture is showing a 1Byte command followed by another 2Byte command... I did not try to figure out which are these. But it seems save to say I still suspect the issue in this little snippet:
please put an |
Question on why the int32 is truncated to 25 bits in adcdata? The ADC can return either left aligned or right aligned 32 bit values. The assignment in the result struct retains all 32 bits |
yes, the dataformat is choosen within the begin() funtion |
I see that, but my point is that if somebody chooses a left aligned output, then the 7 leftmost bits get masked out? Or am I understanding it wrong? |
I assume you are right. |
Any other idea's I can try? |
Maybe try returning So Otherwise I don't really have a clue/it has to be in hardware? I've been testing the same code revisions on my hardware and it's been working (though I'm not using the R revision). I remember that you put the pins in the constructor of whichever MCP3x6x class you used, I instead opted to redefine the consts in the default constructor. So my object declaration is just with #defines for MOSI, MISO, SS, SCK, and IRQ (if required). The default SPI interface through Arduino is selected. |
I actually think you HAVE to use #define to select pins instead of using the constructor, it doesn't look like parameters are properly passed through the constructor to the SPI object The parameters required are
|
as his logic analyzer pictures have proven some SPI communication I don't see why this should be the case. |
If he's hooked up to the default pins then this isn't necessary, I'm just assuming not since he passed in parameters to the constructor.
…On Feb 12, 2024 at 1:07 PM -0500, nerdyscout ***@***.***>, wrote:
> I actually think you HAVE to use #define to select pins instead of using the constructor, it doesn't look like parameters are properly passed through the constructor to the SPI object
> The parameters required are
> #define MOSI
> #define MISO
> #define SS
> #define SCK
as his logic analyzer pictures have proven some SPI communication I don't see why this should be the case.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
@LeKrakenTheCode please publish your code. either setup a new repository as minimal example which reproduces your issue or the original code. |
It has been published here:
https://github.com/McMillanFlowProducts/McMillanDevBoard/
From: nerdyscout ***@***.***>
Sent: Monday, February 12, 2024 12:16 PM
To: nerdyscout/Arduino_MCP3x6x_Library ***@***.***>
Cc: Thomas McMillan ***@***.***>; Mention ***@***.***>
Subject: Re: [nerdyscout/Arduino_MCP3x6x_Library] ESP32-S3-Mini and MCP3462R not working in Mux Mode (Issue #13)
@LeKrakenTheCode<https://github.com/LeKrakenTheCode> please publish your code. either setup a new repository as minimal example which reproduces your issue or the original code.
—
Reply to this email directly, view it on GitHub<#13 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALLYL4OIN2DTDK46TDWCB7TYTJL57AVCNFSM6AAAAABCI7TINOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZZGI4DKMBWG4>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
I had to make a change to the line 69 in the cpp:
_spi->begin(_pinCLK, _pinMISO, _pinMOSI, _pinCS);
To get it to work with the ESP32 in the first place.
From: Jerry Ukwela ***@***.***>
Sent: Monday, February 12, 2024 12:10 PM
To: nerdyscout/Arduino_MCP3x6x_Library ***@***.***>
Cc: Thomas McMillan ***@***.***>; Author ***@***.***>
Subject: Re: [nerdyscout/Arduino_MCP3x6x_Library] ESP32-S3-Mini and MCP3462R not working in Mux Mode (Issue #13)
If he's hooked up to the default pins then this isn't necessary, I'm just assuming not since he passed in parameters to the constructor.
On Feb 12, 2024 at 1:07 PM -0500, nerdyscout ***@***.***<mailto:***@***.***>>, wrote:
> I actually think you HAVE to use #define to select pins instead of using the constructor, it doesn't look like parameters are properly passed through the constructor to the SPI object
> The parameters required are
> #define MOSI
> #define MISO
> #define SS
> #define SCK
as his logic analyzer pictures have proven some SPI communication I don't see why this should be the case.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***<mailto:***@***.***>>
—
Reply to this email directly, view it on GitHub<#13 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALLYL4JSCJJUUEC5K3NZHO3YTJLIRAVCNFSM6AAAAABCI7TINOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZZGI3TMMRVGQ>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
seems like it could be fixed by something like this, will work on a better fix later.
|
Keep receiving a value of zero from analogRead. Moving this into its own issue from: #5 (comment)
The text was updated successfully, but these errors were encountered: