PDA

View Full Version : 74hc595 help?



FADI984
- 28th May 2012, 23:49
HI FOR ALL...I WANT TO USE 74HC595 AND PIC16F628A TO SHOW NUMBER ON TOW 7 SEGMENT ...CAN ANY ONE HELP ME TO WRITE THE CODE TO SEND DATA BY 74HC595 TO 7 SEGMENT...THANKS FOR ALL...:apologetic:

ScaleRobotics
- 29th May 2012, 16:05
The search box finds many, many results. One of which is here: http://www.picbasic.co.uk/forum/content.php?r=205-16-Digits-Elapsed-Timer-Using-7-Segment-Displays

CuriousOne
- 19th October 2016, 07:26
In fact, I have same question, and either I'm not searching correctly, or all code returned is too complicated, has many side functions, so it is hard to "cut out" necessary part of the code.

Art
- 9th November 2016, 15:45
This is for a non-latching shift register which is fast enough for an LED display,
but for latching shift register like 74595 you only have to pull the latch pin at the end right before the return.


byte cnt’
byte buff’
byte send byte’ byte to send to port


shiftbyte:
for cnt = 0 TO 7
buff = sendbyte >> cnt;
SERCLK_PIN = 0;
SERDAT_PIN = buff.bit0;
SERCLK_PIN = 1;
NEXT cnt
return