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

Decrease tDW #3

Merged
merged 1 commit into from Dec 28, 2023
Merged

Decrease tDW #3

merged 1 commit into from Dec 28, 2023

Conversation

berarma
Copy link
Contributor

@berarma berarma commented Dec 27, 2023

I've made this change so the signals comply with the timing specifications for tDW. I did this while trying to read/write unused bits in a YM2149F without success. It didn't help but I thought I would share it in case anyone needs a faster write.

I've been told the reading of unused bits might depend on the exact reference, YM2149F or YM2149G.

On Arduino Uno, tDW goes from 15.208us to 4.625us.

@Andy4495
Copy link
Owner

Interesting... the AY data sheet does not specify a max value for tDW, but the YM data sheet does.

I originally designed this library specific to the AY chips and didn't notice that the YM chips differed in this way.

I'll run a few quick tests on my setup, merge the change, and publish a new release in the next day or so.

Thanks.

@berarma
Copy link
Contributor Author

berarma commented Dec 28, 2023

The comments in the code about the tDW were already there. And the datasheet I'm using for the AY has the tDW max. No worries though, I'm saying only for clarity.

I was using Arduino IDE 1.8.19 since that's what shipped with my system. I've upgraded to Arduino IDE 2.2.1 and now I get tDW = 4.5us. Without this PR the tDW is still 15us or 22us.

With the old Arduino IDE I noticed that the if statement produced sometimes higher tDW values of about 12 us. Without the if statement the timing was more reliable. I'm not noticing the same with the new IDE v2. But I warn you.

@Andy4495 Andy4495 self-assigned this Dec 28, 2023
@Andy4495
Copy link
Owner

Good point; I must have been looking at a different version of the AY datasheet than the one I link to in my README. After doing a little research, it seems like the max tDW value was removed from later versions of the AY datasheet (the 1980 data book has the max value; the 1982 does not). I'll add more info to my readme along with additional links to different versions of the data sheet. Also, before I publish a new release, I may remove those if statements and make a few other updates to the code. Thanks for the suggestion; I'm merging this pull request now.

@Andy4495 Andy4495 merged commit 219f16d into Andy4495:main Dec 28, 2023
@berarma
Copy link
Contributor Author

berarma commented Dec 28, 2023

Great. Thank you!

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

Successfully merging this pull request may close these issues.

None yet

2 participants