Hey guys,
okay here is my first PIC program
It basically sets RA1 and RA0 to output, and sends a logicla 1 to those outputs, very very simple.
when I click on Assemble, i get the following warnings and messages
Executing: "C:\Program Files\Microchip\MPASM Suite\MPAsmWin.exe" /q /p16F877 "f877temp.asm" /l"f877temp.lst" /e"f877temp.err" /o"f877temp.o"
Warning[203] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\TEMPLATE\CODE\F877TEMP.ASM 17 : Found opcode in column 1. (bcf)
Warning[203] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\TEMPLATE\CODE\F877TEMP.ASM 18 : Found opcode in column 1. (bsf)
Warning[203] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\TEMPLATE\CODE\F877TEMP.ASM 20 : Found opcode in column 1. (movlw)
Warning[203] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\TEMPLATE\CODE\F877TEMP.ASM 21 : Found opcode in column 1. (movwf)
Message[302] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\TEMPLATE\CODE\F877TEMP.ASM 21 : Register in operand not in bank 0. Ensure that bank bits are correct.
Warning[203] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\TEMPLATE\CODE\F877TEMP.ASM 23 : Found opcode in column 1. (bcf)
Warning[203] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\TEMPLATE\CODE\F877TEMP.ASM 24 : Found opcode in column 1. (bcf)
Warning[203] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\TEMPLATE\CODE\F877TEMP.ASM 26 : Found opcode in column 1. (movlw)
Warning[203] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\TEMPLATE\CODE\F877TEMP.ASM 27 : Found opcode in column 1. (movwf)
Warning[205] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\TEMPLATE\CODE\F877TEMP.ASM 30 : Found directive in column 1. (end)
BUILD SUCCEEDED: Sun Mar 19 10:44:16 2006
what is wrong with my code?
Secondly , how can I go through each line of code, step by step, and monitor the values of the STATUS register and the TRISA and PORTA registers ?
thanks guys
okay here is my first PIC program
Rich (BB code):
list p=16f877 ; list directive to define processor
#include <p16f877.inc> ; processor specific variable definitions
__CONFIG _CP_OFF & _WDT_ON & _BODEN_ON & _PWRTE_ON & _RC_OSC & _WRT_ENABLE_ON & _LVP_ON & _DEBUG_OFF & _CPD_OFF
; '__CONFIG' directive is used to embed configuration data within .asm file.
; The lables following the directive are located in the respective .inc file.
; See respective data sheet for additional information on configuration word
;**********************************************************************
ORG 0 ; processor reset vector
bcf STATUS,RP1 ;
bsf STATUS,RP0 ; RP1:RP0 = 01 Switch To Bank 1
movlw b'111100' ; Set RA0 and RA1 to output
movwf TRISA
bcf STATUS,RP1
bcf STATUS,RP0 ; RP1:RP0 = 00 Switch To Bank 0
movlw b'000011'
movwf PORTA
end
It basically sets RA1 and RA0 to output, and sends a logicla 1 to those outputs, very very simple.
when I click on Assemble, i get the following warnings and messages
Executing: "C:\Program Files\Microchip\MPASM Suite\MPAsmWin.exe" /q /p16F877 "f877temp.asm" /l"f877temp.lst" /e"f877temp.err" /o"f877temp.o"
Warning[203] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\TEMPLATE\CODE\F877TEMP.ASM 17 : Found opcode in column 1. (bcf)
Warning[203] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\TEMPLATE\CODE\F877TEMP.ASM 18 : Found opcode in column 1. (bsf)
Warning[203] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\TEMPLATE\CODE\F877TEMP.ASM 20 : Found opcode in column 1. (movlw)
Warning[203] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\TEMPLATE\CODE\F877TEMP.ASM 21 : Found opcode in column 1. (movwf)
Message[302] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\TEMPLATE\CODE\F877TEMP.ASM 21 : Register in operand not in bank 0. Ensure that bank bits are correct.
Warning[203] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\TEMPLATE\CODE\F877TEMP.ASM 23 : Found opcode in column 1. (bcf)
Warning[203] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\TEMPLATE\CODE\F877TEMP.ASM 24 : Found opcode in column 1. (bcf)
Warning[203] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\TEMPLATE\CODE\F877TEMP.ASM 26 : Found opcode in column 1. (movlw)
Warning[203] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\TEMPLATE\CODE\F877TEMP.ASM 27 : Found opcode in column 1. (movwf)
Warning[205] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\TEMPLATE\CODE\F877TEMP.ASM 30 : Found directive in column 1. (end)
BUILD SUCCEEDED: Sun Mar 19 10:44:16 2006
what is wrong with my code?
Secondly , how can I go through each line of code, step by step, and monitor the values of the STATUS register and the TRISA and PORTA registers ?
thanks guys