Dear Clueless ;-) >;see the .inc file for futher details on notation. Below are a few > examples. > (I don't know where to find this 'inc' file mentioned) .inc files should be in the MPASM folder, probably Program Files/Microchip/MPASM Suite > CONFIG OSC=LP ;I'll use a 20MHz crystal at OSC1 & OSC2 CONFIG OSC = HS then > start > CLRF PORTB ;initialize port B > MOVLW b'11111110' ;configure RB0 as output > MOVWF TRISB > MOVLW b'00000001' ;set RB0 high > MOVWF TRISB > > goto $ > MOVLW b'11111110' ;configure RB0 as output > MOVWF TRISB Having all those floating inputs would probably cause problems in practice. If you're looking at experimenting with just one pin then CLRF TRISB to set them all as outputs The other problem with that code is > MOVLW b'00000001' ;set RB0 high > MOVWF TRISB doesn't set the output high. You should be working on LATB. Note that 18F have two registers per port. PORT is the input, LAT is the output > Executable code and data must be defined in an appropriate section (152) When generating a linkable object file, all executable code and data declarations must be placed within appropriate sections Not an error I've had. Does the MPLAB explanation help ? -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist