Hi Marc, perhaps you could try this.. > Marc D. Spencer wrote: > > > What am I doing wrong? this should be the simplest start...turn all port b > > pins on. > > > > Code: > > > > 0000 MOVLW 00 > > MOVWF 0A No need to clear the PCLATH register because it automatically resets to 0 on reset. > > GOTO 005 > > NOP > > NOP If you are not using interrupts, you can keep writing code in these locations. > > 0005 CLRF 04 > > CLRF 03 Don't know why you are clearing the FSR and status registers ??? However, there is no need to do this. Status resets to a known value, the main thing to note is the RP0 bit which is set to RAM Page 0. The value in FSR does not matter because you are not using it. > > MOVLW 07 > > MOVWF 1F This needs to be done to disconnect the comparators from porta inputs. > > 0009 BSF 03,5 > > CLRF 06 > > MOVLW FF > > BCF 03,5 > > MOVWF 06 > > GOTO 009 You do not need to go back to '0009' because you code has already done what you wanted it to do. You can just sit in a closed loop afterwards. > > Using a 16C622, wired trivially: > > > > pin 4 1K to Vcc, .1uF to Gnd You can use the POR reset to eliminate the external .1uF cap if you like. That means that you can also hard wire the MCLR pin to 5V to save a resistor. To enable the POR timer, the PWRTE bit should be set to 1. Your programmer should have a visible selector for this. Also, make sure the WDT is disabled. > > pin 5 gnd ok > > pin 14 to TTL clock module, 10MHz Your clock input should be pin 16 (Osc1) not pin 14. > > pin 12 to +5 Pin 14 is Vdd and should be at +5V. Pin 12 is portb pin RB6. > > > > looking at pins 6-13...all have about .25 v on them, but won't sink an LED > > (with 1K res). Probably confusing to you, but your chip is not set up properly. > > Help? Try this code. Title "Activate Port B" ; list p=16c622, ; processor type ; status equ 3h ; these definitions help you understand rp0 equ 5h ; your code a little easier porta equ 5h portb equ 6h trisa equ 85h trisb equ 86h CmCon equ 1fh ; ; ------------- ; PROGRAM START ; ------------- ; org 000h movlw 7h ; set comparator inputs as digital movwf CmCon bsf status,rp0 ; Ram Page 1 to access tris registers clrf trisa ; porta = all outputs (stops floating inputs) clrf trisb ; portb = all outputs bcf status,rp0 ; back to Ram Page 0 movlw 0xff movwf portb ; set all PortB pins = 5 Volt here goto here ; finished, stay here forever end > > (I don't have a scope, but im pretty sure the power is clean - 7805 with > > appropriate filtering off a wall wart) Good idea for a beginner to have a fixed 5V supply. It's very easy to connect the wrong voltage with a 'Lab' type supply. -- Best regards Tony Multimedia 16F84 Beginners PIC Tools. **New Improved PicNPost** http://www.picnpoke.com Email picnpoke@cdi.com.au