hi C,
I would put good money on saying if that SPI single end bit for the RX Wr/Rd, is the only SPI transfer I/O problem, it is not due to the SX and PIC clock sync.
hi C,
I would put good money on saying if that SPI single end bit for the RX Wr/Rd, is the only SPI transfer I/O problem, it is not due to the SX and PIC clock sync.
Coincidentally, a friend of mine is starting a professional job using these very Chips, in a few weeks. They are in slightly different modules, but the same data sheet. He will be able to get to the bottom of my problem. (Lucky or what!)
Coincidentally, a friend of mine is starting a professional job using these very Chips, in a few weeks. They are in slightly different modules, but the same data sheet. He will be able to get to the bottom of my problem. (Lucky or what!)
I tried this program: Left switched on and it started, but very slowly. The GLED switched ON/OFF 8SECS/8SECS and as you can see it should be 500Ms/500Ms.
Guess what! The LCD showed OOKRX = 45 which is what OOKRX should be. (Don't spend that 50P yet )
Hi Eric,
Just realised that 0.5usON/0.5uOFF is actually 1MHz (Correctly if I'm wrong) I set the PIC to 1MHz and it is now flashing and showing 0x45 on the LCD which = 0x2d = OOKRX.
The settings are set to EXTERNAL CLOCK with no RA6 output. There is no signal from RA6.
The 5sec delay has been left from previous programs, it has been removed.
Now to try to speed up the CLKOUT from the SX1278 if possible.
C.
Hi,
I've been trying different combinations of settings (and there are lots) trying to get the OOK CONTINUOUS mode to work so I could send Morse, and finding there is too much delay, making it impossible for Morse. I've also been told, that these modules are not designed for this purpose.
I'm going to change to packet mode, which includes PSK and LORA modes.
I have attached some sections of code: I found that I couldn't 'OR' using CONST and had to do it the way shown, but it isn't very elegant. Is there a more elegant way of writing to the SX1278 module at initialisation? EDIT: Open TXT in wordpad or better than notepad.
Camerart.
hi C,
As you are declaring in the program code the value of the Constant, Oshonsoft will not allow that Constant value to be changed, it is a Constant.
Why are you using Const when Dim Value as Byte would IMO be easier.?
eg:
Dim dummyreg As Byte ' this would READ the Reg
dummyreg = 0x31 ' reg address
'within prog code
dummyreg = dummyreg Or 0x80 ' WRITE to Reg
another option would be, which I prefer as I don't have to keep track of Bit 7
Use rd or wr to suit action required.
hi C,
As you are declaring in the program code the value of the Constant, Oshonsoft will not allow that Constant value to be changed, it is a Constant.
Why are you using Const when Dim Value as Byte would IMO be easier.?
True they are constants, as they are the SX1278 register addresses and never change. However, I can stop using CONST if it is better, as I don't think CONST allows: 'CONST or ox80'
hi C,
As you are defining the Regs as a Byte value, it should only use a Byte of program space.
The Dim statement only specifies the start memory address of the data that you intend to store at that location.
The amount of memory space allocated from that start address depends upon the data definition.
Byte, Int, Long, String etc.
I have not checked how much memory space a Oshonsoft CONST uses.???
So Dim ..... as Byte ' would allow the Complier to allocate an address somewhere in memory.
What you put in that address location will be decided by the program Code.
You can if required type.
Dim ..... as Byte @ 0x20 ' this forces the Complier to allocate the memory address at 0x20.
[ Often Oshonsoft will 'burp' at this request and it may require editing, move it further up the memory space]
Your posted listing is incorrect.
E EDIT:
You could of course use CONST for the regs.
Dim rd_regfifo as byte
Dim wr_regfifo as byte
Dim rd_regopmode as byte
Dim wr_regopmode as byte
Dim rd_regbitratemsb as byte
Dim wr_regbitratemsb as byte
hi C,
You can if required type.
Dim ..... as Byte @ 0x20 ' this forces the Complier to allocate the memory address at 0x20.
[ Often Oshonsoft will 'burp' at this request and it may require editing, move it further up the memory space]
Dim rd_regfifo as byte
Dim wr_regfifo as byte
Dim rd_regopmode as byte
Dim wr_regopmode as byte
Dim rd_regbitratemsb as byte
Dim wr_regbitratemsb as byte
Just checking that our wires aren't crossed! The register addresses are on the radio module and are fixed, and have a default value which can be changed. I only need to write to the addresses I need to change. The long list of CONST was copied and pasted as reference for the addresses.