asm yardım

Başlatan yysbd, 07 Şubat 2012, 23:47:30

yysbd

bu asm dosysını hex yapma imkanı olan varmı acaba ?benim sistemde bir sıkıntı var ne yaptıysam çeviremedim.yardımlarınız için şimdiden sağ.herkeze iyi projeler.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;                                                                                                  ;
;                        Program: DS18B20 Digital Thermometer with .1 Degree Increments            ;
;                        Author:  Jake Sutherland                                                  ;
;                        Start Date: Sunday 16th May 2010                                          ;
;                        Finish Date: Wednesday 20th October 2010                                  ;
;                                                                                                  ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
        LIST            P=PIC16F628A
        INCLUDE         P16F628A.INC
        __config _CP_OFF & _DATA_CP_OFF & _LVP_OFF & _BODEN_OFF & _MCLRE_OFF & _PWRTE_ON & _WDT_OFF &  _INTRC_OSC_NOCLKOUT 
        errorlevel      -302    ;Eliminate bank warning
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;                                                                                                  ;
;                                   PIC16F628A Microcontroller                                     ;
;                                            ____ ____                                             ;
; LED 7 Segment 10's CC       VREF/AN2/RA2 -| 1  - 18 |- RA1/AN1              LED 7 Segment 1's CC ;
; LED 7 Segment 100's CC      CPM1/AN3/RA3 -| 2    17 |- RA0/AN0             LED 7 Segment .1's CC ;
; DS18B20 I/O               CMP2/T0CKI/RA4 -| 3    16 |- RA7/OSC1/CLKIN                            ;
;                             VPP/MCLR/RA5 -| 4    15 |- RA6/OSC2/CLKOUT                           ;
;                                      VSS -| 5    14 |- VDD                                       ;
; Segment DP                       INT/RB0 -| 6    13 |- RB7/T1OSC1/ICSPDAT              Segment B ;
; Segment C                      DT/RX/RB1 -| 7    12 |- RB6/T1OSCO/T1CLKI/ICSPCLK       Segment A ;
; Segment D                      CK/TX/RB2 -| 8    11 |- RB5                             Segment F ;
; Segment E                       CCP1/RB3 -|_9____10_|- RB4/PGM                         Segment G ;
;                                                                                                  ;
;                                                                                                  ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
CBLOCK  H'20'
HUNS                                    ; BCD number pointer for HUNDREDS digit
TENS                                    ; BCD number pointer for TENS digit
ONES                                    ; BCD number pointer for ONES digit
TENTHS                                  ; BCD number pointer for TENTHS digit
HUNS_ISR                                ; BCD number pointer for HUNDREDS digit, used within ISR
TENS_ISR                                ; BCD number pointer for TENS digit, used within ISR
ONES_ISR                                ; BCD number pointer for ONES digit, used within ISR
TENTHS_ISR                              ; BCD number pointer for TENTHS digit, used within ISR
TEMPLO                                  ; BS18B20 Temperature Result Low Byte
TEMPHI                                  ; BS18B20 Temperature Result High Byte
COUNT                                   ; For counting execution times in various routines
SHIFT                                   ; For storing data to shift into and out of the DS18B20
COLSEL                                  ; Stores Column Select information 
DIGIT                                   ; Used for Indirect Addressing in Interrupt
DELAYGPR1                               ; Used in delay subroutines
FLAGS                                   ;   -------0  Unused
                                        ;   ------1-  Temperature Negative Flag (1 = True 0 = False)
                                        ;   -----0--  Unused
                                        ;   ----0---  Unused
                                        ;   ---0----  Unused
                                        ;   --0-----  Unused
                                        ;   -0------  Unused
                                        ;   0-------  Unused
ENDC
 
