Rob,
I now have my two XRF transceivers set up and functioning. However, I'm experiencing the same problem as you have reported ... unable to communicate rf from a PIC and PBP.
The hardware and wiring checks out good. Using a terminal program (TeraTerm) and a USART to USB Bridge cable (CP210x), the radio loop-back link works perfectly. Also, the AT command mode functions correctly for both devices.
The comms do not work when driving the radio from a PIC USART. Sample code:
I saw your latest post on the Ciseco forum. You are not getting much help there. Do you have any further test results?Code:'************************************************************************** '*Program to test XRF radio communications via loopback method * '*Uses a pushbutton switch on porta pin 4 * '*Target processor is PIC 12f1822 * '*321 program words, revised 05/05/2013 * '*Program by Dick Ivers * '*All rights reserved * '************************************************************************** 'set 12f1822 configurat1on #CONFIG __config _CONFIG1, _FOSC_INTOSC & _MCLRE_OFF & _CLKOUTEN_OFF & _WDTE_ON __config _CONFIG2, _PLLEN_OFF & _LVP_OFF #endconfig 'set registers OSCCON = %01101000 '4 mhz osc OSCTUNE = 0 'factory calibration ANSELA = 0 'all digital inputs OPTION_REG.7 = 0 'global pullups enabled WPUA = %010000 'porta pin 4 weak pullup enabled CM1CON0.7 = 0 'comparator disabled TRISA = %011110 'PORTA.0 & porta.5 are outputS, all others input while OSCSTAT.0 = 0 'wait for stable freq. wend define OSC 4 '4 mhz oscillator 'Define hserout parameters define HSER_RCSTA 90h define HSER_TXSTA 20h define HSER_BAUD 9600 define HSER_CLROERR 1 'clear overflow error APFCON.7 = 1 'rx on ra1 (12f1822) APFCON.2 = 1 'tx on pin ra0 (12f822) i var byte char var byte For i = 1 to 3 porta.5 = 0 'led on pause 333 porta.5 = 1 'led off pause 333 next asleep: nap 2 'delay 4 ms if porta.4 = 1 then asleep DT: hserout [dec 5] hserin 100,blink,[dec char] if char = 5 then porta.5 = 0 'led on goto halt endif blink: porta.5 = 0 'led pause 50 porta.5 = 1 'led off pause 50 if porta.4 =1 then asleep goto DT halt: stop
Dick




Bookmarks