danielrfry / opl2sd1

OPL-compatible driver for Yamaha YMF825 (SD-1)
MIT License
36 stars 5 forks source link

Assign separate pins for visualization led lights. #20

Open denjhang opened 1 year ago

denjhang commented 1 year ago

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_(KM`4FG_tmb SI7M)`~QXYQ_)V0P8}64~O6_tmb

danielrfry commented 1 year ago

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:

...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?

denjhang commented 1 year ago

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.

danielrfry commented 1 year ago

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.