gnupic: hiccoughs on the learning curve.
Subject:
Re: hiccoughs on the learning curve.
From:
Declan Moriarty ####@####.####
Date:
26 Sep 2002 14:41:29 -0000
Message-Id: <02092616460504.00813@genius.chateau.dec>
Was it Samuel Tardieu who wrote on Thursday 26 September 2002 15:30:
> On 26/09, Declan Moriarty wrote:
> | movlw 0x3f ; W = 0011 1111
> | movf PORTC, 1 ; should put W in PORTC but doesn't
>
> movf does not move W anywhere:
I noticed ;-). My fault.
>
> However, do not forget to set TRISC before, as PORTC pins are inputs by
> default.
I did that, actually.
>
> | 2. Again to look at gpsim, this writes to TMR1L but not to TMR1H :-o
> | clrf STATUS ; BANK 0.
> | movlw 0x04 ; W=0000 0101
> | movwf T1CON ; Sets TMR1 @ 1:1 prescale, & internal clk, & off.
> | clrf TMR1L ; Sets TMR1L as zero
> | movlw 0xfb ; w=0xfb
> | movwf TMR1H ; Timer 1 prescaler = FB
> |
> | I can't spot the obvious mistake.
>
> It looks like a bug in gpsim, TMR1H contains zero just after the write. Or
> something obscure is hidden deep in the datasheet that I can't spot right
> now :)
|The only thing I spotted was that you needed to have the timer stopped to
write to those registers. I think there's more in the midrange manual on them.
Thanks for the reply
--
Regards,
Declan Moriarty
Applied Researches - Ireland's Foremost Electronic Hardware Genius
A Slightly Serious(TM) Company
Experience is like a comb,
that Life gives you - AFTER all your hair has fallen out!