Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Unable To write a char at location 0XFF01 of flash memory

Status
Not open for further replies.

Sneha Kapoor

Newbie level 5
Joined
Apr 22, 2010
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Chandigarh
Activity points
1,378
I need to write a char(say "a") at location (0xFF01) of flash memory,read the same character from the same location and then display it on the LCD.Then,at next location I want to write another character(say "b"),read it,and display it on LCD.Likewise,I want to display a particular string on the LCD of varialble length.Please could any one help me out with this.I am using C8051f120 kit for interfacing LCd.
 

Re: Unable To write a char at location 0XFF01 of flash memor

hi

check this



regards

ml
 

lcd char display

Sneha kapoor this code is used to display B, S , R char on the LCD ...

U can try this code ..hope u wil get it...



// Write a Program to send letters B, S and R to the LCD using Delays


#include <reg51.h>

sfr ldata=0x90 //P1=LCD data pins
sbit rs=P2^0;
sbit rw=P2^1;
sbit en=P2^2;




void main()

{

lcd_cmd(0x38); //8/4 bit data and 5x8 character font
MsDelay(250);
lcd_cmd(0x0E); //Display ON , Cursor Blinking
MsDelay(250);
lcd_cmd(0x01); //Clear Display Screen
MsDelay(250);
lcd_cmd(0x06); // Increment Cursor(Shift cursor to Right)
MsDelay(250);


lcd_cmd(0x86); // Line 1, Position 6
MsDelay(250);

lcd_data('B');
MsDelay(250);
lcd_data('S');
MsDelay(250);
lcd_data('R');
MsDelay(250);


}

void lcd_cmd(unsigned char value)
{
ldata=value; // PUt the value on the pin

rs=0; // Command mode
rw=0; // Write to LCD
en=1;
MsDelay(1); //Delay
en=0;
return;
}



void lcd_data(unsigned char value)
{
ldata=value;
rs=1; // Data mode
rw=0;
en=1;
MsDelay(1):
en=0;
return;
}


void MsDelay(unsigned int time)
{
usigned int i, j;
for(i=0;i<time;i++)
for(j=0;j<1275;j++);
}


SRINU
Hyderabad
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top