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

Writing data using 0.6 firmware stalls, while switched back to 0.4 works on my Arduino Pro Mini 3.3V #32

Open
fengye opened this issue Nov 27, 2023 · 3 comments

Comments

@fengye
Copy link

fengye commented Nov 27, 2023

Setup:

  • Arduino Pro Mini 328P 3.3V
  • Desoldered PS2's memory card port, same physical interface and pinout
  • Connected 1,2,4,5,6,7,8 pin from memory card port to corresponding Pro Mini pins and soldered to eliminate contact issue
  • Genuine 1Mbit Sony PS1 memory card

With this setup, the memcarduino with latest 0.6 firmware can read data using MemorycardRex without problem. However when it comes to format and write data, I cannot get it work, it always stuck in GUI. Using memocarduino.py has the same issue.

I noticed there was a 328P support break after merging in mega2560 support so I decided to switch to commit c8ca8b517cbc678d27727cf46a8524e1a6c97a19 to give it a go. And then writing operation works without issue, although I have to set the baudrate to 38400 legacy mode in MemorycardRex.

I initially though it could be the 3.3V power provided by my mini FTDI board isn't enough so I soldered external 3.3V to provide additional power, but that has no use helping firmware 0.6 to write data in my case.

@ShendoXT
Copy link
Owner

ShendoXT commented Nov 29, 2023

Try to use 0.6 sketch but change line:

SPI.beginTransaction(SPISettings(125000, LSBFIRST, SPI_MODE3)); to
SPI.beginTransaction(SPISettings(250000, LSBFIRST, SPI_MODE3));

That will bump the SPI speed to 250khz, as per standard. Maybe the card is picky about the speed, some are.

I changed it because there should be 1K pullups on each data line, same as on a real PSX but due to sake of simplicity
of not bothering users with complicated setups I dropped speed and that worked in my tests with genuine and fake cards, with some exceptions...

@fengye
Copy link
Author

fengye commented Dec 21, 2023

Hi sorry for the late reply. I just got more spare official PS1 memory cards to test with. Unfortunately setting to 250k doesn't work for me on those genuine cards. Do you think install the pullups will help? Do you have more details on which data lines and what voltage they needed to be pulled up?

@ShendoXT
Copy link
Owner

ShendoXT commented Dec 23, 2023

Installing pull-ups should help, yes. Put 1K external pull-ups to 3.3V on Cmd, Data, Att, Clk and Ack lines.
You can try with both 125 and 250 khz, 250 being the spec.

What I find strange is that you said 0.4 works. If all else fails and 0.4 is working properly don't worry,
apart for more board support and faster serial there is no real benefit on 0.6 in communication with Memory Card.

If you change Serial.begin(38400) to Serial.begin(115200) you will get all the benefit of 0.6 on 0.4 with working writes.

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