serial communication issues
i tried the same following circuit as shown below
to check whether i can control 4 devices from encoder or not.
and result was very pleasant...:) for the very first time few led lit up wireless...:) after doing all these drama with micro controllers .
finally i m confirmed that my wireless modules are working gud....:)
Thanks for all these mazoka...
some interesting questions/circumstance raised during testing of wireless module.(it was giving enough distance response)
(1) A very strange behaivour of LED. i mean some times only pressing one switch two or more led light up. so i have to power of receievr supply to resume desired functions.
(2) Is there any constraint that firstly i need to power on the receiver circuit and then transmitter. because i found when ever i started transmitter first , system didn't work accordingly. so mostly i have to turn ON receiver circuit first ,then transmitter.
what could be the reason for some absurd behavior of LEDs . I rechecked both Hardware again and again and even kept both Tx and Rx system on different supply and placed a 10 micro farad capacitor between +5V and gnd for noise fluctuations.
what i need to check now to eliminate this problem..?? Plz help
suppose i have to control 8 devices from 8 switches, then as u earlier said that i need to transmit 0000 to 1000 in (AD8-AD11 of encoder ) by micro controller.
could you please hint me a logic/program to start writing my own code.
Thanks in advance
how can i check data bit transmitted by DOUT of encoder ic.
actually when i connect this encoder ic with computer PC through MAX 232 IC., i checked the terminal program. terminal program has nothing in its display. it was not receiving anything from Encoder IC.
congratulations
it is a good news for me also it means my RF Modules is ok just need to use encoder ,decoder
A very strange behaivour of LED. i mean some times only pressing one switch two or more led light up. so i have to power of receievr supply to resume desired functions.
give a proper power of transmitter and receiver circuit on its highest rating its range depend upon the power u supplied. this behavior happens due to data corruption due to less power
Is there any constraint that firstly i need to power on the receiver circuit and then transmitter. because i found when ever i started transmitter first , system didn't work accordingly. so mostly i have to turn ON receiver circuit first ,then transmitter.
i think here u attach a TE pin to ground so it transmitting continuously anyhow i think this problem will be solved when u will use controller becoz controller transmit only when button is pressed by user.
problem no one brief in some detail i don't understand it properly any how come to next point
suppose i have to control 8 devices from 8 switches, then as u earlier said that i need to transmit 0000 to 1000 in (AD8-AD11 of encoder ) by micro controller.
could you please hint me a logic/program to start writing my own code.
here by using encode u can send 2^4=16 combination and control 16 devices so in this case u dont need to break a character to nibble just send any value to port it will be transmitted
let say u press button 1 for device one then do this P1=0X01;
attach port1 lower 4 bits to encoder and higher 4 bits leave empty becoz in 16 cases it will be zero
how can i check data bit transmitted by DOUT of encoder ic.
actually when i connect this encoder ic with computer PC through MAX 232 IC., i checked the terminal program. terminal program has nothing in its display. it was not receiving anything from Encoder IC.
in fact encoder ic transmit data in some bits i think 12 or 14 bits pattern
first 8 r address and other is data by using NRZ technique so pc dont know its baud rate its data format so that ur not able to seeing data on terminal
it is my opinion
[ Edited Sun Oct 10 2010, 02:23 am ]
i tried to make the code for controlling of 8 device through encoder ic.
As per your suggestions
let say u press button 1 for device one then do this P1=0X01;
attach port1 lower 4 bits to encoder and higher 4 bits leave empty becoz in 16 cases it will be zero
but it didn't work.
Tx code.
#include<reg51.h> sbit sw1=P1^0; sbit sw2=P1^1; sbit sw3=P1^2; sbit sw4=P1^3; sbit sw5=P1^4; sbit sw6=P1^5; sbit sw7=P1^6; sbit sw8=P1^7; void main() { P1=0xFF; while(1) { // P2=P1; if(sw1==0) P2=0x01; else if(sw2==0) P2=0x02; else if(sw3==0) P2=0x03; else if(sw4==0) P2=0x04; else if(sw5==0) P2=0x05; else if(sw6==0) P2=0x06; else if(sw7==0) P2=0x07; else if(sw8==0) P2=0x08; } }
Transmitter is transmitting what we want but if two switches are pressed simultaneously then it transmits the value corresponding to the last switch pressed.
i want to transmit whole data value of port P1 to the receiver .how it could be achieved..
and
receiver code
#include<reg51.h> sbit led1=P1^0; sbit led2=P1^1; sbit led3=P1^2; sbit led4=P1^3; sbit led5=P1^4; sbit led6=P1^5; sbit led7=P1^6; sbit led8=P1^7; void main() { unsigned char mybyte, P2=0xFF; while(1) { mybyte=P2; if(mybyte==0x01) led1=0; else if(mybyte==0x02) led2=0; else if(mybyte==0x03) led3=0; else if(mybyte==0x04) led4=0; else if(mybyte==0x04) led5=0; else if(mybyte==0x05) led6=0; else if(mybyte==0x06) led7=0; else if(mybyte==0x07) led8=0; } }
even though value at port 2 are coming according to the values transmitted by the Tx. still it is not showing any response?
i checked these codes on proteus. I am attaching that file so that you can easily manipulate things.
plz correct the following codes as per need..
tell me that ru use enable signal with micro controller or not and on rx side ru check vt signal for going low
i didn't use them,in fact i don't know how to use them.Are they similar to TI and RI in microcontroller flag??
how to use them..??