6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 11:35 pm

All times are UTC




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Micro-KIM?
PostPosted: Thu Aug 01, 2013 3:04 am 
Offline
User avatar

Joined: Wed May 30, 2012 7:45 pm
Posts: 58
Location: Dallas, TX
I actually stumbled upon this in one of the hardware articles on this forum.
I'm wondering if I should just shell out the $100 to save myself hours of work. If you've read some of my other posts,
I'm not a hardware expert. I am however a software enthusiast.

I'm just not happy with emulation. Something about it bugs me. I want to play around with applications on a REAL 6502.

However, I don't know much about the Micro-Kim kit. And, the website doesn't have a ton of info. I'm wondering if this will
be worth the money. Can I use it to write my own software? Any suggestions in this area?

Thanks

PS: I really hope this doesn't start a flame war...

_________________
http://www.thestarrlab.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Micro-KIM?
PostPosted: Thu Aug 01, 2013 3:48 am 
Offline

Joined: Sat Dec 13, 2003 3:37 pm
Posts: 1004
I've seen the site, I've not seen the kit, I've read through the PDF, and I used to own an original KIM-1.

I am not an electronics expert, but assembly of the kit seems straightforward. You can also buy it assembled, but frankly I think it should be simple enough to make it worth putting together.

I never had mine hooked up to a teletype, I just used the keypad and the cassette interface (which always seemed to work just find for me). I actually still have the tape around here somewhere. Mostly I keyed in programs from the First Book of KIM, and dabbled with lighting up LEDs off of the I/O lines. Pretty sure I fried one when I shot 9v into it one day. It also pretty much turned the TV to snow whenever I turned the thing on :).

I think if you're mostly interested in software, it's a pretty cool piece of kit. Having the serial port handy so you can use the TTY portion of the KIM monitor is a bonus, because you can use that to save and load programs (via your terminal emulator) so as to not have to fuss with a cassette tape.

But you can still dabble with hand assembly and keying in things through the keypad. The keypad interface worked, it was much better than the switches on the front panel of an IMSAI -- that was simply painful. But I bet you may fall in to simply using the keyboard over the keypad.

You can use an assembler to create programs, but you may have to write some simple scripts to convert them in to a dump format that the KIM can understand -- I imagine that's pretty trivial work.

From a hardware point of view, what I like about the Micro KIM is that for $100 + a soldering iron and multimeter (and maybe a power supply not sure if it comes with one or not), you (ideally) have an up and running, compact 6502 SBC.

You don't need the other paraphernalia that goes with building circuits from scratch: wire wrap sockets or bread boards or PC board designs. You don't need an EPROM programmer (or some other mechanism). You don't even need an assembler on day 1 just to get the thing started and lit up. Get it on Friday, I bet you're up and keying in programs sometime on Sunday.

But, if you find you like the hardware stuff, well you can always grow in to that. It comes with an EPROM, so you can wipe it and put something else there, or just burn a new one. The chips are socketed, so you can use them in your own design. You can build an expansion card and make lights blink or add a SD-Card reader, or whatever you like.

In this way I think the KIM, plus this site, can be a gateway in to getting more into hardware. Early, incremental successes, with a low up front outlay of dollars and time. Probably get everything you need from scratch for $200.

The "worst" thing about the KIM, in contrast to perhaps a custom machine, is that the ROM and I/O are in the "middle" of the memory map, $1700-$1FFF, whereas on most other machines, that's all crammed up at the top end of the system.

That's an idiosyncrasy of the design, and you'll likely not be able to change that without some significant hacking. But by that time you'd probably be comfortable enough to just start over and wire up something from scratch.

I've thought about it, I haven't pulled the trigger. I may well still do this.

I was perhaps where you were, and I instead wrote my own simulator, that helped scratch the itch in interesting ways.


Top
 Profile  
Reply with quote  
 Post subject: Re: Micro-KIM?
PostPosted: Thu Aug 01, 2013 6:02 am 
Offline
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 904
I agree that emulators just don't feel right.

