News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

8-bit Parallel Load Shift Register

Started by Murat Atakan, Oct 22, 2025, 09:48 AM

Previous topic - Next topic

Murat Atakan

Hello, masters.
I want to replicate the functionality of the SN74HC165 8-bit Parallel Load Shift Register, the SN74HC595 8-bit Shift Shift Register, and the 3-State Output Shift Register on a processor.
How can we implement this functionality on a processor without using these two integrated circuits?

Thanks in advance

Pepe

#1
look #4

Murat Atakan

Thank you very much for your interest, Pepe

Pepe

demo proteus

Murat Atakan

Master Pepe
How can we do this with the Shin and Shout commands?
Regards

Stephen Moss

Create a variable to store your 8 bit data.
Read Parallel data in: Variable_Name = Portx, where x is the corresponding port letter, Port bit 0 (i.e. pin RB0) = LSB, bit 8 (i.e. RB8) = MSB.

The user manual is quite clear on how the Shin and Shout commands work and the example code given should be enough for you to get it working, just substitute the relevant port pins and variable name to those you want to use.

Output serial data read by Shin: PortX = Variable_Name, the varaiable name could be the same as that used for the parallel load, or different. The port used for the parallel output could be the same as that used for the load or different. But if you are using the same port you need to remember to use the TRIS register of the port being used to change the direction of the I/O port between Input for reading and Output for writing parallel data.

Tri-state output is difficult as many PICs do not have a true Tri-State option for their I/O pins. The closest you can generally get is to use an I/O pin that has weak internal pull-up associated with it. To get the third state...
Disable the pull-up associated with the I/O pin
Change the I/O pin function from Output to Input so the pin is not being actively driven to a voltage.

Murat Atakan


 Stephen Moss

Instead of a 74hc165, a PIC628 and its software
Instead of a 74hc595, a PIC628 and its software
will be the PIC628 that reads and manages them.

Pepe

#7
demo proteus for Murat Atakan

Murat Atakan


Thank you for your help. Good luck.