I use a feather to control a MIKROE ADC 6 click, 24b 8ch.
All works well with a feather 32u4 [sig proc + RTC+SD+ADC] , but I need to add
some more user interface and the 32u4 is maxed out.
When I load a feather Mo.....all is well with the sig proc, RTC, SD, but the ADC is stuck at
a max reading. No errors listed, is this maybe a speed issue or ??? or is there some difference I'm not seeing?
difference between feather 32u4 and feather M0
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- tepalia02
- Posts: 104
- Joined: Sun Apr 24, 2022 6:53 am
Re: difference between feather 32u4 and feather M0
Hi, I can see there are some differences between the two boards. Which pin of the M0 are you using for your ADC connection?
- DrEco
- Posts: 5
- Joined: Thu Apr 17, 2014 7:35 pm
Re: difference between feather 32u4 and feather M0
I interface with the ADC module via SPI.
Seems to work fine when using a 32u4 but I get a lot of errors when I change to a M0...?
Is there a potential coding or compile issue here ..?
Seems to work fine when using a 32u4 but I get a lot of errors when I change to a M0...?
Is there a potential coding or compile issue here ..?
- adafruit_support_carter
- Posts: 29483
- Joined: Tue Nov 29, 2016 2:45 pm
Re: difference between feather 32u4 and feather M0
The Feather form factor provides the main SPI pins SCLK, MOSI, and MISO in a common location. So shouldn't need to change anything for those.
The chip select (CS) pin can be any available GPIO pin though. What pin was being used on the 32u4 for chip select?
The chip select (CS) pin can be any available GPIO pin though. What pin was being used on the 32u4 for chip select?
- DrEco
- Posts: 5
- Joined: Thu Apr 17, 2014 7:35 pm
Re: difference between feather 32u4 and feather M0
I'm getting an error I don't understand...??
" invalid conversion from 'uint8_t' {aka 'unsigned char'} to 'BitOrder' [-fpermissive]
95 | SPI.beginTransaction (SPISettings (speedMaximum, dataOrder, dataMode));
| ^~~~~~~~~
| |
| uint8_t {aka unsigned char} ""
I don't get this error when using a Feather 32u4, but I do get it when loading the same file to a Feather M0.....
Is there an easy fix for this..??
" invalid conversion from 'uint8_t' {aka 'unsigned char'} to 'BitOrder' [-fpermissive]
95 | SPI.beginTransaction (SPISettings (speedMaximum, dataOrder, dataMode));
| ^~~~~~~~~
| |
| uint8_t {aka unsigned char} ""
I don't get this error when using a Feather 32u4, but I do get it when loading the same file to a Feather M0.....
Is there an easy fix for this..??
- adafruit_support_carter
- Posts: 29483
- Joined: Tue Nov 29, 2016 2:45 pm
Re: difference between feather 32u4 and feather M0
That's a difference between the Arduino Board Support Packages for the 32u4 (AVR) and M0 (ARM).
If that line is in a library, then the library should be updated. Should be a simple fix. It's basically griping about the variable types being used.
If that line is in a library, then the library should be updated. Should be a simple fix. It's basically griping about the variable types being used.
- DrEco
- Posts: 5
- Joined: Thu Apr 17, 2014 7:35 pm
Re: difference between feather 32u4 and feather M0
OK I use the same code for both 32u4 and M0
/* constants ================================================================ */
const int ledPin = 9; // ADC sample interval
const int ssPin = 10; // ADC enable/strob
double G = 1.08000; // Global gain adjust
double Os = 0.000350; // Global Offset adjust
const int chipSelect = 4; // SD card strob
I get this error just for the M0 platform...?
"" error: invalid conversion from 'uint8_t {aka unsigned char}' to 'BitOrder' [-fpermissive]
SPI.beginTransaction (SPISettings (speedMaximum, dataOrder, dataMode)); ""
/* constants ================================================================ */
const int ledPin = 9; // ADC sample interval
const int ssPin = 10; // ADC enable/strob
double G = 1.08000; // Global gain adjust
double Os = 0.000350; // Global Offset adjust
const int chipSelect = 4; // SD card strob
I get this error just for the M0 platform...?
"" error: invalid conversion from 'uint8_t {aka unsigned char}' to 'BitOrder' [-fpermissive]
SPI.beginTransaction (SPISettings (speedMaximum, dataOrder, dataMode)); ""
- adafruit_support_carter
- Posts: 29483
- Joined: Tue Nov 29, 2016 2:45 pm
Re: difference between feather 32u4 and feather M0
Post more lines of the output. The lines above that message should indicate what file is making the call to SPI.beginTransaction ().
Please be positive and constructive with your questions and comments.