piclist 2002\12\13\235340a >
Thread: Strange program behaviour
picon face BY : stanton54 email (remove spam text)

I think you have a banking problem. Buff1-Buff8 are globals 08 through
0F which is OK. Then Buff9 is 10.
The line
       mov neg,buff9
means set neg (through W) to byte 0 in whichever bank is selected by the
upper FSR bits - which looks to be bank 0.
But if you set INDF to 10 then FSR is byte 0 of bank 1.
The rest of the variables are semi-directly addressed, so again they are
in bank 0 and inaccessible only semi-directly accessible.

The explanation of INDF and FSR in the 48/52 manual (pages 18 & 19) is a
little bit better, you might want to look at that.

Also, in one spot you set bit 4 of !RA which I think only has 4 bits on
the 18/20/28.

Jinx wrote:
> I've a program and circuit here
> http://home.clear.net.nz/pages/joecolquitt/PIC2SX.html
> that's got me stumped. As a newbie to SX it's possibly because
> of something I don't know about them

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
<3DFAB88D.61EC640E@earthlink.net> 7bit

See also: www.piclist.com/techref/ubicom/devices.htm?key=sx
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Strange program behaviour

month overview.

new search...