12.07.2015 Views

EK-6 - 320Volt

EK-6 - 320Volt

EK-6 - 320Volt

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437movwf disp_u ;Save 1st countgoto int_end;**************** LED display control *****************led_contbcf pir1,tmr2if ;Clear TMR2 int flagmovfw digit_cnt ;Read digit countermovwf s_digit ;Save digit counterdecfsz s_digit,f ;1st digit ?goto d_check1 ;No. Nextbsf porta,ra1 ;RA1=OFFbsf porta,ra2 ;RA2=OFFbcf porta,ra3 ;RA3=ONgoto c_digit ;Jump to digit contd_check1decfsz s_digit,f ;10th digit ?goto d_check2 ;No. 100th digitbsf porta,ra1 ;RA1=OFFbcf porta,ra2 ;RA2=ONbsf porta,ra3 ;RA3=OFFgoto c_digit ;Jump to digit contd_check2bcf porta,ra1 ;RA1=ONbsf porta,ra2 ;RA2=OFFbsf porta,ra3 ;RA3=OFFc_digitdecf digit_cnt,w ;Digit count - 1addwf disp_ha,w ;Digit H.Adr + countmovwf fsr ;Set FSR registermovfw indf ;Read digitaddwf seg7_ha,w ;Seg7 H.Adr + digitmovwf fsr ;Set FSR registermovfw indf ;Read seg7 datamovwf portb ;Write LED datadecfsz digit_cnt,f ;Digit count - 1goto int_end ;Jump to interrupt end75

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!