What is the state of the IRP bit in STATUS?
Bob Ammerman
RAm Systems
----- Original Message -----
From: "Nigel Orr" <nigel
KILLspamAXONINSTRUMENTS.CO.UK>
To: <.....PICLISTKILLspam
.....MITVMA.MIT.EDU>
Sent: Tuesday, August 19, 2003 4:17 AM
Subject: Re: [PIC]: Addressing Bank 1 data space
{Quote hidden}> I've added some comments to say what I think the code is doing, check if
> they are what you expected...
>
> > B1_COUNT equ 0xA0
> > B1_ARRAY equ 0xA0
> > B1_OTHERDATA equ 0xC3
> > B1_MOREDATA equ 0xC4
> >
> > ; A method "foo" is called twice by my main program logic.
> > ;
> > foo
> > banksel B1_COUNT ; This is the ONLY reference to B1_COUNT
> anywhere:
> > incf B1_COUNT ; Increment data stored at 0xA0
> > movlw B1_ARRAY
> > addwf B1_COUNT, W ; Add literal 0xA0 to current value at
location
{Quote hidden}> 0xA0
> > movwf FSR ; Store that as an address
> > incf INDF ; Increment the value at register ((contents of
> location 0xA0)+0xA0)
> > return
>
> Where is B1_COUNT initialised?
>
> If it starts life as 94 or greater, the value in FSR will overflow
>
> If it starts life as 0xFF, on the first call it will be incremented to
> 0x00, then it will overwrite itself with 0xA0
>
> There are other options for odd behaviour, I would check very carefully
> what the value is set to on entry to 'foo', perhaps transmit it from the
> serial port before and after foo is called? Then come back and tell us
> what the results were.
>
> Nigel
> --
> Nigel Orr, Design Engineer
EraseMEnigelspam_OUT
TakeThisOuTaxoninstruments.co.uk
> Axon Instruments Ltd., Wardes Road,Inverurie,Aberdeenshire,UK,AB51 3TT
> Tel:+44 1467 622332 Fax:+44 1467 625235
>
http://www.axoninstruments.co.uk
>
> --
>
http://www.piclist.com hint: To leave the PICList
>
piclist-unsubscribe-request
spam_OUTmitvma.mit.edu
>
--
http://www.piclist.com hint: To leave the PICList
@spam@piclist-unsubscribe-requestKILLspam
mitvma.mit.edu