Skip to content
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

SOLVED: Question about I2S and I2C #27

Closed
ennio64 opened this issue Jun 20, 2022 · 3 comments
Closed

SOLVED: Question about I2S and I2C #27

ennio64 opened this issue Jun 20, 2022 · 3 comments

Comments

@ennio64
Copy link

ennio64 commented Jun 20, 2022

Hallo
I'm trying to create map file for a MKS Tinybee board.
I assigned GPIO pin at X_lim, Y_lim, Z_lim, A_lim, B_lim, Probe, Feed Hold and Cycle Start and work well.
I use the I2S pin for the stepper motor (XYZAB) and all work well.
I use the I2S pin also for the other signals (flood, mist ,spindle enable and spindle direction) but not work.
I think, but I'm not sure, that I2S is dedicated only to stepper.
Now I will try to connect this signals with I2C IOEXPAND (I order the adapter), and I would like to change the default I2C pins (GPIO 22 (SCL) and GPIO 21 (SDA)) with GPIO 4 (SCL) and GPIO 0 (SDA), it's possible?
Every answer is appreciated. Thank's

@terjeio
Copy link
Contributor

terjeio commented Jun 20, 2022

I use the I2S pin also for the other signals (flood, mist ,spindle enable and spindle direction) but not work.

Did you change driver.c for that? Try DIGITAL_OUT/DIGITAL_IN instead of gpio_set_level/gpio_get_level for those pins.

Now I will try to connect this signals with I2C IOEXPAND (I order the adapter), and I would like to change the default I2C pins (GPIO 22 (SCL) and GPIO 21 (SDA)) with GPIO 4 (SCL) and GPIO 0 (SDA), it's possible?

You can try? Here is how it is configured in a board map:

// Define I2C port/pins
#define I2C_PORT                I2C_NUM_1
#define I2C_SDA                 GPIO_NUM_21
#define I2C_SCL                 GPIO_NUM_22
#define I2C_CLOCK               100000

@ennio64
Copy link
Author

ennio64 commented Jul 22, 2022

mks_tinybee_1_0_map.zip
SOLVED
I change driver.c and work.
Thank's Terje Io

@ennio64 ennio64 changed the title Question about I2S and I2C SOLVED: Question about I2S and I2C Jul 22, 2022
@terjeio terjeio closed this as completed Sep 27, 2022
@SphaeroX
Copy link

SphaeroX commented Feb 12, 2024

i got a question, not related to the ticket. how can i single control these pins for another project... makerbase-mks/MKS-TinyBee#113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants