Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Seven segment issue (TPIC6C596)

Status
Not open for further replies.

Manoj_maniyan

New Member
Hi guys,
Can anyone help with my question?
I am using Seven segment cathode display. I need to display 1., 2., 3., 4., etc. When i do coding like B00111111 | B10000000, this should display as 0. (zero+dot)
But I am not getting this result. I am getting only ‘.’ (dot)
I don’t know why dp is getting prioritization when I add to another digit.
digitalWrite(STCP_pin, LOW);
{
shiftOut(DS_pin, SHCP_pin, MSBFIRST, dec_digits[(buf & 0x0f)] | 0x80) // dp ‘on’
} else {
shiftOut(DS_pin, SHCP_pin, MSBFIRST, dec_digits[(buf & 0x0f)]); // no dp
}
digitalWrite(STCP_pin, HIGH);
Help me?



Redefining the question:

I think I have an issue with the shift register.
am using TPIC6C596 shift register and this register is capable of sending 8 bits. When I start sending 8 bits, I am getting only the last bit (i.e decimal point). But without the 8th bit (decimal point), my shift register can transfer whole 7 bits at a time. May i get the solution for this? When I implement in the proteus I am getting proper output. while doing the same in the hardware, I face the issue. For example, 0b00000110, I am getting the value as 1. if i do, 0b00000110 | 0b10000000, I am getting only .(dot) without 1. I should get 1.(one + dot). shiftOut(DS_pin, SHCP_pin, MSBFIRST, dec_digits[(buf - 0x30)]|0x80); What will be the issue.?


0r my doubt is when supply goes to decimal point, all the other pins goes to OFF condition.
When supply don’t go to the decimal point, all the other pins goes to ON condition.
Is that correct?
 

Attachments

  • tpic6c596.pdf
    1.3 MB · Views: 276
  • 40011 CDxx.pdf
    262.5 KB · Views: 276
  • WhatsApp Image 2021-04-29 at 11.37.52.jpeg
    WhatsApp Image 2021-04-29 at 11.37.52.jpeg
    43.9 KB · Views: 274
break it down so you can see where error occures:

byte a = (buf - 0x30);
byte b = dec_digits[a]|0x80; // <--- i suspect problem here
shiftOut(DS_pin, SHCP_pin, MSBFIRST, b);
 
Last edited:
I think you will need a separate resistor between the driver IC and each segment, rather than a "shared" resistor.
That will define the current for each segment separately and prevent interactions.
 
I think you will need a separate resistor between the driver IC and each segment, rather than a "shared" resistor.
That will define the current for each segment separately and prevent interactions.


Yes you are correct. But now I have connected 4 shift registers and 4 seven segments. The values are displaying only in the three segments and the last one is not displaying. I am using arduino. But the supply is going to all the pins perfectly.
 
Last edited:
Hi....I just need to display the values like 1., 2., 3.(three+dot), etc in the seven segment anode or cathode display using TPIC6C596 shift register.
I have referred many codes and sample of different registers but that doesn’t works.
Can anyone please help me with the seven segment code?

order pcb
 
Last edited:
That device has "sink" outputs that switch to 0V / negative.

That means you need a common-anode type display, and link each cathode pin to one of the outputs of the TPIC6C596 via a suitable resistor to set the segment current, and connect the display anode pin to positive power.

Software wise, you need to create a "look-up table" or array, with a list of the bits that need to be "on" for each 7 segment pattern, and matching the display wiring you use.

eg. If segment A is bit 0, B is bit one etc. in sequence, this should be suitable:

3-s2.0-B9780128013144000089-f08-03-9780128013144.jpg


To transfer to the shift reg / display, look up the display digit in the table and store it in a memory location or register; I'll call that "pattern".

If you want the decimal point on, set bit 7 of the pattern or OR with 0x80 (same effect).

Copy bit 7 of the pattern byte to the pin you are using for data out to the shift reg, then set the clock output pin high and then low to store that bit.

Shift the looked-up pattern left one bit and repeat the above, through all eight bits.

Then pulse the pin feeding RCLK high and low, to transfer the stored pattern to the outputs.

The G and CLR pins should both the high in normal use.

(ps. Please create a new thread when you have a new question - one of the moderators may move this post to a new thread for you).
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top