6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Apr 27, 2024 8:49 pm

All times are UTC




Post new topic Reply to topic  [ 13 posts ] 
Author Message
PostPosted: Sun Jan 08, 2017 7:51 pm 
Offline
User avatar

Joined: Wed Sep 03, 2003 6:53 pm
Posts: 150
Location: Long Island, NY
I decided to pull out my SBC and my SwinSID again to see if I could get it to work. I found this post (http://forum.6502.org/viewtopic.php?p=37602#p37602) which seems to parallel my experience with it when I tried last time maybe a year ago.

Has anyone successfully gotten the SwinSID working outside of a direct replacement of a SID in a machine? If so, how did you do it? Maybe I missed something the first time so a working example would be helpful.

Thanks!

_________________
Rich Cini
Build Master and maintainer of the Altair32 Emulation project
http://cini.classiccmp.org
http://altair32.classiccmp.org


Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 09, 2017 5:32 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1681
Location: Sacramento, CA
RichCini wrote:
I decided to pull out my SBC and my SwinSID again to see if I could get it to work. I found this post (http://forum.6502.org/viewtopic.php?p=37602#p37602) which seems to parallel my experience with it when I tried last time maybe a year ago.

Has anyone successfully gotten the SwinSID working outside of a direct replacement of a SID in a machine? If so, how did you do it? Maybe I missed something the first time so a working example would be helpful.

Thanks!


Hi Rich,

I almost build a SwinSID during my SBC-3 build, but never did. Since it is AVR based and running at 24MHZ, I would guess that the PHI2 max supported is about 2MHz. My SBC-3 ran at 8MHz or higher. SBC-2 running at 1 or 2MHz should be good target.

Daryl

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 09, 2017 2:22 pm 
Offline
User avatar

Joined: Wed Sep 03, 2003 6:53 pm
Posts: 150
Location: Long Island, NY
Daryl --

Interesting, it doesn't use the system clock at all -- it's internally clocked. Address, data, /RES, /CS, power and audio signal out is it. Other than /RESET, it almost looks like write-only RAM (data, address and CS).

Rich

_________________
Rich Cini
Build Master and maintainer of the Altair32 Emulation project
http://cini.classiccmp.org
http://altair32.classiccmp.org


Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 09, 2017 3:14 pm 
Offline

Joined: Sat Jul 28, 2012 11:41 am
Posts: 442
Location: Wiesbaden, Germany
Since the SwinSID was made to replace the MOS 6581 chip the same limitations apply. On access chip select, read/write and address bits must be valid at least 350ns before data is read/written from/to the SID (on write data must be valid 80ns before the write cycle ends). That means your system may not run on a faster clock than 1 MHz at least for the time the SID is accessed.

_________________
6502 sources on GitHub: https://github.com/Klaus2m5


Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 09, 2017 6:30 pm 
Offline
User avatar

Joined: Wed Sep 03, 2003 6:53 pm
Posts: 150
Location: Long Island, NY
Agreed. The system has a 1MHz clock. I believe that the SwinSID puts out a sound at start-up, which I'm not getting. So, I'm trying to see what work has been done elsewhere to eliminate potential issues. I have mine on a breadboard with the amplifier section from the C64 (2N2222 and some passives).

_________________
Rich Cini
Build Master and maintainer of the Altair32 Emulation project
http://cini.classiccmp.org
http://altair32.classiccmp.org


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 10, 2017 3:12 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1681
Location: Sacramento, CA
Hi Rich,

Some brainstorming thoughts....

Did you purchase the SwinSID or make it yourself? From what I read, it is supposed to generate a 1000 Hz and 500 Hz tone on power up. If they are not being heard, I wonder if the program and/or the fuses are properly programmed. Also, can you check your output section using a 6522 serial port or other output to make sure it is functioning?

Daryl

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 10, 2017 12:50 pm 
Offline
User avatar

Joined: Wed Sep 03, 2003 6:53 pm
Posts: 150
Location: Long Island, NY
Daryl --

I bought it directly from the vendor rather than building it (it's the DIP-28 version so its the SwinSID Nano) so I hope it comes programmed.

I don't have it hooked to the SBC yet -- I'm just trying to get the power-up tones on the breadboard.

EDIT: I now get the start-up tone. If you look at the C64 schematic (attached), the audio output is amplified by a 2SC1815 or, in some versions, a PN2222. At the output of the amp there is a polarized electrolytic capacitor. If I connect my bench-top amplifier (simple LM386 amp from Radio Shack) to the "audio out", the tone is inaudible. If I connect right to the emitter, I hear the tone but have to turn the volume up kind of high. Similarly, if I connect right to the chip output, I get the tone with.

I'm not well-versed enough on the MEGA88, but I wonder why the stock amplifier circuit from a C64 doesn't work considering this is supposed to be a drop-in replacement. Maybe the PWM output level?


Attachments:
c64_amp.jpg
c64_amp.jpg [ 68.97 KiB | Viewed 7443 times ]

_________________
Rich Cini
Build Master and maintainer of the Altair32 Emulation project
http://cini.classiccmp.org
http://altair32.classiccmp.org
Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 11, 2017 4:14 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1373
Actually, single transisor in the C64 is not an amplifier. It's configured as an emitter follower. In short, it has an average gain of ~0.9 (a loss), but does provide a high impedance load to the SID and a low impedance output to whatever it drives.
If you have signal coming out of the SID but little to no output signal off the emitter then either the transistor is blown or it's biased to cutoff. You should have some D.C. Voltage on the base and a similar voltage on the emitter. The cap just blocks the D.C. To the output.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 11, 2017 5:04 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1681
Location: Sacramento, CA
I'm glad to hear the module is working. I'm sure getting the output fixed will be an easy fix. I look forward to hearing how the SBC interface goes.

Daryl

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 11, 2017 5:07 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8428
Location: Southern California
RichCini wrote:
EDIT: I now get the start-up tone. If you look at the C64 schematic (attached), the audio output is amplified by a 2SC1815 or, in some versions, a PN2222. At the output of the amp there is a polarized electrolytic capacitor. If I connect my bench-top amplifier (simple LM386 amp from Radio Shack) to the "audio out", the tone is inaudible. If I connect right to the emitter, I hear the tone but have to turn the volume up kind of high. Similarly, if I connect right to the chip output, I get the tone with.

I'm not well-versed enough on the MEGA88, but I wonder why the stock amplifier circuit from a C64 doesn't work considering this is supposed to be a drop-in replacement. Maybe the PWM output level?

If you get no signal at the output, and only a little at the emitter, it sounds like the output is shorted, and the small impedance of the capacitor in between is providing a slight load, and the output signal current times that impedance is developing a small signal voltage. That assumes the transistor is installed correctly. 25+ years ago at work, a circuit I designed came back from the board house and nothing at all worked. The new engineering manager (whom I had hired!) implied I was incompetent and didn't know what I was doing, and that it was a waste to have had boards made from my design. Then we figured out that the CAD operator who had laid out the board used the wrong transistor pinout, and all the transistors were connected wrong. After the tech removed them and re-soldering new ones with their leads twisted around to meet the errant board layout, everything worked right.

Back on track, take C13 out and see if you get a lot more signal at the emitter. If you do, the output is shorted. If the transistor is able to work in an analog range, ie, the PWM carrier is sufficiently filtered out, the DC voltage at the emitter should be about 2/3 of a volt below that of the base. FB15, R7, and C37 are apparently to filter out the PWM carrier. Its -3dB point is near the top of the hearing range. The 0.9x voltage gain (in spite of a lot of current gain) comes from the voltage divider at the base, formed by R7 and the AC impedance of the base, which is roughly the load (1K ideally, that of R38) times the current gain of the transistor which we can very roughly guess is 100. (Actually it's probably more.) 100K/(100K+10K) is about .9. (There's a little more to it, but the resistors have probably a 5% or 10% tolerance anyway; so getting into more detail with the transistor's curves would be more of interest to distortion than to getting a more accurate gain number.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 11, 2017 9:57 am 
Offline

Joined: Sat Jul 28, 2012 11:41 am
Posts: 442
Location: Wiesbaden, Germany
RichCini wrote:
If you look at the C64 schematic (attached), the audio output is amplified by a 2SC1815 or, in some versions, a PN2222.
You are aware, that these transistors do not have the same pin assignment? ECB vs. EBC!

_________________
6502 sources on GitHub: https://github.com/Klaus2m5


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 11, 2017 1:11 pm 
Offline
User avatar

Joined: Wed Sep 03, 2003 6:53 pm
Posts: 150
Location: Long Island, NY
Klaus2m5 wrote:
RichCini wrote:
If you look at the C64 schematic (attached), the audio output is amplified by a 2SC1815 or, in some versions, a PN2222.
You are aware, that these transistors do not have the same pin assignment? ECB vs. EBC!


Yes. Since I was breadboarding it I followed the data sheet for the PN2222. I guess it's possible I have a bad transistor from my parts box, too. Not sure I have any more 2222's but I happen to have 2N3904's in static bags. The 3904 has a lower current drive but I think would be an OK substitute at least for testing.

EDIT: I pulled out a 2N3904 and substituted it on the breadboard and it works perfectly with no volume issues. So, it must have been a bad 2222 after all. I might try to do a version of the SBC with a SID, but the circuit from the C64 requires 12v, which is not available on the board. Not sure if there's an alternative amp circuit I could use that doesn't need anything but 5v.

Thanks!

_________________
Rich Cini
Build Master and maintainer of the Altair32 Emulation project
http://cini.classiccmp.org
http://altair32.classiccmp.org


Top
 Profile  
Reply with quote  
PostPosted: Sun Apr 30, 2017 8:46 pm 
Offline
Site Admin
User avatar

Joined: Fri Aug 30, 2002 1:08 am
Posts: 280
Location: Northern California
8BIT wrote:
I almost build a SwinSID during my SBC-3 build, but never did. Since it is AVR based and running at 24MHZ, I would guess that the PHI2 max supported is about 2MHz.

I recently used an 8-bit AVR to implement an SPI slave. The fastest 8-bit AVR that I could find was 20 MHz but that was just fast enough to do what I needed. I was curious about the SwinSID running at 24 MHz, but it is mentioned on this page of the website. The AVR is overclocked.

_________________
- Mike Naberezny (mike@naberezny.com) http://6502.org


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: