Conrad_Turbo
Member
Hello I am using a RF Transmitter/Receiver pair from here:
https://www.sparkfun.com/commerce/product_info.php?products_id=7813
I wrote this code in the BX24 to test the RF Link:
'--------------------------------------------------------------------
Option Explicit
Dim Com3_In(1 to 30) As Byte
Dim Com3_Out(1 to 30) As Byte
Public Sub Main()
Do
Call PutPin(25, 0) 'Turn on Red LED to represent the Transmit
signal being sent
'Define pins for Com3 (TX = pin8).
Call DefineCom3(0, 8, bx1000_1000)
'Open Com3 serial port queues.
Call OpenQueue(Com3_Out, 30)
Call OpenQueue(Com3_In, 30)
'Open Com3 at 2400, N, 8, 1
Call OpenCom(3, 2400, Com3_In, Com3_Out)
Call PutQueueStr(Com3_Out, "Transmit ")
Delay(1.0)
Call PutPin(25, 1) 'Turn off Red LED
Delay(1.0)
Loop
End Sub
'--------------------------------------------------------------------
More info:
Pin 8 on the BX24 is tied to the TX data pin
Data pin on the RX is tied to what Pin 1 on the BX24 would normally
be connected to
12v supplied to the TX
5v supplied to the RX
Setup the Monitor Port to:
Com Port 1
Baud 2400
Parity None
Data Bits 8
Stop Bits 1
I was hoping the code would allow for the RF link to work, so that
way I could in the future "debug.print" info to my PC while the BX24
is not connected. Any reason why the code does not work?
I appreciate any info you can share.![Big Grin :D :D](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Conrad
https://www.sparkfun.com/commerce/product_info.php?products_id=7813
I wrote this code in the BX24 to test the RF Link:
'--------------------------------------------------------------------
Option Explicit
Dim Com3_In(1 to 30) As Byte
Dim Com3_Out(1 to 30) As Byte
Public Sub Main()
Do
Call PutPin(25, 0) 'Turn on Red LED to represent the Transmit
signal being sent
'Define pins for Com3 (TX = pin8).
Call DefineCom3(0, 8, bx1000_1000)
'Open Com3 serial port queues.
Call OpenQueue(Com3_Out, 30)
Call OpenQueue(Com3_In, 30)
'Open Com3 at 2400, N, 8, 1
Call OpenCom(3, 2400, Com3_In, Com3_Out)
Call PutQueueStr(Com3_Out, "Transmit ")
Delay(1.0)
Call PutPin(25, 1) 'Turn off Red LED
Delay(1.0)
Loop
End Sub
'--------------------------------------------------------------------
More info:
Pin 8 on the BX24 is tied to the TX data pin
Data pin on the RX is tied to what Pin 1 on the BX24 would normally
be connected to
12v supplied to the TX
5v supplied to the RX
Setup the Monitor Port to:
Com Port 1
Baud 2400
Parity None
Data Bits 8
Stop Bits 1
I was hoping the code would allow for the RF link to work, so that
way I could in the future "debug.print" info to my PC while the BX24
is not connected. Any reason why the code does not work?
I appreciate any info you can share.
Conrad