YM3812 Part 1 – Register Basics

Post Categories:   Modules,YM3812 ModuleTags:   ,

8 thoughts on “YM3812 Part 1 – Register Basics

  • Great guide! Will be book marking this for future projects

  • Dude! I cannot tell you how excited for this project I am.. it’s like I’m knowing what you’re getting for Christmas and still having to wait for it to open your present. Thanks for all of great information and creating an exciting project for all of us sound nerd/fellow tinkerers out there.

  • Why set Chip Select to low to enable the chip? The datasheet said Chip Select to high to set data bus to high impedance.

    • Good question! Setting the chip select low enables the chip. The high impedance state is like the “off” state where the chip doesn’t interact with the bus.

  • hi, great video. thanks for that. just a question regarding the bus interface and timings. from your presentation at 9:40 you explain that A0 is going low before CS. but from the ym3812 datasheet the timing diagram says, that CS must be driven low after the address (a0) is stable. this is t_as (address setup) 30ns (min), which means CS 30ns after A0. am i wrong?
    currently i’, on debugging my sbc with ym3812… it works but the irq line is never driven low if a timer interrupt appears. the appropriate bits in status register are set, but from the hardware site. no irq line low at all :/ any ideas here?

    • You are 100% correct——not sure how I missed that! The data sheet definitely says that you need to set A0 low first. There is a second version of the data sheet that is a bit more comprehensive (google: “YM3812 Manual”) and it goes into more details on the timing characteristics. It appears that tas has a minimum of 10ns and tah has a minimum of 20ns. So you should definitely set A0 before CS and clear it after CS. All that said… I have always set them the other way around without any issues (which is probably why I never caught this before!)

      As for the IRQ, I’ve never actually used that feature. But, on page 23 of the application manual, they note that it has an open drain output. Are you using a pull-up resistor to keep the line high?

  • hi, many thanks, also for pointing me to the app manual. yes, we have a pull-up resistor in place. we’ll see…. regards.

  • This is great article!

    How did you generate the sinus wave with feedback? Is the feedback just added into the input with some delay? Or does the actual amplitude change the “time delta”? (as – if I’m correct, the Yamaha chips performs phase modulation rather than fully FM).

Leave A Reply

YM3812 Part 10 – Pitch BendYM3812 Part 9 – Synth CardYM3812 Part 8 – Velocity Sensitivity