> From: Jean-Francois Joly > > Hi everyone! > > I tried to make a program for the PIC16C84 wich turns certain pins of portb > low. (I took the exemple from the data sheet section 5-2.) I was hoping for > the program to work (it looks so simple!) but for some unknow reason, it > doesn`t. It could be hardware problem, but not sure... it uses RC oscillator. > > ***************************************************************************** > INCLUDE C:\DEV\MPASM\P16C84.INC > > CLRF PORTB ; initizalise PORTB data latches > BSF STATUS, RP0 ; select bank 1 > MOVLW 0xCF ; initizalise data direction > MOVWF TRISB ; set RB<3:0> as inputs, > ; RB<5:4> as outputs and RB<7:6> as inputs > END ; end program > ***************************************************************************** > > That`s it! If something is wrong, please tell me! If there`s no error, well, > I guess I`ll need help on the hardware part.. (How to connect the pic) The END doesn't necessarily end the running of the program. Subsequent (random) instructions in ROM might be doing something unexpected. Try inserting 'GOTO $' before the end. Other than that, it's a hardware problem. Regards, SJH Canberra, Australia