element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Read data input from shift register
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 19 replies
  • Answers 3 answers
  • Subscribers 393 subscribers
  • Views 2293 views
  • Users 0 members are here
  • shift register
  • multiplexing
  • frontpage
Related

Read data input from shift register

tim687
tim687 over 8 years ago

I am having some troubles getting the readouts from the shift register.

The 74HC_HCT164 controls a EADCD040YA2 (or alike) two digit 7 segment display.

Is there any way that I could reliably read the Serial input data from the shift register.

 

I have got a pin-out of the shift register to the display, so that shouldn't be any problem.

 

What might be useful to know, is that the shift register circuit is not only used for the display, but also for some of the LED's.

The data is shifted into the shift register, then the first common anode is turned on by the microprocessor, then the shiftregister latches, shift register clears, second diigit data get's shifted in, second common anode is turned on, shift register latches and shift register clears.

 

I don't know if there is happening anything between the two digit 'shift's' and what's the clock cycle of the whole circuit. I don't have access to an ocsilloscope, well, I do if you call my Arduino one.

 

I am using an Arduino to read out the code (using the following sketch: https://pastebin.com/8fWA6qUP)

 

I would appriciate it very much if anyone could help me out with this problem!

 

So to be clear: this is NOT about using a shift register the normal way, but to basically hack shift register and read what's being send to it!

 

Tim

  • Sign in to reply
  • Cancel

Top Replies

  • mcb1
    mcb1 over 8 years ago +1 suggested
    tim687 The 74HCT164 is a serial to parallel converter. Basically you set the state you want on that particular output using the two inputs and then raise the clock. You need to do this 8 times to replace…
  • mcb1
    mcb1 over 8 years ago in reply to tim687 +1 suggested
    Is this related to this. Detect whether a pin is connected to GND I posted a link where a local person has been able to detect the serial output from an Aircon unit. https://nicegear.co.nz/blog/hacking…
Parents
  • mcb1
    0 mcb1 over 8 years ago

    tim687

    The 74HCT164 is a serial to parallel converter.

    Basically you set the state you want on that particular output using the two inputs and then raise the clock.

    You need to do this 8 times to replace/set all 8 outputs

    image

     

    You need to read the value of the two data lines, and note them when the clock goes high.

    You'll also need to check if the MR line is able to change, since it will reset the outputs.

     

    Most 7 segment displays only need 4 bits, which means they could easily use the other 4 outputs for something else.

     

     

    Mark

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • tim687
    0 tim687 over 8 years ago in reply to mcb1

    So you'd say I'd have to read out input A and B from the shift register and perform a (bit wise) AND operation onto them to get the input data?

     

    The problem I'm having is that the two (serial coded) digits sometimes get swapped around.

     

    The display definitely is a 8 bit display. It has got a total of 10 pins, 2 common anodes and 8 data pins.

     

    The problem is however, that I will be using this in an IoT project, so I'm starting to get very tight with the available pins. I've freed up two pins using, how hilarious image, a shift register.

    That means that I only have a pin for the serial input A and the clock. I could free up more pins by using a shift in register, but I think that it would make the whole project to complex than it needs to be.

     

    Thanks for your diagram though! I haven't searched for one to be honest image

     

    Thanks again!

     

    Tim

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mcb1
    0 mcb1 over 8 years ago in reply to tim687

    So you'd say I'd have to read out input A and B from the shift register

    Depends if they are using both inputs.

    Sometimes they will tie one input high.

     

    You'll need to read the 'input' and the clock.

     

    It has got a total of 10 pins, 2 common anodes and 8 data pins.

    Ahh yes I read it wrong sorry.

    It will be multiplexing between the two digits and changing the data for each segment, so you do have your work cut out.

    You'll also need to know what the data is for each segment, which means another input.

     

     

    Don't forget the 5 Analogue pins are also digital (D14- D19)

     

     

    mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • tim687
    0 tim687 over 8 years ago in reply to mcb1

    I've created a little schematic, the output pins of the shiftregister Q0-Q7 (in order) corresponds to the pins A-G and DP.

    I've also figured out which pin controls which segment, but the strange thing is that there is no correlation between the serial input and the expected serial input according to my pin to segment research.

     

    I got it working at some point, but only for a few numbers. (17, 21, 23, 25, 26, 27)

     

    Is there something I might be missing?  

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mcb1
    0 mcb1 over 8 years ago in reply to tim687

    Is there something I might be missing? 

    Bit hard to say from here ...

     

    it could be timing, your code, change in how they clock it ...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mcb1
    0 mcb1 over 8 years ago in reply to tim687

    Is this related to this.

    Detect whether a pin is connected to GND

     

    I posted a link where a local person has been able to detect the serial output from an Aircon unit.

    https://nicegear.co.nz/blog/hacking-a-mitsubishi-heat-pump-air-conditioner/

     

    It seems that many of them have a serial feed and I was wondering if your might have the same.

     

    Mark

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • tim687
    0 tim687 over 8 years ago in reply to mcb1

    It indeed is related to the airport project. I'll check if is has one. That would make the job a lot easier. I don't see any UART pin in the schematic of the microprocessor however.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • tim687
    0 tim687 over 8 years ago in reply to mcb1

    According to the datasheet of the micro, the chip doesn't have any SCI (Serial Communication Interface)

     

    Besided checking both inputs, any other options?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 8 years ago in reply to tim687

    Probably supposed to say SPI, not SCI ??

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • Robert Peter Oakes
    0 Robert Peter Oakes over 8 years ago in reply to tim687

    Probably supposed to say SPI, not SCI ??

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • tim687
    0 tim687 over 8 years ago in reply to Robert Peter Oakes

    Nope, the chip doesn't have SCI (serial/UART) and SPI according to my research.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube