Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: overmindxp on March 15, 2011, 09:30:30 PM
-
This question is not so related to my last post, although it's still about the IrDA project we are working on. So I guess I should start a new topic here.
Goal: send/recv data through IrDA
Components: Arduino, IrDA En/decoder, IrDA tranceiver
Schematic: See image below.
it's essentially the same as Admin's tutorial
http://www.societyofrobots.com/electronics_irda_tutorial.shtml (http://www.societyofrobots.com/electronics_irda_tutorial.shtml)
(http://i54.tinypic.com/2lmnayv.png)
When using BAUD rate 9600, we are not getting any readable data from UART on arduino. The buffer is alway full or 0.
However we are able to send/recv data if two arduino's UART are direct wired
We don't know whether it's the en/decoder or IrDA transceiver that is causing the problem.
Is this the right way to interface? Any advice on how to go about debugging this?
Thanks!
Some related datasheet
IrDA Vishay TFDT4500 : http://www.freeweb.hu/bat21/irda/tfd_4.pdf (http://www.freeweb.hu/bat21/irda/tfd_4.pdf)
En/Decoder MCP2120 : http://ww1.microchip.com/downloads/en/DeviceDoc/21618b.pdf (http://ww1.microchip.com/downloads/en/DeviceDoc/21618b.pdf)
-
According to your schematic, you are holding the RESET pin low.
The datasheet says:
The MCP2120 is forced into the reset state when the RESET pin is in the low state.
It should be connected to 5V.
-
I mislabel the graph. Reset is connected to HIGH. It's actually controlled by Arduino I/O pin 3, and in the program we do have digitalWrite(3, HIGH);
Sorry about the confusion. I've updated the diagram
-
The next two steps . . . get out an oscilloscope and measure:
1) the function generator frequency
2) tx/rx on the encoder
3) tx/rx on the IrDA
This should help you narrow the problem down.
-
The next two steps . . . get out an oscilloscope and measure:
1) the function generator frequency
2) tx/rx on the encoder
3) tx/rx on the IrDA
This should help you narrow the problem down.
we tried what you said above and linked TXIR and RXIR to form a loop in order to test on the encoder/decoder. However, even though we got some wave for the RX, we still got no buffer going into UART. Is there away to tell where the signal got messed up and what should be expect to see from the oscilloscope?
Would you suggest us using software select mode or hardware select mode?
I am not sure what kind of micro-controller you are using but I am still wondering if we need to do some software implementation for the encoder/decoder to work.
Thanks for your reply!
-
we tried what you said above and linked TXIR and RXIR to form a loop in order to test on the encoder/decoder. However, even though we got some wave for the RX, we still got no buffer going into UART. Is there away to tell where the signal got messed up and what should be expect to see from the oscilloscope?
You should see a squarewave of some type, where the bits match the signal. You can tell where it got messed up by seeing if the signal is there or not. Is there a squarewave on all four rx and tx pins?
Would you suggest us using software select mode or hardware select mode?
for what?
I am not sure what kind of micro-controller you are using but I am still wondering if we need to do some software implementation for the encoder/decoder to work.
I used my Axon, but no special software was on it. Just basic uart.