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

Anyone has written a driver for the AM29F040 flash ?

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



Joined: 10 Dec 2005
Posts: 3

View user's profile Send private message

Anyone has written a driver for the AM29F040 flash ?
PostPosted: Sat Dec 10, 2005 5:13 pm     Reply with quote

Hi friends,
I need to interface a flash chip AM29F040 to a 18F8621.
Does someone has written a driver or has a piece of code that
I could take as example ?
thanks a lot

proton
Ttelmah
Guest







PostPosted: Sat Dec 10, 2005 5:41 pm     Reply with quote

Seriously, this is a parallel memory, so you need 30 I/O lines. Few older PIC's can provide this many general purpose connections while still leaving any pins for anything else.
Most of the drivers around are for the much more complex job of handling serial memories, but with the big advantage of using less lines.
Do you really have to use a chip with this many connections?. Which processor do you intend to use?. Which ports do you want to use?.
If ports/pins are going to be short, then you may need to consider something like an external addressable 'latch' for the addresses, which would allow the interface to be generated, with perhaps 15 lines.
The actual control of the chip is not hard, but there are a couple of 'erratas' that apply to older releases. A lot is going to depend what you actually want to 'do' with the chip. Just reading it is easy. Writing, provided the data is being transmitted from another device is also easy. If however you want the PIC to do anything 'intelligent', in terms of modifying the data on the chip, you will have problems, since with it's 64K sector size, you are going to need a second memory, large enough to hold an entire sector, if you want to 'set' any bits ithe array (the array clears to '1', and you can program individual bytes to '0', but to change a byte back to '1', you have to read the entire sector, perform a block erase, and then write the whole sector back.

Best Wishes
proton



Joined: 10 Dec 2005
Posts: 3

View user's profile Send private message

driver
PostPosted: Mon Dec 12, 2005 6:11 pm     Reply with quote

yes, that's all true. But unfortunately the request come directly
from the customer ... besides I was not able to find any serial 4 Mbit
chip.
Any idea ?
So the driver for the AM29F040 would be very appreciated ...
proton
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Dec 12, 2005 6:29 pm     Reply with quote

I have a driver for the AM29F040 that runs on a PC. It was written for
a MSVC 16-bit C compiler, several years ago. I wrote it to make my
own prom programmer for that chip, that runs on a board for the ISA
bus. If you understand how a 16-bit DOS program works on a PC,
and if you understand the difference between MSVC vs. 1.52 and the
CCS compiler (particularly with respect to data types) then you could
convert it to CCS. I don't really want to support it. Given all that,
do you want me to PM you the driver source file ?
proton



Joined: 10 Dec 2005
Posts: 3

View user's profile Send private message

PostPosted: Tue Dec 13, 2005 1:09 pm     Reply with quote

Hi,
yes I'd like to look at it ... eventually I will not use the code
and restart from scratch ...
please PM me ...
thanks
proton
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