W_ISR   EQU     H'70'                   ; For context saving. Ensures GPR is accesible from any Bank. See Memory Map of 628A
S_ISR   EQU     H'71'                   ; For context saving. Ensures GPR is accesible from any Bank. See Memory Map of 628A
P_ISR   EQU     H'72'                   ; For context saving. Ensures GPR is accesible from any Bank. See Memory Map of 628A
F_ISR   EQU     H'73'                   ; For context saving. Ensures GPR is accesible from any Bank. See Memory Map of 628A
 
 
        ORG     H'000'                  ; Processor reset vector location. On power up, the program jumps here
        GOTO    SETUP                   ; 
 
        ORG     H'004'                  ; Interrupt vector location. When an Interupt occurs, the program jumps here
  ; (Thanks Mike, K8LH for this ISR routine. Contact via Electro-Tech-Online.com)
  ; SAVE
        MOVWF   W_ISR                   ; Save W to W_ISR
        SWAPF   STATUS, W               ; Use SWAPF instruction so status bits don't change
        MOVWF   S_ISR                   ; Save Status to S_ISR
        CLRF    STATUS                  ; Switch to Bank 0
        MOVF    PCLATH, W               ; MOVE PCLATH to W register
        MOVWF   P_ISR                   ; Save PCLATH to P_ISR
        CLRF    PCLATH                  ; Force page 0
        MOVF    FSR, W                  ; MOVE FSR to W register
        MOVWF   F_ISR                   ; Save FSR to F_ISR
 
  ; Refresh display
        CLRF    PORTB                   ; Blank the display
        MOVF    PORTA, W                ; MOVE PORTA's current state to W
        ANDLW   B'11100000'             ; Clear ONLY Column Select Bits & leave upper nibble unchanged
        IORWF   COLSEL, W               ; Inclusive OR above with COLSEL register
        MOVWF   PORTA                   ; Leave upper nibble of PORTA unchanged & select new Column
 
        MOVF    DIGIT, W                ; Column number (Digit is initialised to 0. Used for indirect addressing)
        ADDLW   HUNS_ISR                ; Add 'Digit' to 'HUNS' GPR address
        MOVWF   FSR                     ; FSR = HUNS + (0forHUNS, 1forTENS, 2forONES & 3forTENTHS) as they are in sequencial order in RAM
        MOVF    INDF, W                 ; W register now holds BCD Number Pointer for corresponding digit to be displayed
        CALL    SEGMENT_TABLE           ; Get 7 Segment Arrangement from SEGMENT_TABLE for corresponding digit
 
        BTFSC   COLSEL, 1               ; Is ONES Column active
        IORLW   B'00000001'             ; YES, so activate ONE column deciaml point
        MOVWF   PORTB                   ; NO, hide deciaml point and display new column
 
  ; Prepare for next column interrupt
        INCF    DIGIT, F                ; Increment digit jump pointer (used when indirect addressing above)
        BCF     STATUS, C               ; Clear C bit of STATUS register
        RRF     COLSEL, F               ; Advance column select bit       
        BTFSS   STATUS,C                ; Was that the last column? (or, Is Carry Flag Set?)  
        GOTO    $+D'3'                  ; NO, do not reset DIGIT and COLumnSELect
        CLRF    DIGIT                   ; Reset Digit jump pointer
        BSF     COLSEL, 3               ; Reset Column select to Hundreds column 1 (00001000)
 
  ; RESTORE
        BCF     PIR1, TMR2IF            ; Clear TMR2 interrupt flag while still in Bank 0        
        MOVF    F_ISR, W                ; MOVE F_ISR to W
        MOVWF   FSR                     ; Restore FSR
        MOVF    P_ISR, W                ; MOVE P_ISR to W
        MOVWF   PCLATH                  ; Restore PCLATH
        SWAPF   S_ISR, W                ; Undo previous SWAPF, place result in W
        MOVWF   STATUS                  ; Restore STATUS
        SWAPF   W_ISR, F                ; Use SWAPF instruction so status bits don't change
        SWAPF   W_ISR, W                ; Undo previous SWAPF and restore W register
        RETFIE                          ; Return From Interrupt
 
 
  ; 7 Segment Display Arrangement Lookup
