> 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 <osccal const> 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/
>
>