Tagged: analog input, digital input, esp32, PINS, Saola M1
- This topic has 7 replies, 2 voices, and was last updated 4 years, 1 month ago by
Renzo Mischianti.
-
AuthorPosts
-
-
12 March 2021 at 12:35 #10784
Hello,
I am really new to the word of MCU and how to work on them. I am working on a project for my thesis and I have decided to use the ESP32 S2 Saola board with the ADS1294 sensor to produce an ECG.
My sensor takes analog inputs and through an internal delta sigma ADC I get a digital output. In order to connect my sensor to the Saola board I should use the 33-34-35-36 pins?
Does this pins(33 to 36) represent the SPI interface? And what exactly is the use of the 46 pin ?
Thanks in advance for your time!
Orestis V.
-
12 March 2021 at 15:35 #10785
Hi Orvasson,
the SPI protocol pins are
static const uint8_t SS = 34;
static const uint8_t MOSI = 35;
static const uint8_t MISO = 37;
static const uint8_t SCK = 36;from 34 to 37.
The pin 46 is a simple pin but can’t used for output for some HW limitation, you can use It only in digital input.
Bye Renzo
-
12 March 2021 at 19:56 #10790
Hi Renzo
Thank you very much for your response!
I would like to ask you one more thing. If I want to connect through I2C I should use the pin 8(SDA) and 9 (SDL)? Can I connect two different modules through I2C on the same pins?
Can I configure somehow other pins so I can have more I2C connections to my board?
Thanks in advance for your time!
Orestis V.
-
21 March 2021 at 11:44 #10987
paloy57
hi Orvasson
Each I2C module has a specific address, read the wikipedia page. You can connect a lot of module at the same pins
Pascal
-
21 March 2021 at 12:41 #10988
Hi Orvasson,
I had lost your message (I need a moderator).But what Paloy said is correct, you can connect various i2c devices and communicate with them via the device address.
Some devices have the address configurable through pins such as the various pcf8574 pcf8591 etc ..
PCF8574 i2c digital I/O expander
other can be programmed via code, other have fixed address.
You can check the address of the devices connected with a simple program like this:
/* * i2c scanner * Renzo Mischianti www.mischianti.org */ #include <Wire.h> void setup() { Wire.begin(); Serial.begin(115200); while (!Serial) {delay(100);}; Serial.println(); Serial.println("I2C Scanner"); } void loop() { byte error, address; int nDevices; Serial.println("Scanning..."); nDevices = 0; for(address = 1; address < 127; address++ ) { Wire.beginTransmission(address); error = Wire.endTransmission(); if (error == 0) { Serial.print("I2C device found at address 0x"); if (address<16) { Serial.print("0"); } Serial.println(address,HEX); nDevices++; } else if (error==4) { Serial.print("Unknow error at address 0x"); if (address<16) { Serial.print("0"); } Serial.println(address,HEX); } } if (nDevices == 0) { Serial.println("No I2C devices found\n"); } else { Serial.println("done\n"); } delay(5000); }
Bye Renzo
-
22 March 2021 at 13:20 #10999
Hello Renzo and paloy57
Thank you for your time and response. I had misunderstood the principals behind I2C and SPI. Really appreciate your help.
Orestis
-
2 April 2021 at 15:03 #11268
Hello again,
I have a new question to make. Due to the high power consumption on the microsd cards I have turned my attention to a NAND Flash memory( TC58CVG2S0HRAIJ ).
Can the Saola board support a 4gb NAND flash memory? How can I understand which are the limits of the board in terms of external memory?
Thank you in advance!
-
2 April 2021 at 23:38 #11277
Hi Orvasson,
The flash memory use a SPI protocol, if I remember exist a specified library to simplify the usage without limitation.
Bye Renzo
-
-
-
AuthorPosts
- You must be logged in to reply to this topic.