Searching \ for 'Please HELP me, with your answer.' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/index.htm?key=please+help+with
Search entire site for: 'Please HELP me, with your answer.'.

Truncated match.
PICList Thread
'Please HELP me, with your answer.'
1998\02\18@121247 by Rajko Cebavs

flavicon
face
Hello!

I need a little help from you?
I was programming my PIC16F84 and the programm seems to be to
long.

Now I am asking you, is it posible to write programms longer then 1K
which is free EEPROM size for program.
What is your advice, or solution, to this problem
Should I use another type of microcontroler or something else.
Or is it posible to write my program in some external memory and
then conext it with PIC16F84.

The program is written in C language.

Thank you very, very, very much for your kind answer.


Rajko
Rajko Cebavs
Ljubno 111
4244 Podnart
Slovenia
phone  0038664731568
E-mail : spam_OUTRajko.CebavsTakeThisOuTspamguest.arnes.si

1998\02\18@123343 by Thomas Magin

flavicon
face
At 17:40 18.02.1998 +0000, you wrote:

Hi,

>The program is written in C language.

quite easy: change to Assembler and you will have enough memory space.

Thomas
=8-)


**********************************************************
* Thomas Magin                  FON:   ++49-761-4543-489 *
* marquette-Hellige GmbH        FAX:                -507 *
* Emergency Systems             email: .....maginKILLspamspam@spam@hellige.de  *
* Munzinger Str. 3                                       *
* D-79111 Freiburg / Germany                             *
**********************************************************

1998\02\18@125646 by Dorian

flavicon
face
Rajko Cebavs wrote:

> Hello!
>
> I need a little help from you?
> I was programming my PIC16F84 and the programm seems to be to
> long.
>
> The program is written in C language.

Hand-code will probably fit.

dorian

1998\02\18@131252 by unthiti Patchararungruang

flavicon
face
On Wed, 18 Feb 1998, Rajko Cebavs wrote:

> I need a little help from you?
> I was programming my PIC16F84 and the programm seems to be to
> long.
>
> Now I am asking you, is it posible to write programms longer then 1K
> which is free EEPROM size for program.
> What is your advice, or solution, to this problem
> Should I use another type of microcontroler or something else.
> Or is it posible to write my program in some external memory and
> then conext it with PIC16F84.

       Wow!! That's a terible thing. With a PIC, you cannot use extenal
program memory (except in PIC17 family) and you cannot write a program
longer than its specific program-area size (1K in 16C84).

Sunthiti Patchararungruang

1998\02\18@162312 by Dorian

flavicon
face
Sunthiti Patchararungruang wrote:

> Wow!! That's a terible thing. With a PIC, you cannot use extenal
> program memory (except in PIC17 family) and you cannot write a program
> longer than its specific program-area size (1K in 16C84).
>
> Sunthiti Patchararungruang

Sorry, that isn't correct.You can (theoretically) write your own operating
system, which can use external Memory, but it would slow down performance
dramatically.

dorian

1998\02\18@171119 by Sean Breheny

face picon face
At 05:40 PM 2/18/98 +0000, you wrote:
{Quote hidden}

Somebody correct me if I am wrong, but doesn't the 16F84 have 4K of FLASH?
If not 4K, I think that it is at least larger than 16C84

Sean


+--------------------------------+
| Sean Breheny                   |
| Amateur Radio Callsign: KA3YXM |
| Electrical Engineering Student |
+--------------------------------+
Fight injustice, please look at
http://homepages.enterprise.net/toolan/joanandrews/

Personal page: http://www.people.cornell.edu/pages/shb7
shb7spamKILLspamcornell.edu
Phone(USA): (607) 253-0315

1998\02\18@171759 by Sean Breheny

face picon face
Earlier, I sent a message saying that I thought that the 16F84 had 4K of
flash. Well, I just went to microchip's site and saw that I was wrong.
Sorry. Turns out the the internal ram has been increased, not the program
flash.

Sean

+--------------------------------+
| Sean Breheny                   |
| Amateur Radio Callsign: KA3YXM |
| Electrical Engineering Student |
+--------------------------------+
Fight injustice, please look at
http://homepages.enterprise.net/toolan/joanandrews/

Personal page: http://www.people.cornell.edu/pages/shb7
.....shb7KILLspamspam.....cornell.edu
Phone(USA): (607) 253-0315

1998\02\18@183545 by Mike Keitz

picon face
On Wed, 18 Feb 1998 16:57:47 -0500 Sean Breheny <EraseMEshb7spam_OUTspamTakeThisOuTCORNELL.EDU>
writes:

>Somebody correct me if I am wrong, but doesn't the 16F84 have 4K of
>FLASH?
>If not 4K, I think that it is at least larger than 16C84

The program size is the same, 1K.  The differences between C84 and F84
are:  more RAM (68 rather than 36 bytes), maybe better code protection,
lower standby power, and most importantly, a trendy "F" in the part
number.

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\02\19@235636 by paulb

flavicon
face
Dorian wrote:

> Sorry, that isn't correct.You can (theoretically) write your own
> operating system, which can use external Memory, but it would slow
> down performance dramatically.

 Of course!  The most popular one is called Stamp Basic, although the
standard versions only go to 512 bytes or external memory or so.

 Cheers,
       Paul B.

1998\02\20@233618 by John Langner

picon face
Rajko Cebavs wrote:

> I need a little help from you?
> I was programming my PIC16F84 and the programm seems to be too
> long.

:

> The program is written in C language.


I had exactly the same problem.
The program kept getting too big for memory.
The solution was to look at the code generated
by the compiler and rewrite a few parts of the C source
code differently so the compiler would generate more
efficient code.

Some examples:

(1) Use the minimum size variable necessary.  Don't use
   16 bit integers for all numbers when a byte would be adequate.
(2) Use unsigned if possible.  Compares are more efficient.
(3) Arrange loops to take advantage of the machine architecture.
   For instance if you need to do something 10 times, instead
   of
       for (i=0; i<10; i++)
   use
       for (i=10; i!=0; i--)
   This will allow the compiler to use a decrement-and-jump-
   if-not-zero type of instruction.
(4) Use call by reference instead of call by value for long
   variables.  i.e. passing an 8 bit pointer to a 32 bit variable
   instead of the value of the variable saved a LOT of code.
(5) Rearrange the function call tree and local variable usage
   so different "stack" variables can occupy the same locations.
(6) Think about what you're really trying to do and remember
   the limitations of the architecture.  Here's another example
   of something that saved a LOT of code.  I needed to output
   a 32 bit number serially.  The first implementation went
   something like this:
       long x;
       out_byte ((unsigned char) ((x >> 24) & 0xff));
       out_byte ((unsigned char) ((x >> 16) & 0xff));
       out_byte ((unsigned char) ((x >> 8) & 0xff));
       out_byte ((unsigned char) (x & 0xff));
   The compiler wasn't too clever in this case and actually
   generated code for the unnecessary shifting and masking.
   Rewrite it like this and it is vastly smaller:
       out_byte (* (((unsigned char *)(&x)) + 3));
       out_byte (* (((unsigned char *)(&x)) + 2));
       out_byte (* (((unsigned char *)(&x)) + 1));
       out_byte (* (((unsigned char *)(&x)) + 0));
   Of course it would have been clearer to use a union to
   treat the same memory as either a long integer or an
   array of 4 bytes:
       union {
           unsigned long x;
           unsigned char b[4];
       } result;


It would surely be possible to squeeze out a few more
instructions by carefully handcrafting the whole thing in
assembly language.  However, it would have taken much longer
to write, there would be more bugs, and the end result
would be very difficult to understand and maintain.


John

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