Searching \ for '[PIC] debugging old x54 and x57 code' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'debugging old x54 and x57 code'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] debugging old x54 and x57 code'
2006\06\26@193215 by James Newtons Massmind

face picon face
I've been sucked into an old project with 16C54 and a 16C57 on board and the
code is just... Well, lets just say Olin would probably be violently sick if
he had to look at this. It was written then modified to hit a moving spec
and then patched by at least two different people. Pure hell.

A new version is in work using a modern processor, but this old cash cow
needs to finance the development and to do that, it needs some tweaks and
bug fixes. It isn't worth re-writing the old PIC code.

Trying to figure out what is going on in this code is just beyond me. Bad
thing have happened inside my brain as a result of trying. What I really
want is to be able to watch this code run in the chips ala the '877 or SX
chips.

So: Is there a PIC that has ICD capability that is a pin for pin replacement
for the x54 or x57 other than the SX?

Is there a reasonably low cost way to emulate a x54 or x57?

---
James.


2006\06\26@194513 by Josh Koffman

face picon face
On 6/26/06, James Newtons Massmind <spam_OUTjamesnewtonTakeThisOuTspammassmind.org> wrote:
> Trying to figure out what is going on in this code is just beyond me. Bad
> thing have happened inside my brain as a result of trying. What I really
> want is to be able to watch this code run in the chips ala the '877 or SX
> chips.
>
> So: Is there a PIC that has ICD capability that is a pin for pin replacement
> for the x54 or x57 other than the SX?
>
> Is there a reasonably low cost way to emulate a x54 or x57?

What if you used an ICD capable processor with an adapter board, just
for debugging? A search and replace on PORTA with PORTA_SHADOW might
allow you to use some define statements to emulate the pinout of
another chip.

That said, I've never done this, and I know others on the list have
faced similar problems, so maybe I should just keep quiet :)

Josh
--
A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete
fools.
       -Douglas Adams

2006\06\26@203703 by Xiaofan Chen

face picon face
On 6/27/06, James Newtons Massmind <.....jamesnewtonKILLspamspam@spam@massmind.org> wrote:
>
> So: Is there a PIC that has ICD capability that is a pin for pin replacement
> for the x54 or x57 other than the SX?
>
> Is there a reasonably low cost way to emulate a x54 or x57?
>

Try 16F54/57 and check if ICD2 can fit your needs.

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1335&dDocName=en010205

Take a look at the Migration document.

Regards,
Xiaofan

2006\06\26@210637 by Bob Axtell

face picon face
Josh Koffman wrote:
{Quote hidden}

Yes, I created a paddleboard with a PIC16F876A on it to emulate a
PIC16F627/-628/-648
project, but in fact, it will emulate almost every PIC16 with that same
MCLR/VDD/GND wiring
setup (PIC16F818/819/54/84, etc etc). The paddleboard plugs in where the
PIC16???? did.
Very slick, I used the ICD2 to debug the code.

--Bob

2006\06\26@215901 by Spehro Pefhany

picon face
At 08:37 AM 6/27/2006 +0800, you wrote:
>On 6/27/06, James Newtons Massmind <.....jamesnewtonKILLspamspam.....massmind.org> wrote:
> >
> > So: Is there a PIC that has ICD capability that is a pin for pin
> replacement
> > for the x54 or x57 other than the SX?
> >
> > Is there a reasonably low cost way to emulate a x54 or x57?
> >
>
>Try 16F54/57 and check if ICD2 can fit your needs.
>
>http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1335&dDocName=en010205

The ICD2 works as a programmer only, not a debugger, for those parts,
unfortunately.  Check out migration documents for baseline to midrange
devices, it's not too terrible going in that direction, but some changes
have to be made. There are some quite cheap parts such as the 16F716
but you'd have to deal with sharing pins with ICD2 (RB6, 7) and the
previously mentioned porting issues.

The simulator could also be used, but it too has limitations. How hard can
it be to figure out with only 512 words of program memory?

;-) ;-)  Good luck.

>Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
EraseMEspeffspam_OUTspamTakeThisOuTinterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
->>Test equipment, parts OLED displys http://search.ebay.com/_W0QQsassZspeff


2006\06\27@071205 by olin piclist

