Notifications
Clear all

SN74HC166N vs SN74HC165N vs 74HC165 (phillips version)

8 Posts
3 Users
2 Likes
401 Views
Neelerak
(@neelerak)
Active Member
Joined: 2 months ago
Posts: 7
Topic starter  

A lot of users source there parts from places like AliExpress, which is harder to find the phillips version of the PISO.  I myself have a lot of SN74HC166N and SN74HC165N but have a harder time finding the phillips version.  I would be nice to know how to use them and secondly, what the differences are between them.  Why would I want one vs the other?

 

Great content BTW, love this channel


   
Quote
robotBuilder
(@robotbuilder)
Noble Member
Joined: 3 years ago
Posts: 1554
 

@neelerak

This might be a good start?

https://dronebotworkshop.com/shift-registers/

 


   
DaveE reacted
ReplyQuote
DaveE
(@davee)
Prominent Member
Joined: 2 years ago
Posts: 681
 

Hi @neelerak,

  I do not follow the all the company ownership changes, but I don't think Philips are still in this semiconductor market ... I think that part of the company was separated off and became NXP 

https://en.wikipedia.org/wiki/NXP_Semiconductors

and I suspect the part of the company of interest to you, is now under name Nexperia

https://en.wikipedia.org/wiki/Nexperia

......  so any chips with a Philips logo on are likely to be quite old.

In principle, chips from different sources with the same number should provide the same basic function. If you look at the data sheets carefully, different manufacturers may have differences in the detail. For amateur applications, those differences do not usually matter, BUT if the devices are for a safety critical function, then much more care is needed.

----------

Nexperia have data sheets .. links below. I think Texas Instruments may also make them ... they traditionally use the SN prefix.

 

https://assets.nexperia.com/documents/data-sheet/74HC_HCT165.pdf

https://assets.nexperia.com/documents/data-sheet/74HC_HCT166.pdf

I haven't used the chips .. at least not recently enough to remember ... but a quick look at the data sheets' introductions showed the following comparison (click on picture to enlarge):

74HC165 and 74HC166

As you can see there are a number of variations in how the control signals work, the 165 has a complementary Q7 output, and although both chips can apparently accept higher voltage inputs, one requires current limiting resistors whilst the other can accept up to 15V signal levels.

Clearly, you need to study the data sheets and functionality carefully to decide which is more sutable for your application.

Good luck and best wishes, Dave


   
ReplyQuote
Neelerak
(@neelerak)
Active Member
Joined: 2 months ago
Posts: 7
Topic starter  

Hey @davee thank you for the prompt response.  The data sheet I am referring to can be found here https://www.ti.com/lit/gpn/sn54hc166-sp.   As an amateur this is quiet different from the version above and version used in your YouTube video.  I tried to get it working with the information in the video, however, I seem to be having some kind of timing issue.  My suggestion would be to review this one and explain why to use it over the one in the video.

 

Thanks again for the response


   
ReplyQuote
DaveE
(@davee)
Prominent Member
Joined: 2 years ago
Posts: 681
 

Hi @neelerak,

   Sorry, the data sheet reference you provided is broken ... could you check it please?

  Also you refer to a YouTube video .. could you please provide reference and approximate time in the video?

Thanks, Dave


   
ReplyQuote
Neelerak
(@neelerak)
Active Member
Joined: 2 months ago
Posts: 7
Topic starter  

Sure,

The datasheet can be found here, https://www.ti.com/product/SN74HC166/part-details/SN74HC166N

And here is the youtube video with time


   
ReplyQuote
DaveE
(@davee)
Prominent Member
Joined: 2 years ago
Posts: 681
 

Hi @neelerak,

  Ok, I confess I am a bit confused as to why you say have 74HC165s ... and then want to start with 74HC166s, even though the demo sketch by Bill uses 74HC165s. For these purposes, I doubt if it makes any difference if they are TI, Philips, or even an unknown name from AlIexpress .. they should all work.

And to be honest, my recommendation is that where you start. Bill's reputation of explaining clearly and making sure his advice is right, is second to none, so that is the best way of getting a working system to get some experience

------------