SEGMENT_TABLE  ; This routine assigns on/off arrangement to the 7 Segment Display
        ADDWF   PCL, F
             ;    BAFGEDCp    JUMP   B|A|F|G|E|D|C|p   DISPLAY
        RETLW   B'11101110' ;   0    B|A|F|-|E|D|C|-      0
        RETLW   B'10000010' ;   1    B|-|-|-|-|-|C|-      1
        RETLW   B'11011100' ;   2    B|A|-|G|E|D|-|-      2
        RETLW   B'11010110' ;   3    B|A|-|G|-|D|C|-      3
        RETLW   B'10110010' ;   4    B|-|F|G|-|-|C|-      4
        RETLW   B'01110110' ;   5    -|A|F|G|-|D|C|-      5
        RETLW   B'01111110' ;   6    -|A|F|G|E|D|C|-      6
        RETLW   B'11000010' ;   7    B|A|-|-|-|-|C|-      7
        RETLW   B'11111110' ;   8    B|A|F|G|E|D|C|-      8
        RETLW   B'11110110' ;   9    B|A|F|G|-|D|C|-      9
        RETLW   B'00000000' ;  10    -|-|-|-|-|-|-|-    BLANK
        RETLW   B'00010000' ;  11    -|-|-|G|-|-|-|-      -
        RETURN
 
 
  ; Program Orgiginates Here
SETUP  ; This rountine sets up the Microcontroller's Inputs and Outputs
        MOVLW   H'07'                   ; Turn Comparators off and enable pins for I/O functions
        MOVWF   CMCON                   ;
        BSF     STATUS, RP0             ; Bank 1
        MOVLW   B'00010000'             ; RA<7:5><3:0> Output, RA<4> Input
        MOVWF   TRISA                   ;
        CLRF    TRISB                   ; RB<7:0> Outputs
        BCF     STATUS, RP0             ; Bank 0
 
        CLRF    PORTA
        CLRF    PORTB
 
ONE_OFF_INITIALISE
  ; Clear ALL Bank 0 RAM from 0X20 - 0X7F (96 bytes)
        BCF     STATUS, IRP              ; Indirect addressing Bank 0/1
        MOVLW   H'20'                    ; Initialise pointer to RAM
        MOVWF   FSR                      ; (File Select Register)
        CLRF    INDF                     ; Clear Register indirectly
        INCF    FSR, F                   ; Increment pointer
        BTFSS   FSR, 7                   ; All done?
        GOTO    $-D'3'                   ; No, Clear next byte	  
 
  ; Initialise Column Select
        MOVLW   B'00001000'             ; Column select bit mask
        MOVWF   COLSEL                  ; 
 
  ; Setup TMR2 for 0.0005s or 500uS Interrupts
        CLRF    TMR2                    ; Clear TMR2 register
        BSF     STATUS, RP0             ; Bank 1
        MOVLW   B'00000010'             ;   00000010
        MOVWF   PIE1                    ;   -------0  Disable TMR1IE - TMR1 Overflow Interrupt Enable bit
                                        ;   ------1-  Enable  TMR2IE - TMR2 to PR2 Match Interrupt Enable bit
                                        ;   -----0--  Disable CCP1IE - CCP1 Interrupt Enable bit
                                        ;   ----X---  Unused
                                        ;   ---0----  Disable TXIE - USART Transmit Interrupt Enable bit
                                        ;   --0-----  Disable RCIE - USART Receive Interrupt Enable bit
                                        ;   -0------  Disable CMIE - Comparator Interrupt Enable bit
                                        ;   0-------  Disable EEIE - EE Write Complete Interrupt Enable bit
        BCF     STATUS, RP0             ; Bank 0
        CLRF    PIR1                    ; Clear Peripheral Interrupt Flags
        MOVLW   B'00000001'             ;   00000001
        MOVWF   T2CON                   ;   ------01  Prescale 1:4
                                        ;   -----0--  TMR2 OFF
                                        ;   -0000---  Postscale 1:1
                                        ;   0-------  Unused
        BSF     STATUS, RP0             ; Bank 1
        MOVLW   D'250'                  ; 
        MOVWF   PR2                     ; Interrupt every 0.001s or 1mS
        BCF     STATUS, RP0             ; Bank 0
        BSF     INTCON, GIE             ; Enable Global Interrupts
        BSF     INTCON, PEIE            ; Enable Peripheral Interrupts
        BSF     T2CON, TMR2ON           ; Start TMR2
 
        GOTO    GET_TEMP
 
  ; Dallas DS18B20 Temperature Sensor 'One Wire' Communication Routines
DS18B20_RESET  ; This routine Resets the DS18B20
        CALL    DQ_LL                   ; Force the DQ Line to Logic Low
        MOVLW   (D'480'-5)/5            ; Reset pulse must be held a minimum of 480uS
        CALL    DELAY                   ; 
        CALL    DQ_HIZ                  ; Release DQ Line
        MOVLW   (D'60'-5)/5             ; Wait for recovery
        CALL    DELAY                   ; 
        BTFSC   PORTA, 4                ; Test for 'Presence Pulse'
        GOTO    DS18B20_RESET           ; If not present, Reset
        MOVLW   (D'420'-5)/5            ; Must wait a minmum of 480uS from when DQ line is released before moving on
        CALL    DELAY                   ; 
        RETURN                          ;
 
DS18B20_READ_BYTE  ; This routine reads a byte of data from the DS18B20
        MOVLW   H'08'                   ; Amount of bits to shift out
        MOVWF   COUNT                   ; Store in COUNT GPR
        CALL    DS18B20_READ_BIT        ; Read bit
        RRF     SHIFT, F                ; Rotate bit out of carry into SHIFT GPR
        DECFSZ  COUNT, F                ; Decrement COUNT
        GOTO    $-D'3'                  ; If not zero, read next bit
        MOVF    SHIFT, W                ; If zero, MOVE SHIFT GPR to W
        RETURN                          ;
 
DS18B20_READ_BIT  ; This routine reads one bit of data from the DS18B20
        BCF     INTCON, GIE             ; Disable Global Interrupts
        CALL    DQ_LL                   ; Force the DQ Line to Logic Low
        CALL    DQ_HIZ                  ; Release DQ Line
        BSF     STATUS, C               ; Preset Carry Flag
        BTFSS   PORTA, 4                ; Test DQ Line
        BCF     STATUS, C               ; If zero, Clear Carry Flag
        BSF     INTCON, GIE             ; Enable Global Interrupts
        MOVLW   (D'60'-5)/5             ; Wait for Time Slot to end
        CALL    DELAY                   ; 
        RETURN                          ;
 
DS18B20_WRITE_BYTE  ; This routine writes a byte of data to the DS18B20
        MOVWF   SHIFT                   ; MOVE data to shift into DS18B20 to SHIFT GPR
        MOVLW   D'08'                   ; Amount of bits to shift in
        MOVWF   COUNT                   ; Store in COUNT GPR
        RRF     SHIFT, F                ; Rotate valid data into Carry Flag
        CALL    DS18B20_WRITE_BIT       ; Write bit
        DECFSZ  COUNT, F                ; Decrement COUNT
        GOTO    $-D'3'                  ; If not zero, read next bit
        RETURN                          ; If zero, RETURN
 
DS18B20_WRITE_BIT  ; This routine writes one bit of data to the DS18B20
        BCF     INTCON, GIE             ; Disable Global Interrupts
        CALL    DQ_LL                   ; Force the DQ Line to Logic Low
        BTFSS   STATUS, C               ; Test Carry Flag
        GOTO    $+D'2'                  ; If zero, leave DQ Line Logic Low
        CALL    DQ_HIZ                  ; If not zero, release DQ Line to Logic High
        MOVLW   (D'60'-5)/5             ; For delays from 10uS to 1285uS. Example, MOVLW D'10' for 10uS, MOVLW D'500' for 500uS 
        CALL    DELAY                   ; (D'n'-5)/5; n must be divisable by 5
        CALL    DQ_HIZ                  ; If not zero, release DQ Line to Logic High
        BSF     INTCON, GIE             ; Enable Global Interrupts
        RETURN                          ; 
 
DQ_HIZ  ; This routine forces the DQ Line to an Input / High Impedance state
        BSF     STATUS, RP0             ; Bank 1
        BSF     TRISA, 4                ; Make Pin 3 an input, Pullup resistor forces line to logic 1, unless DS18B20 pulls it low
        BCF     STATUS, RP0             ; Bank 0
        RETURN
 
DQ_LL  ; This routine forces the DQ Line to Logic Low
        BCF     PORTA, 4                ; Clear output latch
        BSF     STATUS, RP0             ; Bank 1
        BCF     TRISA, 4                ; Make Pin 3 an output
        BCF     STATUS, RP0             ; Bank 0
        RETURN
 
DELAY  ; This routine can provide delays from 10uS to 1285uS depending on the number moved to the Working register prior to calling the delay
        MOVWF   DELAYGPR1               ; Move integer to GPR
        NOP                             ; No Operation
        NOP                             ; No Operation
        DECFSZ  DELAYGPR1, F            ; Decrement GPR and place back in itself
        GOTO    $-D'3'                  ; Not finished, GOTO here - 3 instructions
        RETURN                          ; Finished, Return
 
GET_TEMP
        CALL    DS18B20_RESET           ; Reset
        MOVLW   H'CC'                   ; Skiprom
        CALL    DS18B20_WRITE_BYTE      ; Skiprom
        MOVLW   H'44'                   ; Convert T
        CALL    DS18B20_WRITE_BYTE      ; Convert T
 
        CALL    DS18B20_READ_BIT        ; Initiate Read Time Slots
        BTFSS   STATUS, C               ; DS18B20 transmits a 0 while the temperature conversion is in progress and a 1 when the conversion is done.
        GOTO    $-D'2'                  ; Transmitting 0 therefore NOT done
 
        CALL    DS18B20_RESET           ; Reset
        MOVLW   H'CC'                   ; Skiprom
        CALL    DS18B20_WRITE_BYTE      ; Skiprom
        MOVLW   H'BE'                   ; Read Scratchpad
        CALL    DS18B20_WRITE_BYTE      ; Read Scratchpad
 
        CALL    DS18B20_READ_BYTE       ; Move Scrachpad Byte 0 to W
        MOVWF   TEMPLO                  ; Store in TEMPLO GPR
        CALL    DS18B20_READ_BYTE       ; Move Scrachpad Byte 1 to W
        MOVWF   TEMPHI                  ; Store in TEMPHI GPR
 
 
REARRANGE_RESULT  ; This routine rearranges the 2 Temperature result bytes into useable data.
; * After the DS18B20 finishes a Temperature Conversion, the 12-bit result is stored in two 8-bit 
;   registers. This is a signed 16 bit integer therefore the upper nibble of the MSbyte (TEMPHI) 
;   indicates a negative or positive temperature, (0000xxxx xxxxxxxx) 0=Positive 1=Negative
; * As this program will display temperature to 1 decimal place, the lower nibble of the LSbyte
;   is used for the decimal number, (xxxxxxxx xxxx0000). While the upper nibble of the LSbyte and the 
;   lower nibble MBbyte are used for the whole number, (xxxx0000 0000xxxx). 
; * Note that 12-bit resolution gives increments of 0.0625 Degrees Celsius per bit
;
;                               Example, 0000 0011  1001 0001 ;  913 x .0625 = 57.0625 Degrees Celsius
;                                        (MS byte)  (LS byte)
;
; * This routine rearranges the 4 nibbles of both bytes so that a table can be used to obtain 
;   numbers to display.
; * The MSbyte will be used for the 1's, 10's & 100's digits (057), and the LSbyte will be used for the 
;   rounded decimal digit (.1). (Note that the upper nibble of the LSbyte is masked as this is the sign)
;
;     Example above, after rearrangement 0011 1001  0000 0001  
;                                        (MS byte)  (LS byte)
;
 
TEST_IF_NEGATIVE 		
        BCF     FLAGS, 1                ; Clear Negative Flag
        BTFSS   TEMPHI, 7               ; Test Negative Flag. If 1, Temperature is Negative
        GOTO    REARRANGE_NIBBLES       ; NOT Negative, skip over next 6 instructions (Don't Invert & + 1 (2's Complement))
 
  ; Invert & + 1                        ; EXAMPLE Negative Temperature                      TEMPHI = 1111 1110  TEMPLO = 0110 1110 = -25.1250 (see datasheet)
        BSF     FLAGS, 1                ; Set Negative Flag
        COMF    TEMPLO, F               ; Invert TEMPLO (when in Negative Temperature, the DS18B20 inverts the output so this inverts the register back so its positive)
        COMF    TEMPHI, F               ; Invert TEMPHI
        BCF     STATUS, Z               ; Clear Zero bit of STATUS register 
        INCF    TEMPLO, F               ; Increment TEMPLO to add .0625 (after inverting the register, the positive equivelent is .0625 more so this rectifies the negative value being .0625 short)
        BTFSC   STATUS, Z               ; Test Z bit of STATUS register to see if last instruction = 0000 0000
        INCF    TEMPHI, F               ; IS 0 (if TEMPLO overflowed to 0, increment TEMPHI once, if not, skip)
                                        ; EXAMPLE Negative Temperature AFTER Invert & + 1   TEMPHI = 0000 0001  TEMPLO = 1001 0010 = +25.1250
REARRANGE_NIBBLES
                                        ; EXAMPLE,   TEMPHI = 0000 0001  TEMPLO = 1001 0010
        MOVLW   B'11110000'             ; W = 1111 0000
        ANDWF   TEMPLO, W               ; F = 1001 0010   W = 1001 0000
        IORWF   TEMPHI, F               ; F = 0000 0001   F = 1001 0001
        SWAPF   TEMPHI, F               ; F = 1001 0001   F = 0001 1001 = New TEMPHI
        MOVLW   B'00001111'             ; W = 0000 1111
        ANDWF   TEMPLO, F               ; F = 1001 0010                       F = 0000 0010 = New TEMPLO
 
 
BIN_TO_DEC  ; This routine converts an 8-bit number to Decimal and stores the answer in 3 GPR's; HUNS, TENS & ONES
  ; HUNS holds amount of hundreds (i.e. 0000 0010 = 2x100), TENS holds amount of tens (i.e. 0000 0010 = 2x10) & ONES holds amount of ones (i.e. 0000 0101 = 5x1)
        INCF    TEMPHI                  ; Preload TEMPHI + 1
        CLRF    HUNS                    ; HUNS = 0000 0000
 
        MOVLW   D'246'                  ; MOVE Decimal'246' to W
        MOVWF   TENS                    ; TENS GPR = 1111 0101
        MOVWF   ONES                    ; ONES GPR = 1111 0101
        DECFSZ  TEMPHI, F               ; Decement TEMPHI register
        GOTO    $+D'2'                  ; NOT 0, skip next instruction
        GOTO    $+D'7'                  ; IS 0, TEMPHI = 0000 0000, skip next 6 instructions and calculate how many tens and hundreds
        INCFSZ  ONES, F                 ; Increment ONES register, skip if 0
        GOTO    $-D'4'                  ; NOT 0, GOTO here - 4 instructions
        INCFSZ  TENS, F                 ; IS 0, Increment TENS register skip if 0
        GOTO    $-D'7'                  ; GOTO here - 7 instructions & reset the ONES register to D'246'
        INCF    HUNS, F                 ; TENS overflowed, Increment HUNS
        GOTO    $-D'10'                 ; GOTO here - 10 instructions & reset the ONES and TENS registers to D'246'
 
        SUBWF   TENS, F                 ; W still holds D'246 so subract it from TENS register to determine how many 'TENS'
        SUBWF   ONES, F                 ; W still holds D'246 so subract it from ONES register to determine how many 'ONES'
 
  ; TENTHS = Fraction * 10 / 16 (Pommies routine to convert 4 bit number where each bit represents 0.625 degrees, into rounded deciaml number. Please use with his permission. Contact via Electro-Tech-Online.com)
        MOVLW   B'00001111'             ;
        ANDWF   TEMPLO, F               ;
        MOVF    TEMPLO, W               ;
        ADDWF   TEMPLO, F               ; *2, C=0
        RLF     TEMPLO, F               ; *4, C=0
        ADDWF   TEMPLO, F               ; *5, C=0
        RLF     TEMPLO, F               ; *10
        MOVLW   B'00001000'             ; 
        ADDWF   TEMPLO, F               ; Rounding
        SWAPF   TEMPLO, W               ; Pseudo divide by 16
        ANDLW   B'00001111'             ; 
        MOVWF   TENTHS                  ; 
 
  ; Leading zero suppression & minus (-) sign if Temperature Negative
        MOVF    HUNS, W                 ; Does HUNS equal 1 or 2? MOVF instruction affects Z bit of STATUS register 
        BTFSC   STATUS, Z               ; Test Z bit of STATUS register to see if HUNS = 0000 0000
        MOVLW   B'00001010'             ; Jump Pointer for blank arrangement
 
        BTFSC   FLAGS, 1                ; Is Temperature Negative?
        MOVLW   B'00001011'             ; YES, Jump Pointer for - arrangement
        MOVWF   HUNS                    ; 
 
        BTFSS   STATUS, Z               ; Test Z bit of STATUS register to see if HUNS = 0000 0000
        GOTO    $+D'5'                  ; HUNS is not, therefore do not blank TENS
        MOVF    TENS, W                 ; Does TENS equal 0?
        BTFSC   STATUS, Z               ; Test Z bit of STATUS register to see if last instruction = 0000 0000
        MOVLW   B'00001010'             ; Jump Pointer for blank arrangement
        MOVWF   TENS                    ; 
 
  ; This routine would not be needed if interrupts were disabled for the whole BIN_TO_DEC routine. So this is added to minimise the amount of time interrupts are disabled to minimise flicker. 
        BCF     INTCON, GIE             ; Disable Interrupts
        MOVF    HUNS, W
        MOVWF   HUNS_ISR
        MOVF    TENS, W
        MOVWF   TENS_ISR
        MOVF    ONES, W
        MOVWF   ONES_ISR
        MOVF    TENTHS, W
        MOVWF   TENTHS_ISR
        BSF     INTCON, GIE             ; Enable Interrupts
 
        GOTO    GET_TEMP
END

ipek

:020000040000FA
:0200000039289D
:08000800F000030EF10083017A
:100010000A08F2008A010408F30086010508E039A5
:100020002C0485002D08243E840000082B20AC18E9
:1000300001388600AD0A0310AC0C031C2128AD0169
:10004000AC158C107308840072088A00710E83004E
:10005000F00E700E09008207EE348234DC34D634A0
:10006000B23476347E34C234FE34F6340034103484
:10007000080007309F008316103085008601831228
:10008000850186018313203084008001840A841F47
:1000900045280830AC009101831602308C00831291
:1000A0008C01013092008316FA30920083128B1774
:1000B0000B17121599288E205F3093208A200B3061
:1000C0009320051A5B285330932008000830AA00BB
:1000D0006E20AB0CAA0B68282B0808008B138E200F
:1000E0008A200314051E03108B170B309320080081
:1000F000AB000830AA00AB0C8020AA0B7B280800BC
:100100008B138E20031C85288A200B3093208A2095
:100110008B17080083160516831208000512831634
:10012000051283120800AE0000000000AE0B9428F8
:1001300008005B20CC307820443078206E20031CEF
:100140009E285B20CC307820BE3078206620A80026
:100150006620A900AF10A91FB428AF14A809A909E7
:100160000311A80A0319A90AF0302805A904A90E49
:100170000F30A805A90AA001F630A100A200A90B22
:10018000C228C828A20FBF28A10FBE28A00ABD28D8
:10019000A102A2020F30A8052808A807A80DA807E9
:1001A000A80D0830A807280E0F39A300200803194E
:1001B0000A30AF180B30A000031DE22821080319F4
:1001C0000A30A1008B132008A4002108A5002208F2
:0A01D000A6002308A7008B1799284A
:02400E00103F61
:00000001FF

yysbd

sağ bu zaten var benim elimde ama isite deneme yapıcam biliyorsun ki hex olarak istiyor bu şekilde görmüyor pik bunu umarım anlata bimişimdir .

ipek

yysbd  sana lazım olan hex dosyası bu yada elinde zaten var imiş,

öncelikle herhangi bir klasörde yeni bir txt dosyası yarat adınada atıyorum termo.hex ver

forumumuzun kod seç olanağını kullanarak kodu kopyalayıp yapıştır ve kaydet yada buradan indir.

http://www.dosya.tc/server11/xve5ke/forum.rar.html

yysbd

çok sağ tekrar teşekkür ederim kurduğum devrede bir yanlışım var galiba hex çalıştı ama lcd panel düzgün okumuyor yinede yardımların için sağ.yusufdobranyali@hotmail.com bu msn benim bunu eklersen sevinirim bazı takıldığım noktalar oluyor hem yardımcı olmuş olursun çok iyi olur.iyi sabahlar

