Mark Crankshaw wrote: > I'm still quite new to PICs (and have just returned to the list after a > break) but have used 'F84s successfully for a couple of projects. Now that > I can obtain 'F877s I am trying to convert my projects to use the 'F877 so > that I can then expand the projects. > > However I'm having problems. I started by simply changing register > addresses to suit the 'F877 but that didn't work. To cut a long story > short I'm now back to trying to get LEDs to flash! I have a simple circuit > on stripboard with an 'F877, voltage reg.,0.1 uF cap. across the supply, 4 > MHz crystal with 2 15 pF caps., MCLR tied directly to 5V and 8 LEDs with > resistors on PORTB. The following program works, well kind of - the > LEDs come on one at a time and then go off rather one running up and > down the line, but at least it does something (WDT enabled of course): > Mark, you can use include files to set the values for each PIC special function register: example: #INCLUDE (*.inc files will be hild in your MPLAB directory) you can set config registers like this: __CONFIG _MCLRE_OFF & _WDT_OFF & _INTRC_OSC_NOCLKOUT & _PWRTE_ON & _CP_ON free ram file registers can be set in bulk like this: CBLOCK H'20' ;(substitute free ram start value for your processor) INT_W,INT_STATUS,INT_FSR TRX_PTR,XBITPOS (etc) ENDC Check the initialisation values for special function registers, ports may be set for analogue input etc. regards, Graham.