TomNisbet / TommyPROM

Simple Arduino-based EEPROM programmer
https://tomnisbet.github.io/TommyPROM/
147 stars 30 forks source link

Shift registers #2

Open coolname1 opened 5 years ago

coolname1 commented 5 years ago

Hi there,

Not an issue as such... Can this project use the 74HC595 shift registers as an alternative shift register? I have about 20 of those, but no 74LS164. Thanks :)

TomNisbet commented 5 years ago

Sorry for the late reply. Any serial-in parallel-out shift registers should work, although there would be a few pin changes. For example, the 72HC595 has a OE that would just be tied to ground to have it always enabled.

I updated the hardware readme to address this.

OmaiGrundles commented 4 years ago

I would like to mention that to get the 74HC595 to work, I had to add code to PromAddressDriver.cpp: defining an unused pin(10), and toggling it high then low at the end of PromAddressDriver::setAddress. Then attaching pin 10 from the arduino to the RCLK pin of each shift register.

I am a complete newbie when it comes to this kind of stuff so there probably is a better way though.

I would also like to thank @TomNisbet for doing all this. You saved the project I was working on, I had no other way of getting the darn write protection off of my AT28c256's! People like you are amazing! :)

TomNisbet commented 4 years ago

I just looked at the data sheet and saw the two stage design for that chip. Your addition to clock the data from the shift register to the storage register makes perfect sense. Glad it is working for you.

ABelliqueux commented 4 months ago

@OmaiGrundles : Could you share your modified code here ? I plan to use 74HC595s too...

TomNisbet commented 4 months ago

The 74HC595 shift registers are now supported in the code. You need to connect the Arduino D13 pin to the RCLK pin on both shift registers. See this page for details: https://tomnisbet.github.io/TommyPROM/docs/hardware

ABelliqueux commented 4 months ago

Oh I didn't realize these instructions applied to 74HC too. Thanks for the clarification !

ABelliqueux commented 4 months ago

Last question : Is the TommyPROM32 PCB compatible with 74HC595 too ? I suspect it needs modification to connect the RCLK pins ?

ABelliqueux commented 4 months ago

Just checked the PCB quickly and noticed the tommyprom32 is designed around two 74HCT164s that don't have pinouts similar to 74LS/74HC : tommyprom32 hence the notes here wont apply.

Would adapting the TommyProm32 PCB to 74HC/LS require a lot of modifications to the PCB ?

TomNisbet commented 4 months ago

The chips are different enough that it would not be practical to build the PCB as-is and then cut a few traces and add a few re-work wires.

With some PCB experience, it shouldn't be too difficult to copy the existing KiCad files to a new project and then make the needed schematic and layout changes. The board isn't very densely populated, so there's plenty of room to run all of the traces wherever they need to go. I'd try it myself, but I'm not going to be available for the next two weeks.

ABelliqueux commented 4 months ago

Hi, I think I'll give it a try if it's not too difficult. I'll check the datasheets for these components and hopefully I'll be able to figure out how to alter the layout. I'll keep you updated here if you don't mind the thread hijacking too much :sweat_smile:

TomNisbet commented 4 months ago

Looking at your schematic above, the good news is that the schematic symbol pins for the outputs of the 595 are in the same place as the 164. You should be able to delete the control wires near the chip on the left side and then slide the 595 into place with QA connected to A0 and QH connected to A7. Then you just need to connect the appropriate control signals on the left.

Screenshot 2024-06-02 122626

After you delete the 164s, number the two 595s as U1 and U2. You will also need to assign the DIP-16 footprints to the 595s in the schematic editor. You can then go the the PCB layout and use the Update From Schematic button to replace the 164s with the 595s. I deleted the wire segments closest to the chip to have some space to work. It looks like the layout may be easier if you rotate the chips so that pin 1 is at the bottom.

Screenshot 2024-06-02 121955

ABelliqueux commented 4 months ago

Thanks for your pointers ! Here is what I've come up with so far :

595

according to :

74H-164_595

I also removed J12 and connected D13 to LSR+USR RCLK directly as per the doc.

I'm not sure about pins 10 and 13 as their name differ between the datasheet and kicad's libary ( MR/OE in the datasheets for the 164 and 595 vs SRCLR/OE for the 595 in kicad). I based my decision on the pin number, but maybe it's wrong ?

EDIT: Just read this in the doc :

An output enable pin, labeled as either G or OE in the datasheet, must be tied LOW for both chips or else they will not produce any signal on their output lines. A reset pin, labeled as RESET or SRCLR, must be tied HIGH for both chips or else the shift registers will be held in a reset state.

So I think SRCLR is okay being on 5V, but I should use GND for OE like so ?

2024-06-03-205051_512x458_scrot

TomNisbet commented 4 months ago

Yes. SRCLR is high and OE is low.

ABelliqueux commented 4 months ago

Here goes ... I hope I didn't make mistakes, the DRC tests pass fine but for one warning about the "+5V" marking near A17 overlapping something :

TommyPROM32-brd

A vector version is available here for higher resolution :

TommyPROM32-brd.pdf

And the pro file is here :

TommyPROM32-2024-06-05_163940.zip

EDIT: If it looks fine, maybe I can create a PR or a branch ?

ABelliqueux commented 3 months ago

Just a heads up to say that the breadboard version of the schematics for the TP32-595 version is working as intended. I think I'll order some pcbs soon and confirm all is well here.

ABelliqueux commented 2 months ago

Well, here it is, working all right AFAICT (did several reads/dumps checking checksum), the 595 version :)

TP32-595