danielrfry / opl2sd1

OPL-compatible driver for Yamaha YMF825 (SD-1)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assign separate pins for visualization led lights.

denjhang opened this issue · comments

Currently I'm connecting the CS wire directly to the LED light, but this creates noise, so I'd like to use other pins to drive the LED light independently to visualize the CS signal.
BA@7R U447B%6M_(KM4FG_tmb
SI7M)`QXYQ_)V0P8}64O6_tmb

I've added this to help you test your hardware, but I'd prefer not to merge it into the main branch of this project, as I'd like to keep it independent of any specific hardware (apart from the test circuit included in the repository).

https://github.com/danielrfry/opl2sd1/actions/runs/4843862553

The pins used are:

  • CS_L: 10
  • CS_R: 11
  • CS_L2: 12
  • CS_R2: 13

...and are active low like the SD-1 CS pins.

I'm surprised that connecting LEDs to the CS pins creates noise - I would expect there to be very little current flowing into the SD-1 via that route. Are the LED and SD-1 ground paths separated?

The way I use CS to drive LED is very simple, you see this schematic:
截图未命名0430202850
The power supply of 3V3 and YMF825 is separated here, and I use a 100r inductor for separation.Of course, if you have a better way (such as using a transistor to drive an LED), then I'm willing to modify that as well.

Ah, I have only the most basic knowledge of electronics! I've fixed similar noise issues in my projects by ensuring sensitive components have physically separate paths to ground. But I guess that is not applicable in this case because the GPIO pin is the current sink.