FPGA-based systems however do feel right. I've been spending a lot of time with 6502 systems on small FPGAs. My current favorite system has the smallest Xilinx FPGA available and 128K RAM. The FPGA hosts Arlet's core, a UART and IO decoding and is only 1/2 full. It runs at 50MHz.

Because it's fully reconfigurable I can move the memory map around as I see fit and add IO devices as I need them. I can set it up as a KIM or any other machine.

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
 Post subject: Re: Micro-KIM?
PostPosted: Thu Aug 01, 2013 1:50 pm 
Offline
User avatar

Joined: Wed May 30, 2012 7:45 pm
Posts: 58
Location: Dallas, TX
@whartung

I think you've made some good points. Although I have breadboards and a collection of ICs and discrete components, I have very little experience using them. I understand the basics of data / address buses. But, the glue-logic and address decoding is a bit daunting. I have studied logic gates, but have yet to use them in a practical application - unless you consider switches and LEDs practical :D

I suppose I have to study more, but once again, I'm not nearly as interested in hardware as I am software.

I got about halfway through a assembler / simulator of my own written in C++. I lost interested because there are many assemblers out there. I must say, it taught me a ton about assembly though.

@enso

This is also interesting. Are these configurable ICs that behave like 6502s? Or, is it some sort of clone?

_________________
http://www.thestarrlab.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Micro-KIM?
PostPosted: Thu Aug 01, 2013 8:10 pm 
Offline

Joined: Sat Dec 13, 2003 3:37 pm
Posts: 1004
The FPGA (Field Programmable Gate Array) is basically a chip with a zillion NAND gates (or at least some kind of gates, if not NAND). When it comes to discrete logic, these gates are the "atoms" from which more complicated circuits are built upon (you can pretty much build "anything" with enough NAND gates).

Programming a FPGA is like downloading the wires that connect all of the gates together. So you can download the wires that connect up some gates and turn it in to a flip flop. Now the FPGA chip acts like a flip flop.

Since they can hold lots of gates, you can download entire CPUs, which are basically just complicated discrete logic circuits. There are several files that happen to implement a 6502 CPU. These are some times called "cores", as in a "6502 core". I can't speak as to the specifics of what make a collection of connections a core or not, may be just a term of art.

Anyway, basically, in the end, instead of wiring together a bunch of chips on a bread board, you synthetically wire them together in the gate array. The circuits are effectively the same, from a schematic point of view (to a point, I don't know if they need to use things like capacitors and what not like we do with normal circuits -- I doubt it).

Obviously there's software involved in creating the artifact that you download to the chip, and the supporting infrastructure to connect the chip to the host etc.

In the end, instead of something that looks like the KIM, you would have a piece of PC board with a single chip in the middle of it, with wires going off to any external component necessary for interfacing (like a serial port, or a keyboard). But the FPGA has the CPU, the RAM, clocks, I/O ports, etc.

Of course the neat part is when your sick of the 6502 you can download a 6809 or a Z80 in to it :).

As I've mentioned before, it truly challenges what you visualize a "computer" to be.

I think it was enso that was suggesting selling a pre-programmed FPGA with a 50Mhz 6502 running on it.

There's another one who has another chip with a 6502 simulator running on it. It's pretty clever. So, I don't know if that changes the feel of it or not :).


Top
 Profile  
Reply with quote  
 Post subject: Re: Micro-KIM?
PostPosted: Thu Aug 01, 2013 9:34 pm 
Offline
User avatar

Joined: Wed May 30, 2012 7:45 pm
Posts: 58
Location: Dallas, TX
Sounds pretty awesome to me! Where can one purchase such an item?

_________________
http://www.thestarrlab.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Micro-KIM?
PostPosted: Fri Aug 02, 2013 1:55 am 
Offline
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 904
There are a few cheap devboards out there for under $100.

