Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
cyprio7 said:Sorry I have just remembered something else as well. In transmit tutorial1 for manchester encoding, what oscillator speed has been used, is it 4Mhz? Also what is the baud rate trying to be achieved?
Say for example its 9600, and you want to send bit 1's, you use this code
Nigel Goodwin said:Try reading the MPASM/MPLAB helpfile!, in particular conditional assembly, with ifndef, else and endif.
cyprio7 said:how about if i connect vdd of the transmitted to ra0 on the PIC, the vdd of the reciever to ra1. The reciever is usually on and transmitter off, which means ra1=on ra0=off. When i want to transmit something, i can turn ra1=off, and make ra0=on, then transmit. Because only one of the modules are only ever on at one time, it should be seen as an open circuit by the rest of the circuit, therefore not affecting the load if rx and tx are using the same antenna? Will this work do you think?
Please tell me what type of antenna you used or that you recommend.
cyprio7 said:hi nigel, just wanted to ask a couple of questions about your schematic for the RF transmitter board. You have used a 10k resistor, with one end being connected to 5V power rail, and the other end going into the data input of the tx module which requires 3.3V. If the input impedance to the data pin is very high, isnt almost all of the 5V dropped over the resistor therefore making almost 5V appear on the pin instead of 3.3V? i think im wrong so please could you explain how this works?
also reguarding the 3.3V zener diode you have used, why did you have to use a 68ohm resistor with that? could you not just use the zener diode by itself reverse biased to provide max voltage of 3.3V, seeing as the module will draw as much current as it needs anyway, why do you need to limit the current with the 68 ohm resistor?
cyprio7 said:thats cleared a lot up, thanks nigel. but just to clarify my first question you answered. Ok the tx module has protection circuitry inside which will change the 5V to 3.3V, however, i still dont understand why you have to put a resistor there to limit the current.
Ok the tx module has a max current it can take without burning the chip, however, If only 3.3V is being supplied (with 4V being max voltage), doesnt the tx module just draw off as much current as it needs based on the voltage supplied (3.3V) and its own circuitry resistance? Isnt the current business taken care of automatically? For example, if i want to light an LED from a PIC, i just connect a PIC pin to the LED which in turn is connected to earth.
If i were to add a resistor, it would make the LED less bright. Isnt the potential range of the transmitter being limited by adding that resistor? Like, how do you know, what value resistor to use? How comes you have used 10k? cant you get away with not using a resistor and just directly connecting them?
cyprio7 said:nigel i have two short questions if u could answer them please.
1)
is it possible that when you transmit manchester data from the pin of the pic, if i connect the pin to oscilloscope, is it possible to see the train of pulses? im not sure how to do it because, when i press the transmit button, it will transmit and go past the screen so fast that it wont be able to see. is there a way to "capture" this image and keep it on the oscilloscope screen in anyway?
2) obviously sychronous communication is better than asynchronous in the sense that it never goes out of synch, but it needs more set up time before the data transfer is carried out.... is it possible for asynchronous communication to never go out of synch also?
for example if i am sending data from the PICS USART to the PC, and i want to send a long long stream of bits, wont it eventually "come out of synch"... because the USART clock on the pc is not perfectly matched to the one on the PIC?