Author Topic: 74HC595 and slow programming languages (PHP)  (Read 751 times)

0 Members and 1 Guest are viewing this topic.

Offline laxamarTopic starter

  • Contributor
  • Posts: 37
  • Country: us
74HC595 and slow programming languages (PHP)
« on: September 09, 2022, 06:30:12 pm »
I sometimes stumble into WebMD and find that I have all sorts of diseases ...

Same thing happens when I read stuff on other sites and I think everything is going to break ...

Long Story Short, I read somewhere (I'll find it if necessary) that I can't use too slow of a clock on HC circuits (specifically 74HC595) as it might leave the internal shift registers in unstable states, they are designed for high speed.
I am using PHP and my application is very low speed, I need to use low power (3.3V) so I've been sticking with 74HCxxx components. I am building a breadboard with 74HC595 DIP parts to test things out. I'm just now paranoid that on my final SMD project , on a busy PI4 CPU (graphics and network invovled), my clock triggers in PHP might become too slow for the chips and have unexpected results. It's *probably* paranoia, as 32 bit to 64 bit shifts before storing should be fast enough, but I though I might ask anyway.

Should I be worried about the performance of the PHP 8 engine for outputting GPIO signals (2 clocks, one serial data) fast enough for High Speed CMOS parts?
 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: 74HC595 and slow programming languages (PHP)
« Reply #1 on: September 09, 2022, 06:41:08 pm »
It is not the speed of the clock that matters, it is the rise and fall time of the edge, and that is a circuit thing not a software one (In most cases).

The concern is that a clock with a sufficiently slow rise time may hang around whatever the threshold voltage is and give rise to an extra clock pulse due to noise taking it across the threshold, but that is about circuit design and board layout, not how slowly your program executes.

If working in something actually fast, like say assembler or maybe C you can manufacture some 'too fast' things like failing to meet hold time constraints, but you are not going to get close to that in PHP! 
 
The following users thanked this post: edavid, taste_tester

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6726
  • Country: ro
Re: 74HC595 and slow programming languages (PHP)
« Reply #2 on: September 09, 2022, 06:48:19 pm »
Should I be worried about the performance of the PHP 8 engine for outputting GPIO signals (2 clocks, one serial data) fast enough for High Speed CMOS parts?

No.  It'll work just fine, because any GPIO has fast enough edges.  No worries whatsoever, not even if you pulse that 74HC595 only once a year.  :)

Offline laxamarTopic starter

  • Contributor
  • Posts: 37
  • Country: us
Re: 74HC595 and slow programming languages (PHP)
« Reply #3 on: September 10, 2022, 12:28:35 am »
It is not the speed of the clock that matters, it is the rise and fall time of the edge, and that is a circuit thing not a software one (In most cases).

Ahhh, that makes much more sense. That's a GPIO thing. Phew I can sleep well tonight, as soon as I figure out from WebMD why my eyes are red .....
 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: 74HC595 and slow programming languages (PHP)
« Reply #4 on: September 10, 2022, 11:09:35 am »
WebMD, the hypochondriacs friend...

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf