Räcker denna kodbiten eller behöver ni mer? Hela koden finns på http://www.dunmire.org/projects/MEEPS/s ... loader.asm
Kod: Markera allt
;*************************************************************************
; Suppress warning errors from MPASM
errorlevel -306
errorlevel -302
;*************************************************************************
; Configuration settings
ON EQU 1 ;TRUE
OFF EQU 0 ;FALSE
FULLMEM SET ON ;full, 8K parts, 16F877/16F876
;FULLMEM SET OFF ;half, 4K parts, 16F874/16F873
;PASSPROT SET ON ;password protection is on
PASSPROT SET OFF ;password protection is off
;Oscillator frequency, typically 3.6864, 4, 10, 16, or 20MHz
FOSC equ D'20000000'
;Communications speed - note that not all baud rates are possible
; Do not change this value without reviewing
; section 10.1 of the PIC16F87x data sheet.
BAUD equ D'19200'
;CTS bit selection
; E2 for MEEPS
; B6 for generic picloader replacement
CTSPORT equ PORTE
CTS_D equ 2h ;CTS input from host
;(The _D designation signifies that
;this is a data signal rather than
;the RS-232 signal.)
;*************************************************************************
; CPU Configuration Fuses
;
; Note that the watchdog timer is enabled and will be serviced while
; QwikLoader (this program) is running. The user program must service
; the watchdog to avoid the watchdog reset.
__CONFIG _BODEN_ON&_CP_OFF&_WRT_ENABLE_ON&_PWRTE_ON&_WDT_ON&_HS_OSC&_DEBUG_OFF&_CPD_OFF&_LVP_OFF
;*************************************************************************
; Variable Declarations