gnupic: Thread: Re: gpsim & 18f parts


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Re: gpsim & 18f parts
From: Brad Parker ####@####.####
Date: 29 Apr 2003 16:48:31 -0000
Message-Id: <200304291633.h3TGXv327179@p2.parker.boston.ma.us>

Hi,

I'm been trying to use gpsim with some 18f458 code.  I've discovered
that the 18f code is incomplete :-)

I've fixed some missing things, mostly trivial (my c++ is a little rusty
but it's coming back).  I'll be happy to post diffs or email them.

This morning I added support for PCLATU but stepping through a jump table
(a.k.a computed goto, ahh, remember PUSHJ? :-) I got thrown for a loop.

The 18f's, as I understand it, number program memory as bytes and the PC
is never odd.  I.e. it steps 0,2,4,...  But the raw program memory dump
was showing 16 bit instructions at 0,1,2,3... and it appears my pc didn't
match my code at all.  The amazing thing is that things where mostly working.

where "mostly working" = everything works as long as the pc
modifications are relative, but once you start fooling with pclatl,h,u
using absolute addresses things go bad.

I'm confused about what to do - is this a major hurtle or is there some
easy fix?  In the 12 & 14 bit parts life is simple as the pc numbers the
instructions locations.  In the 16 world this is not true any more.

sorry if I'm hopelessly confused.  any/all clues accepted.

-brad

[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.