camby

Yanlız Jake Sutherland isimli şahıs açıklamalara pic çizmiş :D

@yysbd

ipek'in yerine konuşuyor gibi oluyorum ama sorunlarını özelden değil de burdan yazarsen hem senin için hem forum için daha yararlı olur.

Burada oluşturulan hex kodu ile isiste deneme mi yaptın yoksa yazılımı picin iiçine mi attın ?

yysbd

ben bu codu isis te denedim saçmaladı biraz isiste olmadı yani gönderem madem buraya bir bakı verelim hata neden kaynaklanıyor.tekrar yardım içim herkeze teşekkür ederim.http://www.dosya.tc/server11/hrZ2CO/16f628atermo.rar.html buyrun bu elimdekilerin hepsi bir bakarsanız iyi olur.saygılar

kudretuzuner

Merhaba
Arkadaşlar ne iştir ben bu linke girmeye korkuyorum.NORTON zararlı site girmeyiniz diye uyarı veriyor.Sizler gayet rahat dosya indirebiliyorsunuz.Not:Ben de bu upload sitesine üyeydim sonradan dosyalarım silindi.Dosyalarıma ulaşamaz olmuştum.
Amatör

camby

dostum hemen alın yapın değil de , biz yardım etmeye çalışalım . Bilgisayarında isis var ancak , Program yazıp bunları hexe çeviremiyor musun ?

ipek

yysbd
Camby hislerime tercüman olmuş klavyesine sağlık. hiçbir sosyal paylaşım sitesine kayıdım mevcut değildir, özel mesajdan sadece hocalarım ve yöneticiler ile iletişim
kuruyorum.

dönelim asıl meselemize beni dinlememişsin uzantının soy adını hex yap demiştim neyse isis 7 parçalı gösterge simulasyonlarda genellikle başarı gösteremiyor
işlemcinin üstüne gelip çift tık vuruyorsun mhz yazan kısma 4mhz yazıyorsun  program file satırınada hex uzantılı dosyayı çağırıyorsun  r6,r7,r8,r9 diye yeni dirençler ekledim,
bunlar gerçek hayatta olmayacak sadece simulasyona destek olmak için kullandığın işlemci 3GHZ falan ise simulasyon çalışacakdır fakat ekran kırpışabilir bunu gerçek devrene
uyguladığında sorun teşkil etmeyecektir eğer içinde türkçe karakterler barındıran bir klasör altında çalıştırmasan devrenin çalıştığını görecek sekilde ayarladım tekrar yolluyorum..

http://www.dosya.tc/server11/XdsEcV/ipektermo.rar.html

yysbd

s.ipek yardımlarınız için sağ.ben asıl ilk asm ile başladım bu macaralı yola sonra bana bir abim pbp ile uğraş dedi bende inceledim ve baktımki asm ye göre birazdaha kolay.ve bu sebeble uzun zamandan beri asm yi hex çevirmedim ve pc de pbp kurulu olduğu için hata vermiş olabirmi?düşüncesiyle sitenizde paylaşma gereği duydum ve pbp öğrenmeye çalışıyorum yardımve önerileriniz için tekrar hepinize teşekkür ederim.saygılar yysbd

yysbd

s:ipek.ben bu ekteki devreyi kurdum delikli plaket üzerinde yanlız takıldığım konu isiste pwm çıkışından nerdeyse tam 5v alırkan gerçek uygulamada ise 3v alabiliyorum devre tamamen çalışıyor ama takıldığım yer burası çıkış düşük devredemi bir hata var yoksa benim devredemi bir yardımcı olursanız sevinirim bende sizlerin sayesinde bu tarz hatalar neden yapar öğrenmeye çalışıyorum.sizlere kolay gelsinhttp://s2.dosya.tc/server7/xGcfJo/pwmmotorveg__.rar.html

ipek

yazar burada PWM medotu kullanmış ölçü aleti ile pek ölçemezsin ancak motora parallel 47mF C3 kondansatorü var oradan ölçebilirsin.
not boşta ölçülmez çıklısa bir direnç motor lamba gibi bir yük bağlamalısın...

yazar registere 255 değeri olan en yüksek seviyeyi yüklemiş yani yazılımda bir kusur yok..