Hi Peoples,
Can anybody show me whats wrong with this code?!? The code appears to run fine, however, it will not allow me to change the TRISA or TRISB (TRIS A & B are stuck on 11111111). Programming in MPLAB 8.92. The code responds to virtual stimulus on the pins. Is there a register I am missing?
Thanks,
Josh
[size=50][code]
list p=16F628A ;SET CHIP MODEL
#include <p16F628A.inc> ;INCLUDE DEFAULTS
__CONFIG _CP_OFF & _WDTE_OFF & _BODEN_ON & _PWRTE_OFF & _LVP_OFF & _CPD_OFF & _INTOSC_OSC_NOCLKOUT & _MCLRE_OFF ;LOAD CONFIG SETTINGS
ORG 0x0000 ;SET ORIGIN TO 0X000
MOVLW 0X07 ;ALL COMPARATORS TO OFF
MOVWF CMCON
BSF STATUS,RP1 ;SELECT BANK0
MOVLW 0X00 ;SET PORT A DIRECTION
MOVWF TRISA
MOVLW 0x00 ;SET PORT B DIRECTOIN
MOVWF TRISB
CLRF INTCON ;SWITCH OFF ALL INTERUPTS
BCF STATUS,RP1 ;SELECT BANK0
START
MOVLW 0xFF
MOVWF PORTB
MOVWF PORTA
END
[/code][/size]


![1N5408 Diode 1000V 3A [ for Rectifier, TTL, Arduino, Pi Projects ] picture](/store/img/g/oAAAAOSw4B9e1sT3/s-l225/1N5408-Diode-1000V-3A-for-Rectifier-TTL-Arduino-Pi.jpg)

