like i said b4, all i can do is to set the pins that r connected to the display in order to count. this is jus a short section of the 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
;******Main Program****************************************
org 05h
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
btfsc PortA,0
goto up
btfsc PortA,1
goto down
goto start
up
movlw b'11101111' ; display 0
movwf PortD
call delay
movlw b'10001001' ; display 1
movwf PortD
call delay
movlw b'11010111' ; display 2
movwf PortD
call delay
movlw b'11011101'
movwf PortD
call delay
movlw b'10111001'
movwf PortD
call delay
delay
movlw 05h
Movwf count2
Loop
decfsz count0,1
Goto Loop
Decfsz count1,1
Goto Loop
Decfsz count2,1
Goto Loop
Return
End
i also know that i can assign a register, increment it and send it to PortD! but how would i display the values? sice the count will b in binary! plus how to stop at 9?