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

Porting the library #2

Open
eduardokenj opened this issue Sep 1, 2022 · 8 comments
Open

Porting the library #2

eduardokenj opened this issue Sep 1, 2022 · 8 comments

Comments

@eduardokenj
Copy link

If possible port the library for another AVR microcontroller (ex: 328p)?

@veroxzik
Copy link
Owner

veroxzik commented Sep 2, 2022

Shouldn't be too much of an issue. I'll see if I can get to it this weekend.
I don't think I have anything other than a 328p to test though.

@veroxzik
Copy link
Owner

@eduardokenj Can you test this branch and let me know if it works? https://github.com/veroxzik/arduino-psx-controller/tree/feat/328p

@eduardokenj
Copy link
Author

eduardokenj commented Sep 26, 2022

Sorry for the delay, but the lib not work in 328p microcontrollers.
I got that error on my IDE, when i compile on 328p 8MHz (aka Pro Mini):
C:\Users\eduar\Documents\Arduino\libraries\arduino-psx-controller-feat-328p\src\arduino_psx.cpp: In member function 'void PSX_::init(int, bool, bool)':
C:\Users\eduar\Documents\Arduino\libraries\arduino-psx-controller-feat-328p\src\arduino_psx.cpp:36:19: error: 'SPR2' was not declared in this scope
SPCR |= (1 << SPR2) | (1 << SPR1); // Fosc/32 @8MHz==250KHz
^~~~
C:\Users\eduar\Documents\Arduino\libraries\arduino-psx-controller-feat-328p\src\arduino_psx.cpp:36:19: note: suggested alternative: 'SPR0'
SPCR |= (1 << SPR2) | (1 << SPR1); // Fosc/32 @8MHz==250KHz
^~~~
SPR0
image

And when compile the code okay on 328p 16MHz, i tested in my arduino pro mini and uno, in both situations PS1 and PS2 not work.

@djsedaw
Copy link

djsedaw commented Aug 17, 2024

Hi I'd like to add support for the joysticks if that's ok?

@veroxzik
Copy link
Owner

Hi I'd like to add support for the joysticks if that's ok?

@djsedaw Go for it.

@djsedaw
Copy link

djsedaw commented Aug 30, 2024

Hi, all going well, one question, do you think the micro has enough pins for 4 d-pad buttons, 4 on the right, start and select, L1 and L2, R1 and R2, L3 and R3 which are the buttons on the 2 joysticks, plus the 4 pins for the spi?

@djsedaw
Copy link

djsedaw commented Aug 30, 2024

I was looking at the raspberry pi Pico board which has enough pins but only 3 analog pins, which means I would need a ADS1115 to increase the analog pins

@djsedaw
Copy link

djsedaw commented Aug 30, 2024

Sorry 5 pins for the spi

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