Searching \ for '[PIC]:Pic memory' 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/memory.htm?key=memory
Search entire site for: 'Pic memory'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]:Pic memory'
2000\11\17@055542 by Russell Farnhill

flavicon
face
Hi,

I'am trying to write a program in Hi-Tech C and need
to declare a unsigned char array variable of 255 bytes
like "unsigned char array[255]". I tried this on the F84
but got the error "Can't find 0x0c words in bank0"
I realize this is because the F84 doesn't have enough ram
to start with, so I tried the same with the F877 but got the
same error. looking at the data sheet for the 877 I saw that
banks 2 & 3 have about 96bytes of memory each so I tried the following

bank2 unsigned char arrayA[90];
bank3 unsigned char arrayB[90];

This compiled ok. So what I'am wondering, is there any way of
creating an array bigger than one bank that's made from one or
more banks.

The end result is I'am trying to create a servo controller
using the (I think its called) "bit pattern method".

Thanks in advance.

Russ.

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu


2000\11\17@072926 by Andrew Kunz

flavicon
face
Russ,

Get yourself an 18C PIC.  They are pin-compatible and the data is much flatter
if you access it correctly.

Andy









Russell Farnhill <.....r.farnhillKILLspamspam@spam@STOR-WAVE.CO.UK> on 11/17/2000 05:59:21 AM

Please respond to pic microcontroller discussion list <PICLISTspamKILLspamMITVMA.MIT.EDU>








To:      .....PICLISTKILLspamspam.....MITVMA.MIT.EDU

cc:      (bcc: Andrew Kunz/TDI_NOTES)



Subject: [PIC]:Pic memory








Hi,

I'am trying to write a program in Hi-Tech C and need
to declare a unsigned char array variable of 255 bytes
like "unsigned char array[255]". I tried this on the F84
but got the error "Can't find 0x0c words in bank0"
I realize this is because the F84 doesn't have enough ram
to start with, so I tried the same with the F877 but got the
same error. looking at the data sheet for the 877 I saw that
banks 2 & 3 have about 96bytes of memory each so I tried the following

bank2 unsigned char arrayA[90];
bank3 unsigned char arrayB[90];

This compiled ok. So what I'am wondering, is there any way of
creating an array bigger than one bank that's made from one or
more banks.

The end result is I'am trying to create a servo controller
using the (I think its called) "bit pattern method".

Thanks in advance.

Russ.

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspam_OUTspamTakeThisOuTmitvma.mit.edu

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamspam_OUTmitvma.mit.edu


2000\11\17@174330 by Bob Ammerman

picon face
There was talk here a while ago about  a compiler that let you define your
own 'address spaces' for RAM by providing a read and write function. The
example used by accessing the extra RAM on an LCD display.

This technology could be used to create an address space that accessed
multiple banks of memory.

Which compiler was that, anyway?

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

{Original Message removed}

2000\11\17@175321 by Andrew Warren

flavicon
face
Bob Ammerman <@spam@PICLISTKILLspamspamMITVMA.MIT.EDU> wrote:

> There was talk here a while ago about  a compiler that let you define
> your own 'address spaces' for RAM by providing a read and write
> function. The example used by accessing the extra RAM on an LCD
> display.
>
> This technology could be used to create an address space that accessed
> multiple banks of memory.
>
> Which compiler was that, anyway?

   It was Bytecraft Limited's MPC compiler.

   -Andy


=== Andrew Warren --- KILLspamaiwKILLspamspamcypress.com
=== Cypress Semiconductor Corporation
=== Interface Products Division, S.D.

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu


2000\11\19@192803 by Clyde Stubbs

flavicon
face
On Fri, Nov 17, 2000 at 10:59:21AM -0000, Russell Farnhill wrote:
> This compiled ok. So what I'am wondering, is there any way of
> creating an array bigger than one bank that's made from one or
> more banks.

Short answer, no.
Long answer - think about what the compiler would have to
do to implement this. Do you really want this "under the hood"?
So you basically need to do it yourself, a couple of macros will
help, e.g.

bank1 char      buf1[0x40];
bank2 char      buf2[0x40];

#define array(x)        (((x) >= 0x40 ? buf2:buf1)[(x)&0x3F])

IOW, use the high bits to select an array, low bits to index it.
Can be extended to bigger sizes.

Clyde

--
Clyde Stubbs                     |            HI-TECH Software
Email: spamBeGoneclydespamBeGonespamhtsoft.com          |          Phone            Fax
WWW:   http://www.htsoft.com/    | USA: (408) 490 2885  (408) 490 2885
PGP:   finger TakeThisOuTclydeEraseMEspamspam_OUThtsoft.com   | AUS: +61 7 3355 8333 +61 7 3355 8334
---------------------------------------------------------------------------
HI-TECH C: compiling the real world.

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2000\11\20@063709 by Russell Farnhill

flavicon
face
Thanks to all, for your help


-----Original Message-----
From: Clyde Stubbs [RemoveMEclydespamTakeThisOuTHTSOFT.COM]
Sent: Monday, November 20, 2000 12:29 AM
To: PICLISTEraseMEspam.....MITVMA.MIT.EDU
Subject: Re: [PIC]:Pic memory


On Fri, Nov 17, 2000 at 10:59:21AM -0000, Russell Farnhill wrote:
> This compiled ok. So what I'am wondering, is there any way of
> creating an array bigger than one bank that's made from one or
> more banks.

Short answer, no.
Long answer - think about what the compiler would have to
do to implement this. Do you really want this "under the hood"?
So you basically need to do it yourself, a couple of macros will
help, e.g.

bank1 char      buf1[0x40];
bank2 char      buf2[0x40];

#define array(x)        (((x) >= 0x40 ? buf2:buf1)[(x)&0x3F])

IOW, use the high bits to select an array, low bits to index it.
Can be extended to bigger sizes.

Clyde

--
Clyde Stubbs                     |            HI-TECH Software
Email: EraseMEclydespamhtsoft.com          |          Phone            Fax
WWW:   http://www.htsoft.com/    | USA: (408) 490 2885  (408) 490 2885
PGP:   finger RemoveMEclydeEraseMEspamEraseMEhtsoft.com   | AUS: +61 7 3355 8333 +61 7 3355 8334
---------------------------------------------------------------------------
HI-TECH C: compiling the real world.

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


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