CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

External memory

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
tanyamahen



Joined: 01 Jul 2004
Posts: 14

View user's profile Send private message

External memory
PostPosted: Thu Jul 01, 2004 1:05 am     Reply with quote

Crying or Very sad [/b]

Hi

I m using 18F8520 and trying store lots of data datas in "Flash 28F640". Can I use in-buile 'read' or 'setup' or 'write_external_memory function (usind AD bus)?. Can anyone give me good explanation about these in-buils function. I am bit confuse about the "external interface"

Thanks
Tanya
carlosma



Joined: 24 Mar 2004
Posts: 53
Location: Portugal

View user's profile Send private message Send e-mail MSN Messenger

PostPosted: Thu Jul 01, 2004 4:39 pm     Reply with quote

Hello

Do you see the examples, like EX_EXTEE.C and another Flash EEPROM like the driver 2416.C

bye

Carlos
tanyamahen



Joined: 01 Jul 2004
Posts: 14

View user's profile Send private message

external memory
PostPosted: Thu Jul 01, 2004 6:47 pm     Reply with quote

Hi

I have just ordered the CCS C compiler. So mean time I am doing software design. I am bit confuse about the address and data lines. Do you have EX_EXTEE.C file. If you can please email it to me.

Thanks
Tanya
carlosma



Joined: 24 Mar 2004
Posts: 53
Location: Portugal

View user's profile Send private message Send e-mail MSN Messenger

PostPosted: Fri Jul 02, 2004 1:48 am     Reply with quote

Yes share you email.
I do not have experiencia with this 28F640, but I think that it can help
Carlos
tanyamahen



Joined: 01 Jul 2004
Posts: 14

View user's profile Send private message

still confuse about the external flash ???
PostPosted: Fri Aug 13, 2004 9:25 am     Reply with quote

Hi

I am trying do read and write external flash using data bus... can someone give some idea to me... I just fish the hardware ... when it build i need have code for it...

First I did was setup_external_memory
then I disable all intrrupt...
write_programe_memory();
......

do I need to set anything else...

please help me...


thanks
Tanya Sad
garyzheng



Joined: 22 Jul 2004
Posts: 25

View user's profile Send private message

post your code, maybe we can give you some advice:)
PostPosted: Mon Aug 16, 2004 9:31 am     Reply with quote

Smile
tanyamahen



Joined: 01 Jul 2004
Posts: 14

View user's profile Send private message

External memory interface pic18
PostPosted: Tue Aug 17, 2004 10:16 pm     Reply with quote

Hi

Thanks for replay..

Ok I think I need tell bit more about what I am really doing...

Ok I have selected EMC -Extended Microcontroller mode (datesheet page71). This mean I can run my code in internal memory and I have access to external memory as well... So I have map the exteranl memory to 0x0fffff - 0x1fffff. ( I am trying to use external memory interface).

Then I selected 16bit byte select mode (datasheet page 75). My hardware similar to figure 6-3 in the datasheet page 75.

The reason for external memory is to store big amount of datas.

So I Try to use build in function....

So my question is... Am I using the build in function correctly...


int writedata[128];
setup_external_memory (EXTMEM_BYTE_SELECT | EXTMEM_WAIT_0);

write_external_memory( 0x0fffff, &writedata, 2);

.............

Thanks for helping me here...

Regards
Tanya
Guest








maybe you should think about this:)
PostPosted: Wed Aug 18, 2004 9:33 am     Reply with quote

when i am writing the internal memory eeprom, i should disable the interrupt, maybe writing the external eeprom didn't need to do it, but you know, sometimes CCS compiler is wierd, you should look at the disaseemble list of your C program, you can not count on the compiler too much.
tanyamahen



Joined: 01 Jul 2004
Posts: 14

View user's profile Send private message

Still no answer from any one?
PostPosted: Fri Aug 20, 2004 7:43 pm     Reply with quote

Hi...


I am still waiting for answer.....

look like I better waite for my hardware to arrive.... can I test these external memory write with simulator...? did anyone did it... can please tell how to do simulater test......
thanks
Tanya
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Sat Aug 21, 2004 4:27 pm     Reply with quote

I can't answer all your questions because I've never worked with the external memory on a PIC controller. First a remark: The support of external memory is a relative new feature for the PIC processor and not many people have used it already. Consider this being a huge design risk!!! You are likely to run into problems like compiler bugs and not many people here will be able to help you.

Code:
write_external_memory( 0x0fffff, &writedata, 2);
Change this to:
Code:
write_external_memory( 0x0fffff, writedata, 2);
A bug like this is to me an indication that you are new into the area of C programming.

The function write_external_memory() is another example of the poor CCS documentation for the new added commands. I'm not sure, but I guess this function was meant for writing to SRAM or compatible FLASH devices. Anyway I think you can't use it....... Sad
You say you are using the byte select mode using the schematics from datasheet page 75, this setup requires an additional I/O pin for selecting the upper- or lower byte. The CCS commands have no way to specify the I/O pin to use for this, so therefor I assume byte select is not supported. Another thing is that writing data to the 28F640 requires you to check a status register in the chip for success, the function write_external_memory() is not doing this.

Where does this leave you?
You will have to write your own access functions... Using the datasheets for the FLASH device this shouldn't be too difficult.

Just curious: The 28F640 is an 8Mbyte device, the PIC can only address a total memory space of 2MByte. How are you accessing the upper 6Mb?

Have you thought about using MMC memory cards? They can be accessed through a standard SPI-bus, available on many good available and cheap PIC types.
tanyamahen



Joined: 01 Jul 2004
Posts: 14

View user's profile Send private message

Still with this write/read memory.....
PostPosted: Mon Sep 20, 2004 10:10 pm     Reply with quote

You are right... THis build in function is no use at all. I am starting to don in assmbly.. Bit a worry too.

About This.
**************
Just curious: The 28F640 is an 8Mbyte device, the PIC can only address a total memory space of 2MByte. How are you accessing the upper 6Mb?
*************

I am trying to Page setting..

The sad new is... Hardware is design by another Engineer.. So I have live with this design.. This is a first time me too.

If you can help... Please help me..
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group