Maker Pro
Maker Pro

74HC165, parallel to serial data conversion

RDD

Mar 6, 2018
1
Joined
Mar 6, 2018
Messages
1
Hi dear friends,

Thanks for providing the opportunity to interact with you experts!

Here I want to perform parallel to serial data conversion. Therefore I am using 74HC165, 8-bit parallel-in/serial-out shift register.

I need C code to read & store the fault status into Variable( say unsigned char). I tried below C code but its not working.

Basically I have an 8 Window Annunciator product where I want to read the Eight different Fault status. These faults can be either Logic 0 or Logic 1. Now these Eight status shall be collected into a Variable(datatype: unsigned char, as value 0b00000000/ 0b11111111 is possible)

Hardware logic is illustrated as shown in fig(A):

D0 to D7 are eight fault status which can be either Logic 0 or Logic 1.

C Code to read & store the status is attached as follows:



So kindly suggest the correct C code to read & store the fault status into Variable.

Thanks!

Regards,

Santosh Bhat

Sr. Engg, Bangalore
 

Attachments

  • C code attach.pdf
    36.4 KB · Views: 30
  • Forum Query.jpg
    Forum Query.jpg
    144.8 KB · Views: 57
Top