Thanks everyone for the suggestions, will try them as soon as I get time! GRAHAM ---------- From: Dr. Imre Bartfai [SMTP:root@PROF.PMMF.HU] Sent: 18 November 1999 09:49 To: PICLIST@MITVMA.MIT.EDU Subject: Re: 12c508 problems Hi, two additional remarks: the 1st line is bogus even if you want to set OSCCAL manually, as the statement movfw 0x1ff makes no sense. > > movlw .100 ; Rtcc = 225 It will load decimal 100 to W instead of 225 or whatever you intended. I hope this helps. Regards, Imre On Wed, 17 Nov 1999, J Nagy wrote: > Graham North wrote: > > >I am have problems with a simple program to make leds flash with a 508. The > >program simulates correctly, but when programmed the chip does nothing. > > > > Offhand, ignoring syntax that I'm not familiar with, I can see two things > that I'd look at: > > > org 0x00 ;Start of code space > > >;************************** Main ******************************** > > > > movfw 0x1ff > > movwf OSCCAL ;Set oscillator calibration reg. > > > Microchip has been kind enough to place a MOVLW at location > $1FF, the startup vector, for you. When the chip reaches location $000, all > you need to do is MOVWF OSCCAL (if you intend to use the internal > oscillator). Eliminate your first line. > > > >Wait_5ms ;do > > movwf RTCC > >Timer_check ;do > > movf RTCC,W ; read Rtcc > > btfss STATUS,Z > > goto Timer_check ;while (Rtcc<>0) > > return > > > You've defined RTCC as register 8, but don't do anything with it for it to > ever become zero. Were you perhaps thinking of register 1 (TMR0)? > > Hope this has been helpful, > > > Jim Nagy > Elm Electronics > ICs for Experimenters > http://www.elmelectronics.com/ > >