Motherboard Forums


Reply
Thread Tools Display Modes

external flash memory

 
 





















risha
Guest
Posts: n/a

 
      03-11-2005, 11:20 AM


hello,

i am doing a project on Mc9s12a128b and using external flash memory
m29f040b (two of them)so need to know how to write data into flash.
#############
getting write,chip select and read signals.PLD is used to selct the
external flash memeory.
##########
register settings
MODE = 0xEAL;/*writing values to mode register to choose the mode and
set EMK bit*/
MISC = 0x0DL;/*to stretch the clock cycles*/
PPAGE = 0x00L;/*page value into PPAGE register*/
PEAR = 0x0CL; /*port E assignment register*/
PUCR = 0x90L;/*pull up control register to enable input pins*/
EBICTL = 0x01L;/*EXTERNAL BUS INTERFACE CONTROL REGISTERS*/
PORTK = 0x40L;/*select the external chip for external accesses and
made it X40 from X80*/
//PORTK = 0x60L;
CSCTL0=0x3F;
CSCTL1=0x3D;
CSSTR0=0x3E;
CSSTR1=0x3F;
WINDEF=WINDEF | 0xC0;
PORTE = 0x10L;

PORTA = 0xFF;
PORTB = 0xFF;

******************
flash write function:addr1 is sent the ext flash address
void FlashWrite1(volatile unsigned short *addr1,volatile unsigned
short *addr11,unsigned short ucVal )
{

unsigned short volatile *addr2;
addr2=(unsigned short volatile *)0x0FF0;
//(*addr2)=0x7F12;
//&addr2=0x7F12;
///addr2=&ucVal;
//*addr2=0x03;
*addr2=ucVal;

*addr1=*addr2;/* writing into required address*/
*addr11=*addr2;/*writing into int flash*/

}

thank u in advance for the help
ranjita,
blore,india
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FX530 Memory Performance Upgrade and Timings in BIOS Ikaros Gateway 4 02-08-2009 06:40 PM
Re: EP35C-DS3R/ Memory Paul Gigabyte 0 06-02-2008 09:12 PM
Flash ads bearing malware plague popular sites Tony Harding Dell 2 04-19-2008 07:04 PM
[LONG] Problems with new ddr400 ô_ô Asus 0 05-07-2007 10:00 PM
P5P800 SE PCI Slots and shared interrupts John Asus 4 02-24-2007 11:38 AM


All times are GMT. The time now is 01:38 AM.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43