hi! i'm learning how use how to display on a 7-segment using a pic 16f877. i'm tryin to call a table and display the values via portD wich is connected to the 7-segment! can anyone check my code coz it's not workin! thanx
Code:
LIST p=16F877
#include <P16F877.inc>
__config _XT_OSC & _PWRTE_ON & _WDT_OFF &_LVP_OFF
;*****Equates**********************************************
status equ 03h
PortA equ 05h
PortD equ 08h
TRISA equ 85h
TRISD equ 88h
count0 equ 25h
count1 equ 26h
count2 equ 27h
pcl equ 02h
pclath equ
;******Main Program****************************************
org 00h
bsf status,RP0
movlw B'11111111' ; set portA as input
movwf TRISA
movlw B'00000000' ; set PortD as outpout
movwf TRISD
movlw D'6'
movwf ADCON1
bcf status,RP0
start
call Table
movwf PortD
goto start
Table
retlw b'11101111' ;display 0
call delay
retlw b'10001001' ;display 1
call delay
retlw b'11010111'
call delay
retlw b'11011101'
call delay
retlw b'10111001'
call delay
retlw b'01111101'
call delay
retlw b'00111111'
call delay
retlw b'11001001'
call delay
retlw b'11111111'
call delay
retlw b'11101111'
call delay
delay ;delay routine
movlw 03h
Movwf count2
Loop
decfsz count0,1
Goto Loop
Decfsz count1,1
Goto Loop
Decfsz count2,1
Goto Loop
Return
end