Having got the 165 to work properly, you might like to try replacing the 165 with 166 .. but as you have already noted, you will need to wire it differently.

I haven't got the hardware to test it out myself, but after a quick glance atathe data sheets and Bill's sketch, I have a suggested wiring scheme for a 166.

Please check my working out below on your datasheet, etc.  in case I have misread something, etc. ... I am very good at making mistakes ..... hopefully it will all be clearer to you.

---------------

Note, all I have done is listed on the left, each Arduino or Switch wire, and which pin on the 165 it goes to, then having found the name of pin on the 165, then on the right, I have matched the name to the same name on the 166, and found the pin number. (Pin names with a bar above the name, I have written as "not xxx")

So that Arduino pin 4 should be connected to pin 15 on a 165, but pin 6 on a 166 ... and so on.

Arduino pin 4  ... 165 pin = 15 Clk InH           |  166 ClkInH  Pin  = 6

Arduino pin 5  ... 165 pin = 7  Not Qh            |  166 *** Only Qh available ... Pin  = 13

Arduino pin 6  ... 165 pin = 2  Clk                  |  166 Clk   Pin  = 7

Arduino pin 7  ... 165 pin = 1 Clk Sh/Not Ld    |  166 ClkInH  Pin  = 6

 

Sw 0    ............. 165 pin = 11  Ain                |   166  Ain   Pin = 2

Sw 1    ............. 165 pin = 12  Bin                |   166  Bin   Pin = 3

Sw 2    ............. 165 pin = 13  Cin                |   166  Cin   Pin = 4

Sw 3    ............. 165 pin = 14  Din                |   166  Din   Pin = 5

Sw 4    ............. 165 pin = 3    Ein                |   166  Ein   Pin = 10

Sw 5    ............. 165 pin = 4    Fin                |   166  Fin   Pin =  11

Sw 6    ............. 165 pin = 5    Gin                |   166  Gin   Pin = 12

Sw 7    ............. 165 pin = 6    Hin                |   166  Hin   Pin = 14

--------------------------------

I think the program should work the same with the 166 as the 165 .. EXCEPT the data bit that gets read back ... with the 165 there is a "notQh" output, which shows the inverse (1 instead of 0 and vice versa), which is used for the sketch.

There is no such pin on the 166, so the nearest matching pin is "Qh". Hence the data coming out of Qh will be the same as that input ... and the screen monitor output for that pin will be inverted compared to the 165 output.

----------

As I say, I haven't tested this, and I'm doing this 'in a hurry' and may have missed something. Get the 165 one to work properly first, then move to the 166 version if you feel 'brave and lucky'.

Best wishes and good luck, Dave

-------------------

A quick post note --- I think Bill has tried to simplify the job as much as possible, and he has left one input pin on the 165 unconnected. This pin is probably never 'used' by the chip with this program, so it will work fine, but it is usually considered bad practice to leave an input pin 'floating', as it may pick up static, noise pulses, etc.

Hence, I would recommend for the 165 chip, pin 10, the SER serial data input pin, be connected to ground. You might like to leave it disconnected to start with, then when you have working, add the ground connection and test to see if it makes any apparent difference.

The same applies to the 166 chip ... except that the serial input pin is pin 1 instead of pin 10.

----------


   
ReplyQuote
robotBuilder
(@robotbuilder)
Noble Member
Joined: 3 years ago
Posts: 1554
 
Posted by: @neelerak

A lot of users source there parts from places like AliExpress, which is harder to find the phillips version of the PISO.  I myself have a lot of SN74HC166N and SN74HC165N but have a harder time finding the phillips version.  I would be nice to know how to use them and secondly, what the differences are between them.  Why would I want one vs the other?

 

Great content BTW, love this channel

This seems to cover the question you are asking?

https://electronics.stackexchange.com/questions/395870/what-are-the-differences-between-shift-register-ics#:~:text=74HC166%20is%20parallel%2Din%20serial,inverted%20and%20non%2Dinverted%20output.

Another option might be to use an I2C port expander such as the PCF8575 which can come as ready-to-use modules.

 

This post was modified 2 months ago 2 times by robotBuilder

   
ReplyQuote