Go Down

Topic: Does anyone have any experience with the MCP2120 for IrDa? (Read 94 times) previous topic - next topic

chaughwo

I'm having trouble decoding data and can't figure out what the issue. I checked an rechecked the baud rate selection settings as described in the datasheet and everything is as it should be. Both Arduinos are configure for serial at 38400 bps, I'm using hardware baud rate selection on the MCP2120 and the bits are all correct as given in table 2-1 of the datasheet (Link here: http://ww1.microchip.com/downloads/en/devicedoc/21618b.pdf). The crystals on both MCP2120's are oscillating and at the correct frequency of 7.3728 MHz. Nonetheless, there seems to be some kind of timing issue. I have attached a screen capture from my logic analyzer. The top channel shows the serial connection from the Arduino to the MCP2120, which decodes correctly. The second channel shows the transmitted signal from the LED and the third channel shows the signal received by the photodiode. The final channel shows what is supposed to be serial data coming out of the MCP2120 and going to the Arduino but it doesn't match channel 1. Has anyone used this chip before and encountered a similar issue?

pylon

Just a wild guess: you're using the SoftwareSerial emulation on the Arduino side? Why did you fail to post your code? Didn't you read the sticky post at the top of the topic?

Go Up