diamadiss
Member level 1
Hello to everybody.I want to use two comporators from the PIC16F877 as "TWO INDEPENDENT COMPORATORS". In this part i have a problem with the register CMCON. This register lies in the bank 1. I state him as it seems below at page 1 with the IN\OUTS, but the MPLAB shows me an error. Can anybody help me to solve this problem? I want to underline you that this specific pic i haven't used him before. Thanks!
Code:
LIST P=16F877
INCLUDE "P16F877.INC"
DELAY1 EQU 0X20
DELAY2 EQU 0X21
DELAY3 EQU 0X22
REG1 EQU 0X34
ORG 0x00
BSF STATUS,RP0
MOVLW B'00000010' ;TWO INDEPENDENT COMPORATORS
MOVWF CMCON
MOVLW B'00111111' ;IN
MOVWF TRISB ;IN
MOVLW B'11111111' ;OUT
MOVWF TRISC ;OUT
BCF STATUS,RP0
START
........