--------------Boundary-00=_J2DOCNAF3C5JHZHAJGLB Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I know what it is like when you are starting something new and have all t= hese=20 factors/parameters/variables that you want to minimize/eliminate. If all= you=20 want is a sanity-check, I went ahead and created this quick little code=20 snippet, which I built and verified on a 16F627A. It works and flashes L= EDs=20 (at different rates on different pins of port B). From here, you need to= =20 make just 2 changes -- where it says 627a, change it to 648A. There is n= o=20 reason that it should not work. File attached... Cheers, -Neil. On Sunday 11 September 2005 03:35 pm, Carlos A. Marcano V. scribbled: > Thank you all for your answers! > > I haven=B4t played for a while with PIC=B4s and I happen to have a > Wisp628 (wich I bought last year, I assambled it but have not ever used= !) > and a few 16LF648A. I know it is a low voltage version of the 16F648A. = I > just wanted to have a known working "blink-a-led" program (and assemble= r > source code) to test my hardware and to "refresh" my mind. The part tha= t is > getting me confused is the /MCLR pin and the possible gotchas when > programming the PIC. Thank you all for your time! > > Regards, > *Carlos Marcano* > -Guri, Venezuela- --------------Boundary-00=_J2DOCNAF3C5JHZHAJGLB Content-Type: text/plain; charset="iso-8859-1"; name="p627a-test.asm" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="p627a-test.asm" ;---------------------------------------------------------------------=0D= =0D ; P627A-TEST:=09Quick port toggler to see if the F627A programs and work= s.=0D=0D ;=0D=0D ;---------------------------------------------------------------------=0D= =0D ;=0D=0D ;=09TODO:=0D=0D ;=0D=0D ; OPTIONS:=0D=0D ; - Buzzer pulses on alarm, instead of steady=0D=0D ; - Implement button-clicks.=0D=0D ;=0D=0D ;=0D=0D ;---------------------------------------------------------------------=0D= =0D =0D=0D =0D=0D =09LIST P=3D16F627a=0D=0D =09INCLUDE "p16f627a.inc"=0D=0D =09ERRORLEVEL -302=09=09; Block bank-selection warnings.=0D=0D =09__CONFIG _PWRTE_ON & _INTOSC_OSC_NOCLKOUT & _MCLRE_ON & _WDT_OFF & _LV= P_OFF=0D=0D =0D=0D =09CBLOCK=09H'20'=0D=0D =09 TMPREG1=09=09; General working space=0D=0D =09 COUNTER=09=09; Counter that is sent to output port=0D=0D =09ENDC=0D=0D =0D=0D =0D=0D =09ORG=090x00=0D=0D =09goto=09Init=0D=0D =0D=0D =0D=0D =0D=0D ;---------------------------------------------------------------------=0D= =0D ; Initialization section...=0D=0D ;---------------------------------------------------------------------=0D= =0D =0D=0D Init:=0D=0D =09clrf=09INTCON=09=09; All interrupts off=0D=0D =0D=0D =09bsf=09STATUS,RP0=09; Select bank 1=0D=0D =09bcf=09STATUS,RP1=09; ...=0D=0D =0D=0D =09movlw=09B'00000000'=0D=0D =09movwf=09TRISA=09=09; AN0,1,RA4 are inputs, AN2,3=3DVref-/+, rest o/ps=0D= =0D =09movwf=09TRISB=09=09; RB0-7 are outputs=0D=0D =0D=0D =09movlw=09B'10001111'=0D=0D =09movwf=09OPTION_REG=0D=0D =0D=0D =09bcf=09STATUS,RP0=09; Select bank 0...=0D=0D =09bcf=09STATUS,RP1=09; ...=0D=0D =0D=0D =09clrf=09PORTA=09=09; Clear port A=0D=0D =09clrf=09PORTB=09=09; Clear port B=0D=0D =0D=0D =09clrf=09COUNTER=0D=0D InitDone:=0D=0D =0D=0D =0D=0D ;---------------------------------------------------------------------=0D= =0D ; Main Code Loop=0D=0D ;---------------------------------------------------------------------=0D= =0D =0D=0D MainLoop:=0D=0D =09incf=09COUNTER,F=0D=0D =09movf=09COUNTER,W=0D=0D =09movwf=09PORTB=0D=0D =0D=0D Delay:=0D=0D =09movlw=09D'255'=0D=0D =09movwf=09TMPREG1=0D=0D DLoop1:=0D=0D =09nop=0D=0D =09decfsz=09TMPREG1,F=0D=0D =09goto=09DLoop1=0D=0D DelayDone:=0D=0D =0D=0D =0D=0D MainLoopDone:=0D=0D =09goto=09MainLoop=0D=0D =0D=0D =0D=0D =0D=0D =09end=0D=0D =0D=0D --------------Boundary-00=_J2DOCNAF3C5JHZHAJGLB Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --------------Boundary-00=_J2DOCNAF3C5JHZHAJGLB--