Hi all,
I am working on led display project, i am using AT89S53(8051) for programming(keil C) . from last three days i am facing serious problem with communication. I want to communicate PC to LED there is another IC on board provided me, that is MAX1487 and there are only two wire conneting(RXD,TXD) to it. iam connecting only two wire from com port.
problem is that i am not able to read or write data from SBUF even keil debugger is going write but there is no hardware response. my progamme setting for this is as follows:
void main(void) { SCON=0X50; ET2=1; TCLK=1; RCLK=1; C_T2=0; RCAP2H=0XFF; //baud rate 9600 RCAP2L=0XB2; TR2=1; TR1=1; PS=0; ES=1; EA=1; RI=0; SM2=0; }
void rxd(void) interrupt 4 { unsigned char UART_DATA;
if(RI==1) { RI=0; TR2=0; UART_DATA=SBUF; } }
is this write??????? SBUF is not working well. is there any programmatic error plese help me to right it
I have additional code for displaying charcter on led in function main() as well as some logic in rxd(). i am sending you only the settings.
is there any requirment of reg52.h ,reg53.h,regs58.h i have included first two in code.
there is no right response from led. I think there is communication error from PC to MAX1487 or MAX1487 to microcontroller!!!!!!!
plese help me if you have idea of MAX1487 pins connection with microcontroller. i am using 9600,N,8,1.
You do realise that the MAX1487 is an RS-485/RS-422 Transceiver, don't you?
www.maxim-ic.com/.../1111
Hi you need help...
You can use this code in your code.
I now making a rutine to draw images,text,geometrical object to LCD but i dont know what is faster??????
TMOD = 0x21; //Use Timer 2 generate Baud Rate , T2CON Registers. //equation: Baud Rate=Oscillator Frequency/[32*(65536-RCAP2H,RCAP2L)] CP_RL2=0;//Reload C_T2 = 0;//Timer EXEN2= 0; TCLK = 1; RCLK = 1; EXF2 = 0; RCAP2L =0xFD;//Baud Rate=115.200 ( RCAP2H,RCAP2L=0xFFFD) RCAP2H =0xFF; TR2 = 1;//Start timer2. <endpre>
Please read the instructions on how to post source code: www.danlhenry.com/.../keil_code.png
Note that there is no such thing as an <endpre> tag!
Don't manually re-type the code into the post - use only copy-and-paste;
Note that TABs don't work (well) - use spaces instead,
and don't forget to check it in the 'Preview'...
he is connecting 485 to a PC COM port THAT is the problem.
Erik
PS once he either get a B&B converter or get a 232 interface on his board we can discuss the code, which might and might not be OK.