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

Use different GPIO pins #13

Open
bbosilje opened this issue Jan 4, 2021 · 6 comments
Open

Use different GPIO pins #13

bbosilje opened this issue Jan 4, 2021 · 6 comments

Comments

@bbosilje
Copy link

bbosilje commented Jan 4, 2021

Hello there!

Firstly, thank you for making this and taking the time to document it and publish it. I easily got it working, even though I didn't have components and ruminated about the resistors. I just ended up trying a handy 10k potentiometer (set at 50%) and just sending the middle leg directly to GPIO17 (not my main question, but how bad an idea was that?)

Wondering though if it would be possible to use some other GPIO pin other than 4 for modulation?

I naively tried to change the value in GPIO::EnableClockOutput from 4 to 27 and moved that wire from pin 7 to pin 13, but that did not seem to work. Should it have? Is there something special about GPIO4 or are there other places that need to be tweaked other than just this section of code?

For context, I have a Pi with a GPS hat that I am using as my NTP server on my network. The hat uses GPIO4 for it's PPS signal to the Pi, so if I could move the modulation off of GPIO4, then this Pi could serve both purposes.

Thanks again,
Bob.

@seamusdemora
Copy link

seamusdemora commented Jan 4, 2021

@ bbosilje: Take a look at this "pin map" for RPi. It shows GPIO 4 is aka gpclk0. This search turns up some links that should explain things.

@bbosilje
Copy link
Author

bbosilje commented Jan 4, 2021

@seamusdemora Oh! Yeah, I see it now. I was on that pin map page, but the link you gave me highlighted the fact that GPIO5,6 are CLK1 and CLK2. I am going to try modifying the code block I use GPIO5 and see if that works. If so, then this would solve my problem. I will report back. Thanks!

@bbosilje
Copy link
Author

bbosilje commented Jan 5, 2021

@seamusdemora no dice. I tried to just change the 4 to a 5 in GPIO::EnableClockOutput and tried using pin 29 (also tried GPIO6 and pin 30 resp), and it did not work. I assume there are other code dependencies to use the other CLK pins. I will try to look, but if anyone has any pointers, I would appreciate it.

@seamusdemora
Copy link

I'd suggest you post a question to the RPi Stack Exchange site. One of the people there is the author of the PiGPIO lib, and no doubt this question has come up before.

@bbosilje
Copy link
Author

bbosilje commented Jan 6, 2021

I will have to study the code more. At this point, I wouldn't even know what to ask at the level of the library.

@seamusdemora
Copy link

@bbosilje 👍 Uh... I didn't mean to ask questions about the library per se. I was suggesting you post a question similar to the one you posted here. I only meant that there are a few folks there that are knowledgeable about GPIO issues.

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

2 participants