7 SEGMENT DISPLAY multiplexing asm

Submitted by moz on

Hey!!

well i have this problem in displaying different numbers in the 7 seg dis when are multiplexed with assembly langauge....i'm new to this plz help

here's my code  

                                   

  a equ 0x0e
b  equ 0x0e
org  0x00
goto start
;org  0x04
;goto int
;*****************************************
start bcf status,6
bsf status,5
clrf TRISD
movlw 0x06
movwf TRISC
bsf   Option_reg,6
;movlw 0x90
;movwf INTCON
bcf   status,5
clrf   a
clrf   b
goto  main
;****************************************
;INT BCF   INTCON,1
;****************************************
main movlw 0xc0
movwf  PORTD
bsf PORTA,2
call    delay
bcf     PORTA,2
 
movlw   0xf9
    movwf  PORTD
bsf PORTA,3
call    delay
bcf     porta,3
 
delay movlw   0xc8
movwf a
movlw   0x72
movwf b
T decfsz  a,1
goto T
V decfsz  b,1
goto V
return

Why do you want do use assembly still? if it is for learning purpose you can try simplier programs.

Any ways if you are still on to it. Then first you have to understand how 7-seg works. I cannot follow your code after this

  a equ 0x0e
b  equ 0x0e
org  0x00
goto start
;org  0x04
;goto int
;*****************************************
start bcf status,6
bsf status,5
clrf TRISD
movlw 0x06
movwf TRISC
bsf   Option_reg,6
;movlw 0x90
;movwf INTCON
I think your 7-seg is connected to PORTD and you are trying to display 1 on the display by pushing 0x06 whcih is correct. But then what is connected to TRISC? Control pins? and why do you need an interrupt here? why is INTCON getting configured? Are you trying to use multiple 7-segmts like a 4-digit segment display? 

  Joined August 14, 2018      44
Tuesday at 03:25 PM