I am working on DILDAR-50, a really cheap ($20-25) little board with a 50MHz 6502 (Arlet's core), 128K SRAM, and about 30 IO pins, including a UART, an SD card interface, and a bunch of parallel IO. I have a working prototype running FIG-FORTH and hope to have a few extras boards available for members of this forum, sometime in September.

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
 Post subject: Re: Micro-KIM?
PostPosted: Fri Aug 02, 2013 5:26 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
whartung wrote:
The FPGA (Field Programmable Gate Array) is basically a chip with a zillion NAND gates (or at least some kind of gates, if not NAND). When it comes to discrete logic, these gates are the "atoms" from which more complicated circuits are built upon (you can pretty much build "anything" with enough NAND gates).

The low-level elements in the FPGA are actually lookup tables. Each lookup table has a number of inputs (typically 4 or 6), and one output. Each lookup table is basically a small memory. The inputs acts as the "address bus", and the output is a single bit of data.

The 3S50 FPGA that enso uses has 4 inputs per lookup table, so each element is a 16-bit RAM, and it can implement any logic function up to 4 inputs at the same speed. This means that a simple 2-input NAND takes the same amount of resources as a 2->1 MUX, or a 1+1 bit full adder.

Another major building block is the flip flop. About half of the outputs from the lookup tables feed directly into a flip flop.

In addition to these basic building blocks, there can be additional elements like MUXes (to build larger logic functions), shift registers, memories, carry chain logic, multipliers, PLLs.


Top
 Profile  
Reply with quote  
 Post subject: Re: Micro-KIM?
PostPosted: Fri Aug 02, 2013 1:19 pm 
Offline
User avatar

Joined: Wed May 30, 2012 7:45 pm
Posts: 58
Location: Dallas, TX
@enso

Where did you get your 3S50 FPGA? I've tried searching around, but the only ones I've found are about $100 and I don't know enough about this stuff to just go buy anything.


Thanks,

_________________
http://www.thestarrlab.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Micro-KIM?
PostPosted: Fri Aug 02, 2013 1:31 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
See for example http://www.digikey.co.uk/product-detail ... ND/1756100 and http://www.digikey.co.uk/product-detail ... ND/1956974
but soldering could be a challenge. Did you want a chip, or a board with a chip on it? We have a topic about FPGA dev boards: viewtopic.php?f=10&t=1787

Cheers
Ed


Top
 Profile  
Reply with quote  
 Post subject: Re: Micro-KIM?
PostPosted: Fri Aug 02, 2013 5:12 pm 
Offline
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 904
As I wrote elsewhere, 0.5mm QFPs are the hardest chips to solder, harder than BGAs.

You will also need a configuration flash chip, XCF01, and an oscillator to create a minimal system.

Contact me if you want a bare board.

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
 Post subject: Re: Micro-KIM?
PostPosted: Fri Aug 02, 2013 7:23 pm 
Offline
User avatar

Joined: Mon Apr 23, 2012 12:28 am
Posts: 760
Location: Huntsville, AL
If you plan on building your own board, I would recommend the Spartan 3A family.

There are some differences in the amount of block RAM between the various Spartan 3 FPGA families, of which there are five: Spartan 3, Spartan 3E, Spartan 3A, Spartan 3AN, and the Spartan 3A DSP. All are good parts.

I have been working most recently with the Spartan 3A XC3S50A and XC3S200A in a 100-pin 0.5mm pitch QFP. In this package, the parts are interchangeable. Enso has a number of the Spartan 3 XC3S05 parts in the TQFP-144 package. That FPGA is more expensive (at Digi-Key) than the corresponding XC3S50A component. The XC3S50 has a bit more block RAM than the XC3S50A, but the XC3S50A-4VQ100 is $6.2 and the XC3S50-4VQ100 is $10.10.

On my card, I am able to use an SPI Serial EPROM which is much cheaper than the Xilinx XCF01S. There's nothing wrong with the XCF01, but Xilinx is trying to move out of the configuration EPROM business. The Winbond W25Q80BVDIAG is a DIP-8 part that is priced at $0.56 and the XCF01S is priced at $3.15 in an SO-20 package. The Winbond is an 8 Mbit part and the Xilinx part is a 1 Mbit part.

Should you want or need to change from a 50k gate FPGA to a 200k gate FPGA without changing your board, then the VQ100 package provides an easy migration path. The Winbond part also provides sufficient storage to support the larger FPGA. The 128kB of the XCF01S is insufficient to support the larger XC3S200A part, which requires roughly 1.2 Mbits to hold its configuration bit stream.

I will note that JTAG programming of the Winbond is possible, but it is an indirect method. Programming the XCF01S/XCF02S via the FPGAs JTAG programmer is direct. For the XCF01S/XCF02S, both the serial configuration device and the FPGA can be daisy-chained on the same JTAG interface. The programmer will simply program the XCF01S/XCF02S instead of the FPGA. Reprogramming the FPGA or the XCF01S/XCF02S is simply a matter of selecting the appropriate device on the GUI.

Programming the Winbond part (or one of several other standard SPI serial EPROMs from several manufacturers) is indirect. The tools provide a way to create a programming file for a standard EPROM programmer. That file is created from the bit stream file for the FPGA. After "attaching" an SPI EPROM to the FPGA in the programmer, the serial EPROM is selected for programming. The tools actually load a configuration file that connects to the external SEEPROM and programs it from the FPGA. Data is transferred to this Xilinx provide tool over JTAG, it in turn uses an SPI master interface to program the part.

Setting some mode pins on the FPGA changes the FPGA to expect the serial configuration from an SPI SEEPROM. So on boot, the FPGA sends the read opcode to the SEEPROM and an address of all 0s. In this manner, these SPI SEEPROMs load the FPGA. The unused space in the SEEPROM can then be easily used by the user for other program/data storage.

_________________
Michael A.


Top
 Profile  
Reply with quote  
 Post subject: Re: Micro-KIM?
PostPosted: Fri Aug 02, 2013 9:06 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Would the Spartan 3AN be a good choice for simplicity, because you don't need the storage chip?


Top
 Profile  
Reply with quote  
 Post subject: Re: Micro-KIM?
PostPosted: Sat Aug 03, 2013 12:09 am 
Offline
User avatar

Joined: Mon Apr 23, 2012 12:28 am
Posts: 760
Location: Huntsville, AL
The only thing is that the only one of the family in a QFP is the XC3S50AN.

As enso has demonstrated with his development board, Arlet's core and a UART can be fitted. The XC3S50 that he uses has 4 2k x 8 Block RAMs instead of the three Block RAMs of the XC3S50A/AN. The availability of the extra 2kB may be sufficient for a project like a Micro-KIM. Enso has included additional RAM on his board which should allow more flexibility for larger applications.

To upgrade from an XC3S50AN to and XC3S200AN would require changing from a TQ144 package to an FT256 1mm BGA package. The FT256 package is a very easy to work with package, but as others have indicated, placing and soldering it to a board, homebrew or not, is not a trivial matter. It's not that equipment and processes can't be put together by a hobbyist, it's that it likely requires more patience and practice than is economic for most hobbyists.

Furthermore, I've built several commercial products based on the larger Spartan 3AN parts, because their cost as a self-contained solution was better than that of an Spartan 3A and an XCF04S configuration PROM. However, now that I've been able to make several boards work with the non-Xilinx configuration solutions, I won't be using the Spartan 3AN parts in new designs. Their cost compared to the compared to that of a Spartan 3A and a non-Xilinx configuration PROM is much higher: XC3550AN-4TQG144I - $11.44; XC3S50A-4TQG144I - $9.51 + $0.56 = $10.07. (Getting the SPI SEEPROM die bonded into the package along with the FPGA more than doubles the cost of the SPI SEEPROM.)

The smaller package that I recommended, the VQG100 package, provides significantly fewer I/O, but it does provide the potential to upgrade the FPGA. The TQG144 package provides more potential I/O but only supports the 50kgate FPGA. Therefore, a design with the TQF144 is much more likely to run out of FPGA logic resources than I/O resources, and can't be upgraded.

It's a "pick your poison" situation. :wink:

_________________
Michael A.


Top
 Profile  
Reply with quote  
 Post subject: Re: Micro-KIM?
PostPosted: Sat Aug 03, 2013 2:28 am 
Offline
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 904
Sorry, need to check something...


Attachments:
DSCN1434.resized.JPG
DSCN1434.resized.JPG [ 141.43 KiB | Viewed 1388 times ]
DSCN1455.resized.JPG
DSCN1455.resized.JPG [ 119.32 KiB | Viewed 1388 times ]

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 96 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: