Dear Sirs,
We want to config UART port for NEC CIR receiving.
Now I only found a sample code IR_Test.c (as attached) from Mistral's test code,
which is for RC-5 CIR.
I try to modify it for our NEC CIR, but I can not config UART properly, because
I am confused by datasheet's register description vs sample code.
My questions are:
-how to set MDR1.MODESELECT?
I think "6h CIR mode" is right, but sample code select "0h UART 16x mode", but,
in either ways, I did not get right result.
-how to set DLH,DLL?
For NEC CIR, should I use T=562.5us into formula Div=(48M/16)/Tfreq ?
-set MDR2.CIRPULSEMODE for 1/3 duty cycle ?
-I don't need to set CFPS. Its default value meets our IR's carrier freq 38kHz
-sample code for NEC CIR decoding is welcome
Best regards,
Spark