IEC example circuit please

User avatar
yellperil
Posts: 24
Joined: Mon May 25, 2020 2:08 am
Has thanked: 1 time
Been thanked: 5 times
Contact:

IEC example circuit please

Unread post by yellperil »

Has anyone implemented/tested the new IEC interface out to real hardware yet?

I'm a bit confused as to how it would work?

I've built one in my custom c64 core using separate Data (in/out) and Clock (in/out) lines like this https://ist.uwaterloo.ca/~schepers/MJK/serialbus.html

But I don't know how to do it with the lines already combined. Is it simply just whack a logic level converter in and that's it?
I'm assuming it is reliant on the version of the I/O board with pull ups on it.
jalbarracin
Posts: 49
Joined: Fri Apr 02, 2021 9:11 pm
Has thanked: 3 times
Been thanked: 7 times

Re: IEC example circuit please

Unread post by jalbarracin »

What I understand is that original C64 pins are 5V and MiSTEr works with 3.3V
Hope somebody can clarify this.
User avatar
yellperil
Posts: 24
Joined: Mon May 25, 2020 2:08 am
Has thanked: 1 time
Been thanked: 5 times
Contact:

Re: IEC example circuit please

Unread post by yellperil »

I've had a go at the circuit but the looking at signals coming out of the FPGA they are at all LOW with no activity on the bus,
They need to be inverted to HIGH so they can be pulled down. ie HIGH being 0 and LOW being 1.

Is there some trickery in the FPGA to be able to Invert them like the 7406?

EDIT : Actually the signals are high, but when I access the external drive they all get pulled low and stay low until the drive is reset.
User avatar
aberu
Posts: 686
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 146 times
Been thanked: 187 times
Contact:

Re: IEC example circuit please

Unread post by aberu »

yellperil wrote: Thu Jun 10, 2021 7:55 am I've had a go at the circuit but the looking at signals coming out of the FPGA they are at all LOW with no activity on the bus,
They need to be inverted to HIGH so they can be pulled down. ie HIGH being 0 and LOW being 1.

Is there some trickery in the FPGA to be able to Invert them like the 7406?
It depends upon if that pin as assigned to the FPGA is compatible with "inout" (verilog/systemverilog) or capable of being an input and/or output. You can also set any of these pins to either in our out. The problem is, if the pins you are using are assigned to the user IO port and they are static in the framework, you may need to adjust the framework side of things in "/sys/" for the template to do this. Your results my vary, proceed carefully.

https://github.com/MiSTer-devel/Templat ... op.v#L1410

I believe this is one of the relevant sections.

I'm not a dev though, so hopefully someone else can weight in and elaborate.
Andre
Posts: 5
Joined: Tue Aug 04, 2020 3:19 pm

Re: IEC example circuit please

Unread post by Andre »

Can this one be compatible ??
https://myoldcomputer.nl/commodore-64/xum1541-promicro/
with a 7406.
User avatar
yellperil
Posts: 24
Joined: Mon May 25, 2020 2:08 am
Has thanked: 1 time
Been thanked: 5 times
Contact:

Re: IEC example circuit please

Unread post by yellperil »

Embarrassed, pulled it all apart and had another go with colour coded wire and it works a treat, as per the doco.
jalbarracin
Posts: 49
Joined: Fri Apr 02, 2021 9:11 pm
Has thanked: 3 times
Been thanked: 7 times

Re: IEC example circuit please

Unread post by jalbarracin »

Can you share the color codes or any link where I can learn how to make my own? Thank you!
jalbarracin
Posts: 49
Joined: Fri Apr 02, 2021 9:11 pm
Has thanked: 3 times
Been thanked: 7 times

Re: IEC example circuit please

Unread post by jalbarracin »

Also, can you explain which board pins do I need to wire? or do I need to connect them to the "USB 3.0" connector?
User avatar
yellperil
Posts: 24
Joined: Mon May 25, 2020 2:08 am
Has thanked: 1 time
Been thanked: 5 times
Contact:

Re: IEC example circuit please

Unread post by yellperil »

Sorry for the delay I have been compiling all of my notes.

You can read about it here : https://8bitshardway.blogspot.com/2021/ ... or-to.html
jalbarracin
Posts: 49
Joined: Fri Apr 02, 2021 9:11 pm
Has thanked: 3 times
Been thanked: 7 times

Re: IEC example circuit please

Unread post by jalbarracin »

GREAT INFO !! BEST BEST!!
yellperil wrote: Mon Jul 19, 2021 1:10 pm Sorry for the delay I have been compiling all of my notes.

You can read about it here : https://8bitshardway.blogspot.com/2021/ ... or-to.html
User avatar
yellperil
Posts: 24
Joined: Mon May 25, 2020 2:08 am
Has thanked: 1 time
Been thanked: 5 times
Contact:

Re: IEC example circuit please

Unread post by yellperil »

I got my PCB today for my IEC bus / C128 keyboard board. Works very well . . . for me at least.

Image
User avatar
venice
Posts: 325
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 115 times
Been thanked: 88 times

Re: IEC example circuit please

Unread post by venice »

Many Thanks.
Got my SD2IEC, just for fun ;), running with the notes from your blog.
I use my SNAC Adapter for voltage level conversion (MiSTer 3.3v <=> 5.0v SD2IEC).

I found a matching cable color diagramm here: https://de.wikipedia.org/wiki/Universal ... dernfarben
and here https://en.wikipedia.org/wiki/USB_3.0#Pinouts
My MiSTer Display-Add-On-Projects on Github tty2oled, i2c2oled
Donate via Postcard-Ware if you like.
jalbarracin
Posts: 49
Joined: Fri Apr 02, 2021 9:11 pm
Has thanked: 3 times
Been thanked: 7 times

Re: IEC example circuit please

Unread post by jalbarracin »

Help needed: Please help me explaining where in the misterfpga is the USB3.0 port where I should connect the IEC expansion cable?
Thank you!
Found this image but can't find the usb3.0 port:
1366_2000.jpg
1366_2000.jpg (212.5 KiB) Viewed 193 times
User avatar
venice
Posts: 325
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 115 times
Been thanked: 88 times

Re: IEC example circuit please

Unread post by venice »

You need an IOBoard. The USB 3.0 connector is the Serial IO Port.
See https://github.com/MiSTer-devel/Main_Mi ... i/IO-Board and https://github.com/MiSTer-devel/Main_Mi ... Serial-IO)
My MiSTer Display-Add-On-Projects on Github tty2oled, i2c2oled
Donate via Postcard-Ware if you like.
jalbarracin
Posts: 49
Joined: Fri Apr 02, 2021 9:11 pm
Has thanked: 3 times
Been thanked: 7 times

Re: IEC example circuit please

Unread post by jalbarracin »

Thank you venice!! I was lost here. best!
venice wrote: Wed Nov 24, 2021 2:23 pm You need an IOBoard. The USB 3.0 connector is the Serial IO Port.
See https://github.com/MiSTer-devel/Main_Mi ... i/IO-Board and https://github.com/MiSTer-devel/Main_Mi ... Serial-IO)
Post Reply