YM2612 write/read/register select
Posted: Fri Sep 14, 2012 1:21 pm
Hi all, this is my first post here!
I'm doing some hardware interfacing between a YM2612 and a Teensy++, but I'm having a little trouble getting started. I hope you can help.
I expected that I would be able to select register 22h, then write 0x0F (pins 0, 1, 2, 3 high and pins 4, 5, 6, 7 low), then select 22h again and read from it. I was expecting to get 0x0F back. Instead I appear to get all zeroes every read.
Should this work? If I read, should I see the contents of the currently selected register?
This is my process:
1. Reset pin high, CS pin low (these will never change)
2. RD high, WR high, A0 low, A1 low
3. Write 22h on the 8 data pins
4. RD high, WR low, A0 high, A1 low
5. Write 0x0F on the 8 data pins
6. RD high, WR high, A0 low, A1 low
7. Write 22h on the 8 data pins
8. RD low, WR high, A0 high, A1 low
9. Read the 8 data pins
Is this correct?
Thank you for taking the time to read my post! I really appreciate it.
I'm doing some hardware interfacing between a YM2612 and a Teensy++, but I'm having a little trouble getting started. I hope you can help.
I expected that I would be able to select register 22h, then write 0x0F (pins 0, 1, 2, 3 high and pins 4, 5, 6, 7 low), then select 22h again and read from it. I was expecting to get 0x0F back. Instead I appear to get all zeroes every read.
Should this work? If I read, should I see the contents of the currently selected register?
This is my process:
1. Reset pin high, CS pin low (these will never change)
2. RD high, WR high, A0 low, A1 low
3. Write 22h on the 8 data pins
4. RD high, WR low, A0 high, A1 low
5. Write 0x0F on the 8 data pins
6. RD high, WR high, A0 low, A1 low
7. Write 22h on the 8 data pins
8. RD low, WR high, A0 high, A1 low
9. Read the 8 data pins
Is this correct?
Thank you for taking the time to read my post! I really appreciate it.