PICmicro & dsPIC >> PICmicro & dsPIC

Pages: 1
Mike_Swede



Reged: Jun 28 2004
Posts: 3
Loc: Haellingsjoe, Sweden
PICC-Lite to produce 2kWord output to a 16F628?
      #12660 - Mon Jun 28 2004 02:43 AM

Hi,
I've been using the PICC-Lite to my 16F84 projects for a while now. Now I've hit the ceiling of the 16F84 in terms of space needed and wonder if it is possible to compile using the 16F627 combined with a define 16F628 to compile for the 16F628 target?

Reason being that I've seen, in the 16F627 header, that it has some precompiler ifdefs looking for a defined 16F628 and that my communication protocol looks really poor when I have to shorten down the strings I'm using to initial letters only... (I think I'm using around 200 characters in all, in my protocol, and each character seems to expand to around 2 "bytes" when compiled (I guess each consecutive character of a string compiles to a 'ret 0xcc')).

Thanks in advance!
/Mike

http://www.lillhult.com/


Post Extras: Print Post   Remind Me!   Notify Moderator  
John Payson

****

Reged: Oct 16 2003
Posts: 1251
Re: PICC-Lite to produce 2kWord output to a 16F628? [Re: Mike_Swede]
      #12667 - Mon Jun 28 2004 03:35 PM

The PIC-lite products are designed to prevent their use in creating oversized products. After all, if people could use the free PIC-lite to do everything, why would they want to spend big money for the 'real' compiler?

That having been said, if your project will mostly fit in 1K of storage except for some strings or data tables which go beyond that, you may be able to create two separate programs:
  • The main program, written and compiled in C
  • A collection of data-lookup tables, written in assembly-language using some other toolset.

The C program would have to use special access routines or tricks to access any of the data from the assembly-language part, and the hex files from both parts would have to be combined before use (easily done with a batch file), but for some types of data-heavy application this approach may be quite workable.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mike_Swede



Reged: Jun 28 2004
Posts: 3
Loc: Haellingsjoe, Sweden
Re: PICC-Lite to produce 2kWord output to a 16F628? [Re: John Payson]
      #12676 - Tue Jun 29 2004 08:14 AM

I already considered just compiling to asm, to assemble it all (MPASM doesn't come with any such limitations that I know of) instead of compiling it in one "big" C-file.

But - I found another way, I think, by using ebs_cc (found on gnupic.org) instead. It seems to be highly configurable and "generic" enough to fit even a 2kWord compile for a 16F628.

If it won't make it, I'm even considering building my own compiler. Would be nice giving it away under some sort of GPL conditions ;-) For no other reason than the satisfaction it would give me just handing it out for free to anyone asking for such a compiler.

I hope the ebs_cc will do.


Thanks!


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mike_Swede



Reged: Jun 28 2004
Posts: 3
Loc: Haellingsjoe, Sweden
Re: PICC-Lite to produce 2kWord output to a 16F628? [Re: Mike_Swede]
      #12712 - Thu Jul 01 2004 04:53 PM

In spite of the header text in the lib\piclite.ini file stating
QUOTE
# This file defines the memory sizes and organization
# of PIC devices associated with the PICC Lite compiler.
# Additions or modifications cannot be made.
END QUOTE

I had a go at adding the section
[16F628]
ARCH=PIC14
PROCID=6628
ROMSIZE=800
BANKS=2
RAMBANK=20,7F
RAMBANK=A0,EF
COMMON=70,7F

between the original sections [16F627] and [12F629].

Seems to work beatiful - meaning that I won't have to build my own compiler yet ;-)...


Regards
/Mike


Post Extras: Print Post   Remind Me!   Notify Moderator  
luckyAdministrator
Microchip staff
*****

Reged: Oct 06 2003
Posts: 1204
Loc: Brisbane, Australia
Re: PICC-Lite to produce 2kWord output to a 16F628 [Re: Mike_Swede]
      #12713 - Thu Jul 01 2004 06:31 PM

Quote:

In spite of the header text in the lib\piclite.ini file stating




In spite of the warning we put in the INI file, people still attempt to change it and later wonder why things don't work as expected.



--------------------
Matt Luckman
Microchip Technology Inc.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Dan HenryModerator
Guru
****

Reged: Oct 16 2003
Posts: 4218
Loc: Colorado
Re: PICC-Lite to produce 2kWord output to a 16F628? [Re: Mike_Swede]
      #12715 - Thu Jul 01 2004 07:25 PM

Quote:

...I'm even considering building my own compiler. Would be nice giving it away under some sort of GPL conditions ;-) For no other reason than the satisfaction it would give me just handing it out for free to anyone asking for such a compiler.



Hmm, let's see... Doesn't that already exist?

http://sdcc.sourceforge.net/

Knowing that, if I had the choice, I'd find a way to use my time to make enough money to buy HI-TECH's PICC!

On the other hand, if it's purely for the academic exercise, I'd be the last to discourage you. Go for it!

Edited by Dan Henry (Thu Jul 01 2004 07:27 PM)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
1 registered and 27 anonymous users are browsing this forum.

Moderator:  mikerj, jtemples, jeff, Dan Henry, Andrew L 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is enabled
      UBBCode is enabled

Rating:
Topic views: 6270

Rate this topic

Jump to

Contact Us | Privacy statement HI-TECH Software

Powered by UBB.threads™ 6.5.5