Porting the library #2

Open
opened 2022-09-01 15:07:42 +03:00 by eduardokenj · 8 comments
eduardokenj commented 2022-09-01 15:07:42 +03:00 (Migrated from github.com)

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

If possible port the library for another AVR microcontroller (ex: 328p)?
veroxzik commented 2022-09-02 03:23:25 +03:00 (Migrated from github.com)

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.

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 commented 2022-09-18 20:57:51 +03:00 (Migrated from github.com)

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

@eduardokenj Can you test this branch and let me know if it works? https://github.com/veroxzik/arduino-psx-controller/tree/feat/328p
eduardokenj commented 2022-09-26 03:38:16 +03:00 (Migrated from github.com)

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.

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](https://user-images.githubusercontent.com/7385867/192173705-c7f77156-47d7-46a3-84e9-e7beb82e9f2b.png) 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 commented 2024-08-17 11:44:27 +03:00 (Migrated from github.com)

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

Hi I'd like to add support for the joysticks if that's ok?
veroxzik commented 2024-08-19 03:26:35 +03:00 (Migrated from github.com)

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

@djsedaw Go for it.

> Hi I'd like to add support for the joysticks if that's ok? @djsedaw Go for it.
djsedaw commented 2024-08-30 10:55:26 +03:00 (Migrated from github.com)

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?

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 commented 2024-08-30 11:23:25 +03:00 (Migrated from github.com)

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

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 commented 2024-08-30 14:43:32 +03:00 (Migrated from github.com)

Sorry 5 pins for the spi

Sorry 5 pins for the spi
Sign in to join this conversation.