Design challenge: 6502-based EPROM programmer
-
ThePhysicist
- Posts: 60
- Joined: 17 Jun 2020
Re: Design challenge: 6502-based EPROM programmer
GARTHWILSON wrote:
There is a fascination with being a survivalist and being independent of things like markets that don't sit still, which is why we've had discussions on computers one can boot without any ROM or µC at all. The EPROM programmer I've been using plugs into an ISA slot in the PC; but most modern PCs don't have ISA slots anymore. My DOS PC that had one went down recently, and although I've gotten another PC going in its place, it doesn't have the ISA slots, so the programmer is one function I have not gotten back. Someone gave me a MB with ISA which I'll try to get going; otherwise I might have to get one of these new industrial motherboards with the ISA slots, or get another programmer. If I get one with RS-232 instead of USB, I can use it with any one of many older and home-made computers.
No simulation survives contact with reality!
-
ThePhysicist
- Posts: 60
- Joined: 17 Jun 2020
Re: Design challenge: 6502-based EPROM programmer
BillO wrote:
Didn't Ben Eater show how to build one with an Arduino?
No simulation survives contact with reality!
Re: Design challenge: 6502-based EPROM programmer
Dr Jefyll wrote:
drogon wrote:
Given the general lack of parallel ports on modern PCs these days then that leaves a microcontroller and so if using a µC, then I'm struggling to see why there is a need for a 6502 at all. [...] You can build up a device uing an Arduino Uno and a pair of 74x595 shift registers
74x595 shift registers can also be driven from an asynch ("RS232") port. Besides the 595's, what would be on the receiving end is an oscillator and four 74xx chips, as shown below (one each of 'hc4520, 'hc74, 'hc4015 and 'hc132). I like some of the other approaches that were mentioned, including the FTDI FT245, but let's have a closer look at my Dumb Asynch® approach.
_____________________________________________________________________________
Since we're discussing tools and barriers to participate in the hobby (necessary tools, costs, ease of construction, etc.), I'd like to suggest that the Arduino Uno and the Arduino Nano clones are a worthwhile investment. I'm necessarily frugal (financially challenged?) and a commercial programmer, while not entirely out of reach, would have used up several months of my meager $20/month hobby budget. Instead I enjoyed designing and building a FLASH/EEPROM programmer shield for an Arduino Uno. I bought five Arduino Uno clones with micro-USB connector ($3.03 each, including shipping) one month, ordered ten Flash Programmer PCBs ($18.20, including shipping) the next month, and I ordered 32-pin ZIF sockets ($1.29 each) the following month. Drawing & details below... I used a pair of latches which can be loaded with 16 address bits much faster than a pair of shift registers (while also using less pins on the Arduino board).
I believe newcomers might enjoy building simple and relatively inexpensive tools like a Flash/EEPROM Programmer shield, especially with the gratification of seeing results immediately after a couple hours of assembly. A relatively simple set of instructions could guide them through installing the Arduino IDE and a 'sketch' (program) into the Arduino board as well as guiding them through the programmer shield assembly process (some 100+ solder connections). Program Flash or EEPROM chips using a terminal program with x-modem at 115200 baud.
Last edited by Michael on Tue Jan 17, 2023 2:16 pm, edited 3 times in total.
Re: Design challenge: 6502-based EPROM programmer
Back in 2013, there was an Arduino shield for programming 28Cxxx EEPROMS: viewtopic.php?f=4&t=2491 . The shield used to be available from https://www.tindie.com/products/UnaCloc ... r-arduino/, but has been out of stock since 2014.
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Design challenge: 6502-based EPROM programmer
Getting back to the original post's subject matter, I think anything to help the newbie in this way needs to refrain from requiring him to learn Arduino, ARM, other programming languages, etc.. It should be pretty close to plug-and-play (possibly following an easy PCB assembly) with Windows, Mac, and Linux, maybe even DOS. I don't see any problem with something that only programs a few devices, since this is to get him started, not support long-term professional development.
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: Design challenge: 6502-based EPROM programmer
GARTHWILSON wrote:
Getting back to the original post's subject matter, I think anything to help the newbie in this way needs to refrain from requiring him to learn Arduino, ARM, other programming languages, etc.. It should be pretty close to plug-and-play (possibly following an easy PCB assembly) with Windows, Mac, and Linux, maybe even DOS. I don't see any problem with something that only programs a few devices, since this is to get him started, not support long-term professional development.
Arduinos program in C/C++, so a lot of folks will already be familiar with it anyway.
Bill
Re: Design challenge: 6502-based EPROM programmer
GARTHWILSON wrote:
Getting back to the original post's subject matter, I think anything to help the newbie in this way needs to refrain from requiring him to learn Arduino, ARM, other programming languages, etc.. It should be pretty close to plug-and-play (possibly following an easy PCB assembly) with Windows, Mac, and Linux, maybe even DOS. I don't see any problem with something that only programs a few devices, since this is to get him started, not support long-term professional development.
Last edited by Michael on Sat Dec 31, 2022 2:18 pm, edited 1 time in total.
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Design challenge: 6502-based EPROM programmer
Michael wrote:
I agree. Since the Arduino program has already been written, the end user doesn't really need to learn a language. Programming the Arduino Uno or Nano would be similar to using the program that comes with your commercial EPROM programmer to program an EPROM. That is, you install then run the Arduino IDE, <file><load> the Arduino sketch, select com port and board type, and hit the <program> button. Easy peazy!
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: Design challenge: 6502-based EPROM programmer
Granted, there are many options available for programming an EEPROM, etc. Buy or build, where build could be a kit from someone or obtain parts for a known design, or just make your own from scratch.
I think having multiple options is nice, but in the end, it's the "newbie" that will need to decide on how to proceed. I would mention that the typical TL866II Plus seems to be going for just under $60 with free shipping from many online sources.
In any case, getting started is just that... getting started. There's a list of typical parts that need to be acquired, then some set of tools and test equipment. If Bill (Plasmo) or anyone else opted to make a simple partial kit based on a 65C02, that could be a multi-function system, albeit a pre-programmed EEPROM and/or CPLD to make it all work could be part of the partial kit.
I think having multiple options is nice, but in the end, it's the "newbie" that will need to decide on how to proceed. I would mention that the typical TL866II Plus seems to be going for just under $60 with free shipping from many online sources.
In any case, getting started is just that... getting started. There's a list of typical parts that need to be acquired, then some set of tools and test equipment. If Bill (Plasmo) or anyone else opted to make a simple partial kit based on a 65C02, that could be a multi-function system, albeit a pre-programmed EEPROM and/or CPLD to make it all work could be part of the partial kit.
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
Re: Design challenge: 6502-based EPROM programmer
GARTHWILSON wrote:
Michael wrote:
I agree. Since the Arduino program has already been written, the end user doesn't really need to learn a language. Programming the Arduino Uno or Nano would be similar to using the program that comes with your commercial EPROM programmer to program an EPROM. That is, you install then run the Arduino IDE, <file><load> the Arduino sketch, select com port and board type, and hit the <program> button. Easy peazy!
Last edited by Michael on Sat Dec 31, 2022 2:19 pm, edited 1 time in total.
Re: Design challenge: 6502-based EPROM programmer
Lots of good discussions. My reason for focusing on a 6502 solution is because when a newbie comes to 6502.org to learn about what 6502 can do, an Arduino or Pi solution seems not satisfy the newcomer's interest. My guess is the newcomer does expect some challenges dealing with 40+ year old technology; a modern peripheral maybe acceptable but abandoning the core 6502 CPU for modern CPU may be disappointing.
I'm intrigued by the possibility of serial bootstrapping. The serial receive ready can tie to 6502's RDY so 6502 executes one instruction and wait on next instruction to be ready. While waiting for such serial bootstrap engine to be realized, a FT245R may fit the function quite nicely. Attached is my strawman design of bootstrapping using FT245R. The basic idea is locating FT245R at reset vector memory area and connect its receive data ready to 6502's RDY such that FT245R's 8-bit parallel port provides the opcode to 6502. This way PC sent 6502 opcode over USB for 6502 to execute. First, the binary opcode stream builds a small bootstrap program in RAM and then jumps into the bootstrap program to load bigger & better program over FT245R.
Bill
I'm intrigued by the possibility of serial bootstrapping. The serial receive ready can tie to 6502's RDY so 6502 executes one instruction and wait on next instruction to be ready. While waiting for such serial bootstrap engine to be realized, a FT245R may fit the function quite nicely. Attached is my strawman design of bootstrapping using FT245R. The basic idea is locating FT245R at reset vector memory area and connect its receive data ready to 6502's RDY such that FT245R's 8-bit parallel port provides the opcode to 6502. This way PC sent 6502 opcode over USB for 6502 to execute. First, the binary opcode stream builds a small bootstrap program in RAM and then jumps into the bootstrap program to load bigger & better program over FT245R.
Bill
- Attachments
-
- Prog65_rev0_sch.pdf
- (22.83 KiB) Downloaded 112 times
Re: Design challenge: 6502-based EPROM programmer
(I like the idea of being able to just load up a microcontroller with a binary, without needing an IDE, if the immediate aim is to get something done rather than to learn something about that particular microcontroller setup. It's a black box approach. I know that the Raspberry Pi Pico is trivial to use this way: you plug in the USB cable, it appears as a storage device, and you drag a uf2 file to it. I did this yesterday. It immediately reboots with the new firmware. I'm not sure about the Teensy, or Arduinos, as to whether they are easy to program without any tools, but ideally they are.)
But back to serial bootstrapping...!
But back to serial bootstrapping...!
- Alarm Siren
- Posts: 363
- Joined: 25 Oct 2016
Re: Design challenge: 6502-based EPROM programmer
plasmo wrote:
Attached is my strawman design of bootstrapping using FT245R. The basic idea is locating FT245R at reset vector memory area and connect its receive data ready to 6502's RDY such that FT245R's 8-bit parallel port provides the opcode to 6502. This way PC sent 6502 opcode over USB for 6502 to execute. First, the binary opcode stream builds a small bootstrap program in RAM and then jumps into the bootstrap program to load bigger & better program over FT245R.
Bill
Bill
I hadn't considered using the RXF# output to control RDY. That's a very cool idea, and sidesteps problems with RESET and differing speeds of the host and the 6502 device. Indeed you could run an indefinitely long program that way, so long as you make sure that the program contains jumps back to the start of the relevant address range frequently enough. I think you'd want a way to remove RXF# from controlling the RDY input once you've got enough of the bootstrap program in place that its not necessary, otherwise the device's execution speed will be limited by the speed at which you can feed it program code - even when you're no longer executing from that area.
Also, I appreciate its a rough sketch, but you'd need to use a open-drain inverter instead of the AND gate, or a resistor after the AND gate, on your RDY signal or you could damage something if the WAI instruction is executed.
---
Finally, whilst I do appreciate people's points that this microcontroller or that cheap programmer can do the job with less fuss, and you're entirely right and objectively they may be better solutions, I'm not actually that bothered about that. I just think this is a fun project and I would like to see what we can come up with that meets the original design critiera.
Want to design a PCB for your project? I strongly recommend KiCad. Its free, its multiplatform, and its easy to learn!
Also, I maintain KiCad libraries of Retro Computing and Arduino components you might find useful.
Also, I maintain KiCad libraries of Retro Computing and Arduino components you might find useful.
Re: Design challenge: 6502-based EPROM programmer
The inspiration for RXF# to RDY comes from this link that kernelthread provided earlier.
I do want to add some jumper options so RDY can be pulled up and RXF# goes to IRQ and memory map of FT245R, RAM, EPROM are swapped around so once the EPROM is programmed, it can be the boot device with RAM at lower 32K and FT245R as the console I/O device. This way it can also be an usable 6502 computer.
Bill
I do want to add some jumper options so RDY can be pulled up and RXF# goes to IRQ and memory map of FT245R, RAM, EPROM are swapped around so once the EPROM is programmed, it can be the boot device with RAM at lower 32K and FT245R as the console I/O device. This way it can also be an usable 6502 computer.
Bill
-
kernelthread
- Posts: 166
- Joined: 23 Jun 2021
Re: Design challenge: 6502-based EPROM programmer
I don't know about the FT245, but the FT240 has an option to output a 6MHz clock (or 12MHz or 24MHz) on the CBUS5 and/or CBUS6 pins. This could be used to clock the processor so you wouldn't need a separate clock oscillator. It should also help avoid issues with the processor RDY input changing at inopportune moments relative to the processor clock.
The RDY input should be held low if you try to read from the FT24x with RXF high or write to the FT24x with TXE high. When accessing RAM or I/O RDY needs to be high.
It would be good if there were some way to reset the 6502 remotely from the other end of the USB connection, but I'm not sure there is.
The RDY input should be held low if you try to read from the FT24x with RXF high or write to the FT24x with TXE high. When accessing RAM or I/O RDY needs to be high.
It would be good if there were some way to reset the 6502 remotely from the other end of the USB connection, but I'm not sure there is.