face picon face
James Newtons Massmind wrote:
> I've been sucked into an old project with 16C54 and a 16C57 on board
> and the code is just... Well, lets just say Olin would probably be
> violently sick if he had to look at this. It was written then modified
> to hit a moving spec and then patched by at least two different people.
> Pure hell.
>
> ...
>
> Trying to figure out what is going on in this code is just beyond me.
> Bad thing have happened inside my brain as a result of trying.
>
> ...
>
> It isn't worth re-writing the old PIC code.

Are you sure?  I just checked the ancient scrolls, and the 16C54 only has
512 instructions.  Starting with the spec and a clean slate might be exactly
the way to go to get to the end result more quickly, economically, and with
more confidence.  Just trying to understand the existing code alone would
probably take as long or longer than just creating new code to match the
spec.

Is the new code going onto existing boards with the old chips on them, or
newly manufactured boards of the old design?  If the latter, then you could
substitute a 16F627A for the 16C54.  It has the same pinout, is easier to
develop with, has more memory, and most likely costs less.  Developing for
the 16F627A family is easy because it is supported by the ICE-2000.

If you've got a good spec, I can give you a fixed price quote for developing
the firmware on a 16F627A.

> So: Is there a PIC that has ICD capability that is a pin for pin
> replacement for the x54 or x57 other than the SX?
>
> Is there a reasonably low cost way to emulate a x54 or x57?

The '54 is no problem, but you're screwed with the '57.  That 28 pin
footprint is in the same "Huh?  We never did that" catagory as the PIC 17.

Again, it comes down to what you are trying to preserve, the cost of that,
and the cost of updating.  You could make an adapter board to emulate the
16C57 footprint from a more modern processor, like 16F876A or 18F252.  Or
you could respin the board changing only the processor pinout.  Or you could
go straight to the new design and save money trying to make the dinosaur hop
along a few more paces.


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2006\06\27@083003 by Larry G. Nelson Sr.

picon face
I have emulation tools for both of these. I have an "OLD" parallax emulator as well as a picmaster that both do these. I never tried on my ICE2000 but that should work too. I did lots of projects with these parts when I started consulting with Microchip parts. Not sure what it would take to get back and running with this but would also be willing to quote on a project with a solid spec. I did a series of building strobes using the 54 and the original Black Flag Light on my web site uses a 54 and 57 that run the remote and the sign while communicating serially between the two.
Larry
http://www.mchipguru.com


---- Olin Lathrop <olin_piclistspamspam_OUTembedinc.com> wrote:
{Quote hidden}

> --

2006\06\27@094426 by William Bross

picon face
Hi James,

Physically, you could use an ICD-2 with the 627A/628A/648A adapter.  
Pretty much the same pinout.  You'd have to change around the code a bit
to make it run though - turn off all the nifty new peripherals and
timers, uart and re-org the data registers. Take care not to exceed the
limits of the old 5x parts so there are no surprises when you put the
code back into the old parts.   I did that for quite a few of my old
'legacy' projects that just wouldn't go away.

That's probably the cheapest way to go.  You could also find an old
PICmaster and get the 5x pod for it.  Then just snag an old copy of
MPLAB 5.7 and you'd have the full blown emulator.  If you're looking for
some help / tools, feel free to contact me off list.

Bill

James Newtons Massmind wrote:

{Quote hidden}

2006\06\27@131945 by Matt Pobursky

flavicon
face
On Tue, 27 Jun 2006 07:13:45 -0400, Olin Lathrop wrote:
{Quote hidden}

I have to agree with Olin here. I've done dozens of these kinds of
projects over the years and have found it's almost always best to toss
the old stuff and start from scratch, especially in such a small
device.

The amount of time you'll spend (and pay for!) to basically reverse
engineer the old code will more than easily cover writing a formal
specification and re-write the code. Been there, done that too many
times. There are exceptions but they are very few and far between in my
experience.

Matt Pobursky
Maximum Performance Systems

2006\06\27@204311 by James Newtons Massmind

face picon face
Many thanks to all for the responses to this question. I've put it all the
customer and it is up to him to decide how to spend his money.

---
James.


More... (looser matching)
- Last day of these posts
- In 2006 , 2007 only
- Today
- New search...