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.

Help to convert common cathod to common anode seven segment display...

Status
Not open for further replies.
Need to convert Port C also? Not Port B? I can neglect RC6 and RC7.. Its for memory

So, How is possible to change the code?

Can you do it for me?

Thank you
 
Without the schematic it's a shot in the dark. What Ian said should work it's the easy way to do what I was saying but the hardware needs changes to I said that too.
 
Code:
VIBR_RAZRAD 
  BSF  PORTA,5
  BSF  PORTA,4
  MOVF  INDEX,W
  ADDWF  PCL,F
  RETLW  B'01111111'
  RETLW  B'10111111'
  RETLW  B'11011111'
  RETLW  B'11101111'
  RETLW  B'11110111'
  RETLW  B'11111011'
  RETLW  B'11111101'
  RETLW  B'11111110'
  MOVLW  B'11111111'
  BCF  PORTA,4

  RETURN

This is the portion that drives port C... You need to flip the bits..
 
I just flip the code just like this.. Is this Okey?

code (asm):

VIBR_RAZRAD BSF PORTA,5

BSF PORTA,4

MOVF INDEX,W

ADDWF PCL,F

RETLW B'10000000' ;'01111111'

RETLW B'01000000' ;'10111111'

RETLW B'00100000' ;'11011111'

RETLW B'00010000' ;'11101111'

RETLW B'00001000' ;'11110111'

RETLW B'00000100' ;'11111011'

RETLW B'00000010' ;'11111101'

RETLW B'00000001' ;'11111110'

MOVLW B'00000000' ;'11111111'

BCF PORTA,4

RETURN



]

But is not working too... Any other setting need?
 
schematic details are missing in the high current digit drivers.

This change from NPN for CC digit to PNP for CA digit must be able to drive the same current as before with same Vce(sat).

Both software and hardware driver logic must be inverted.
 
so the blank (1) has to be inverted too
 
:woot:


Waw....... Its working now... Great. But I need to some more bright in the display is good...

Only for hardware change need? Not done in source?
 
I just use PNP transistor in the Common Anode pin in the seven segment display.. Now its Okey. But how can I ignore these transistors for reduce the total cost?

It can be controlled through the source code to change the duty cycle of the micro controller?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top