I have used his applications in particular his digital sound code. I think I have the original source code somewhere in my archives. I wouldn't know where to start with a GCB translation though.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
;TestingofRomanBlackRFprotocoloncheap433MhzTX/RXmodules;AdaptedforGCBasicfrom:;http://www.romanblack.com/RF/cheapRFmodules.htm;;Receivercodeexample;;J.Nilo,April2016;ChipSettings#chip 16F1709, 8;SetupLCDParameters#define LCD_IO 4#define LCD_NO_RW#define LCD_Speed fast;DefineHardwaresettings#define LCD_RS PORTC.5#define LCD_Enable PORTC.4#define LCD_DB4 PORTC.0#define LCD_DB5 PORTC.1#define LCD_DB6 PORTC.2#define LCD_DB7 PORTC.3;TobeincludedinMain;DefineportreceivingRFsignal#define RfInPort PORTC.7DirRfinPortIn;TMR0at500kHz-->setprescalerat4:(8Mhz/4)*(1/4);(needtobeadjustedifyouchangethe8MHzchipfrequency)InitTimer0Osc,PS0_4;Initializationofreceiveddata(dimmustbe>nrpp,definedbelow)dimrxdat(10);subrf_receive(nrpp);ThisfunctionreceivesanRFpacketofbytesinRomanBlackPulse;Periodencodedformat.Thepacketmusthavenrrpvalidcontiguousbytes;orthefunctionwillnotexit.Thereisnotimeoutfeature,butcouldbeadded;TMR0isrunningat500kHz,so200uS=100TMR0ticks;;AdaptedforGCBasicfromRomanBlackCsource;rrp_bytes=0;LoopuntilnrrpcontiguousRFbyteshavebeenreceiveddowhile(rrp_bytes<nrpp)doTMR0=0waituntil!RfInPort'wait for input / edgewaituntilRfInPort'wait for input \ edgerrp_period=TMR0'grab the pulse periodif(rrp_period>=100)thenexitdo'valid start pulse detectedrrp_bytes=0'clear bytecount if still recv noiseloop;;Nowwehadastartpulse,record8bitserreur=0repeat8TMR0=0waituntil!RfInPort'wait for input / edgewaituntilRfInPort'wait for input \ edgerrp_period=TMR0'grab the pulse periodif(rrp_period>=100)then'if >=200uS, is unexpected start pulseerreur=1exitrepeatendifif(rrp_period<61)then'61 = 122uSrrp_data.0=0elserrp_data.0=1endifrotaterrp_dataleft'save the good bit in rrp_dataendRepeat;;getstohereafternrppgoodbitsORafteranerror(unexpectedstartpulse)iferreur=1thenrrp_bytes=0elserotaterrp_datarightrxdat(rrp_bytes)=rrp_datarrp_bytes=rrp_bytes+1endifloopendsub;;YourMaincodehere;
A bit crude. Not extensively tested but seems to work.
Jacques
Last edit: Jacques Nilo 2016-04-20
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes. The main difference seems to be that the DHt11 driver is using an internal counter rather than TMR0 to compute the signal period. Perhaps a better idea ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm sure that either way is ok and the method is a matter of preference. I may actually try a few things with some of these "dumb" RF modules as I have a box full that need a purpose.
The receivers on my cheap ASK modues are better than most with a real RFIC chip instead of an LM358 OPAMP, so a bit of testing should show if there is very much to gain with this protcol vs spending a few dollars more for an SPI based "smart" module that can easily do 300 meters with a data rate of 40K BPS
I have been experimenting / testing with a PIC16F1614/16F1619 using the Signal Measurement Timer (SMT) and this may be an ideal application for testing, I think it may be possible to have the SMT to do the most of work in the background while the core MCU is off doing other stuff.
Not sure where we are with good chipdata files on this excellent newer family of chips but if you are interested let me and I can probably get something to you,
Bill
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My receivers are DORJI DRA886RX and cannot operate at the speeds used by Black Knights protocol. My receivers look like the ones in the second photo in the link.
To get reliable comms, the TX off time had to be increased to 120 us and the Data "0" was increased to 50us and a data "1" to 100us.
I see little to no benefit with the BN protocol as these Dorji Modules work OK at both 2400 and 4800 baud.
William
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all
I am wondering if any one has ever tried to program Roman Black RF protocol in GCBasic.
If so could you share your code ?
Many thanks
Jacques
Last edit: Jacques Nilo 2016-04-17
I have used his applications in particular his digital sound code. I think I have the original source code somewhere in my archives. I wouldn't know where to start with a GCB translation though.
OK. Here it is.
Transmitter GCB code
Receiver code (trickier... )
A bit crude. Not extensively tested but seems to work.
Jacques
Last edit: Jacques Nilo 2016-04-20
The receiver code is very similar to that used by the DHt11 Humidity Sensor
Yes. The main difference seems to be that the DHt11 driver is using an internal counter rather than TMR0 to compute the signal period. Perhaps a better idea ?
I'm sure that either way is ok and the method is a matter of preference. I may actually try a few things with some of these "dumb" RF modules as I have a box full that need a purpose.
The receivers on my cheap ASK modues are better than most with a real RFIC chip instead of an LM358 OPAMP, so a bit of testing should show if there is very much to gain with this protcol vs spending a few dollars more for an SPI based "smart" module that can easily do 300 meters with a data rate of 40K BPS
I have been experimenting / testing with a PIC16F1614/16F1619 using the Signal Measurement Timer (SMT) and this may be an ideal application for testing, I think it may be possible to have the SMT to do the most of work in the background while the core MCU is off doing other stuff.
Not sure where we are with good chipdata files on this excellent newer family of chips but if you are interested let me and I can probably get something to you,
Bill
Update:
My receivers are DORJI DRA886RX and cannot operate at the speeds used by Black Knights protocol. My receivers look like the ones in the second photo in the link.
To get reliable comms, the TX off time had to be increased to 120 us and the Data "0" was increased to 50us and a data "1" to 100us.
I see little to no benefit with the BN protocol as these Dorji Modules work OK at both 2400 and 4800 baud.
William