Microcontroller › 8051 › 89c52
- This topic has 6 replies, 5 voices, and was last updated 11 years, 2 months ago by
balaji.n.
-
AuthorPosts
-
February 9, 2011 at 4:40 am #710
mukesh
Participanthello;
now i have with me 89s52 available with me ? so can i use this controller in place of 89c51?with the same code written as that for 89c51?
so please help me in that note so that i can start work on that soon!thanks for your visit!!
February 9, 2011 at 5:54 am #5463dagakshay
Participantyes, you can use s52 instead of c51… they are pin compatiable……
February 9, 2011 at 4:57 pm #5491Ahmet
Participantactually c- stands for cmos technology……nothing more than that so their is no difference b/w them in case of pin configuration………..
February 14, 2011 at 6:08 am #5527mukesh
Participantok;
thanks for taking keen intrest in my querry;i appreciate it ;but i want to know that the code written for 89c52 can actually be compatiable with 89s52 without any short of madification i mean any madificaton so please let me know!!
February 15, 2011 at 6:45 am #5533dagakshay
Participantya i think most of codes are compatiable… but the other way round i think may not be i mean the code for c52 will work for s52 series but the codes for s52 may not work for c52….
for example s series 8051 controller contains inbuit SPI(serial peripherial interface), if you use if you use that in your code them it will not be compatialbe with c52 series since it doesn’t contains any inbilt SPI…
December 3, 2013 at 7:17 am #10694shylaja
Participanthi freinds……..
please help me to connect jhd162a lcddisplay with 89c52 microcontroller
December 6, 2013 at 3:56 am #10702balaji.n
Participant/*hi shylaja ref the code *//*program for lcd interfacing programed by balaji any bug report [email protected]*/#include <reg51.h>sfr ldata = 0x90; //P1=LCD data pinssbit rs = P2^0;sbit rw = P2^1;sbit en = P2^2;sbit busy = P1^7;void lcdcmd(unsigned char value);void MSDelay(unsigned int itime);void lcddata(unsigned char value);void lcdready();void lcdstring(char *string);void main(){lcdcmd(0x38);lcdcmd(0x0E);lcdcmd(0x01);lcdcmd(0x06);lcdcmd(0x80); //line 1, position 6while(1){lcdcmd(0x80);lcdstring(” welcmoe”);}}void lcdcmd(unsigned char value){lcdready(); //check the LCD busy flagldata = value; //put the value on the pinsrs = 0;rw = 0;en = 1; //strobe the enable pinMSDelay(1);en = 0;return;}void lcddata(unsigned char value){lcdready(); //check the LCD busy flagldata = value; //put the value on the pinsrs = 1;rw = 0;en = 1; //strobe the enable pinMSDelay(1);en = 0;return;}void lcdready(){busy = 1; //make the busy pin at inputrs = 0;rw = 1;while(busy==1){ //wait here for busy flagen = 0; //strobe the enable pinMSDelay(1);en = 1;}}void MSDelay(unsigned int itime){unsigned int i, j;for(i=0;i<itime;i++)for(j=0;j<1275;j++);}void lcdstring(char *string){while(*string++)lcddata(*string);} -
AuthorPosts
- You must be logged in to reply to this topic.