Author Topic: 7 segment via P89V51RD2.. prog  (Read 1265 times)

0 Members and 1 Guest are viewing this topic.

Offline gorutiwari17Topic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
7 segment via P89V51RD2.. prog
« on: September 12, 2013, 09:53:53 AM »
hey anyone tell me how to operate four 7segment display in one time via one port (8-bit) of p89v51rd2.. plz make it on embeded C program.. i'm using uVison4 Keil IDE...

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,345
  • Helpful? 82
Re: 7 segment via P89V51RD2.. prog
« Reply #1 on: September 13, 2013, 11:20:47 AM »
You can do this with one external 4-bit-to-7-segment driver circuit, and four MOSFET transistors.

You need to use 7-segment displays with common cathode. Each of those cathodes then go to a separate N-channel MOSFET (such as the BS170.) The gate of each of those MOSFETs then goes to bits 4-7 of the output port, to serve as "segment select."

Then, bits 0-3 of the port go to the LED driver (like a 4511 based IC) input, and the seven output segments go to the anode of all of the segements.

Then, you set up the code to drive the LEDs at a 60 Hz duty cycle (times 4, so 240 Hz interrupt rate.)
Each time you get the interrupt, set bits 0-3 to the value of the next digit, and set the one bit of bits 4-7 to select that particular output digit.


Get Your Ad Here