Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shift registers #2

Open
coolname1 opened this issue Feb 10, 2019 · 16 comments
Open

Shift registers #2

coolname1 opened this issue Feb 10, 2019 · 16 comments

Comments

@coolname1
Copy link

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
Copy link
Owner

TomNisbet commented May 16, 2019

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
Copy link

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
Copy link
Owner

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
Copy link

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

@TomNisbet
Copy link
Owner

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

@TomNisbet TomNisbet reopened this May 29, 2024
@ABelliqueux
Copy link

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

@ABelliqueux
Copy link

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

@ABelliqueux
Copy link

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
Copy link
Owner

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
Copy link

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 😅

@TomNisbet
Copy link
Owner

TomNisbet commented Jun 2, 2024

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
Copy link

ABelliqueux commented Jun 3, 2024

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
Copy link
Owner

Yes. SRCLR is high and OE is low.

@ABelliqueux
Copy link

ABelliqueux commented Jun 5, 2024

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
Copy link

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
Copy link

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

TP32-595

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants