Linux USB universal parallel EEPROM programmer - Page 1
Forum section: electronics / projects

author: pyromaniac4382
author_rank: Contributor
timestamp: November 19, 2015, 05:15:13 pm
content: Hi,I want to build a USB universal parallel EEPROM programmer for Linux since one does not seem to exist open hardware / open source. The need grew out of wanting to use Linux to program EEPROMs and no complete drivers/open software for existing hardware on the market.I have a good idea as to how parallel EEPROMs get programmed. To program most parallel EEPROMS you first set the address pins, set the data pins, and then hit write enable and one byte is written to the memory address specified by the set pins. The simple solution is to have enough address, data, and control lines on your MCU for the parallel EEPROM chip you want to program. I am guessing in software I would need to be able to switch the pins on the fly based off of some sort of file that outlines the parallel EEPROM chip pins.For example, say pin27 is A0 on the parallel EEPROM so in software we map it accordingly to whatever I/O port that pin is physically connected to let’s say pin30 of the MCE which is say PORTB5, the internal reference the file would need to map it properly is the PORTB5 = A0. I will probably only want to support up to 32KB chips on my first go to reduce complexity.My idea was to then implement an up-counter that would manipulate these references from 0 to the upper address count needed by the hex file being programmed and program one byte at a time that is supplied by a hex file on the PC via USB.I am hung up on some ideas that will need to be fleshed out.First I have never made a USB device so should I try to use a PIC that has internal USB support or should I opt for another solution? (USB seems to be the only connector of PCs these days) I figure going the PIC route I would need a lot of pins.Second is there an easy way to classify this device? USB seems hard to program when you are no sure what to classify the device as. Basically all that would need to be provided in terms of data from the PC are the HEX file (one byte at a time) and the configuration file that would map the pin properly.Help is greatly appreciated to point me in the right direction. Thanks.

author: zzattack
author_rank: Regular Contributor
timestamp: November 19, 2015, 05:34:10 pm
content: I'm not in any camp but if your goal is primarily to program some of your own chips for personal use, an arduino solution could be a reasonably cheap, quick and dirty solution. It's what I use for the (very rare) chips that my wellon doesn't do. I put the file on an SD card which I read on the arduino with a cheap ($3 or so?) SD card reader shield. No need for a HID interface (or whatever you'd go with).

author: mich41
author_rank: Regular Contributor
timestamp: November 19, 2015, 08:47:49 pm
content: Start reading about libusb (user-space low-level access to USB devices) or kernel mode USB drivers.Thismay be useful if it's the first time you are seeing USB.If you decide you don't want to hear about any kind of USB drivers anymore, another option is to make your device behave like USB-serial bridge, which gives you OS-provided drivers for free. Just open /dev/ttyUSBwhatever and write commands to the chip there. Device-side, this can be implemented in firmware (there demos for AVRs, maybe for PICs too) or using a USB-UART bridge chip (which is what Arduino and Bus Pirate do, for example).However, if you feel tempted to avoid dealing with USB by employing some ft232, note that the ft232 has so-called bit-bang mode. Basically, you send a block of bytes to the chip and it outputs them through a 4-bit or 8-bit (I don't remember now) bus multiplexed over its UART I/O pins at clock rate of your choice. FTDI also makes dedicated bitbanging chips which don't even pretend to have anything to do with UART and may have more I/O pins, USB2 HS support and some silver bells. See libftdi (host-side library to program FTDI bitbanging chips) and datasheets.If there is no bitbanger with enough pins, surely something can be hacked together with SIPO registers.All depends on what kind of fun you want to have.EDIT:Somebody mentioned Arduino. A possible compromise between "Linux" and "Arduino" is "connect it to RPi and bit-bang"

author: free_electron
author_rank: Super Contributor
timestamp: November 19, 2015, 08:56:35 pm
content: you forget the required erase cycle .. , and what about sector programmed eeproms with page lock bits ?there is much more required than simply placing data and address and flicking the WR pin...also the timing of the signals is important.

author: pyromaniac4382
author_rank: Contributor
timestamp: November 20, 2015, 12:21:12 am
content: Couldn't an erase cycle just be writing $FF to every data byte. Have to start somewhere right, maybe sector programmed eeproms will come later. I have a feeling the current device I use to program eeproms writes one byte at a time but I may be wrong since the software it proprietary and only for Windows (G540). Arduino or any other platform that uses USB to UART seems the way to go.I will probably end up trying this route and seeing if I can program just one eeprom chip. I have a PIC18F45K50 which claims to have internal USB and a CAT28C256 32K eeprom. I will see if I can connect the two up and program something to read write it. Thanks for the suggestions.

author: georges80
author_rank: Frequent Contributor
timestamp: November 20, 2015, 12:43:26 am
content: Quote from: pyromaniac4382 on November 20, 2015, 12:21:12 amHave you looked at the programming/erase protocol of various eprom devices? The old school ones (other than needed UV erase) only allowed you to program 0's, you had to erase to get back to 1's.Now if you only want to program a modern eeprom device, that's a different story. Though some devices still require a block/sector erase, all depends on the device. And you did state UNIVERSAL which implies the whole slew of products not just a couple of specific ones...Maybe you need to build up a spread sheet of the various parts you plan to be able to program and then determine how they are programmed/erased etc.cheers,george.

author: free_electron
author_rank: Super Contributor
timestamp: November 20, 2015, 01:29:13 am
content: Quote from: pyromaniac4382 on November 20, 2015, 12:21:12 amnope. erasing requires sending a sequence of bytes to specific addresses, waiting.