Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

DATA transmission/receiving using SCR Radio modules.

Status
Not open for further replies.
hi C,
It was 'wrong' in the context of our chat about DIM's, not if you planned using all Const's for every address.
Const rd_regfifo = 0x00 'ADDRESS
Const wr_regfifo = 0x80 'ADDRESS or 0x80
Const rd_regopmode = 0x01
Const wr_regopmode = 0x81
Const rd_regbitratemsb = 0x02
Const wr_regbitratemsb = 0x82

But you say OS doesn't allow Const for SPI. [ I have never tried]

E
 
hi C,
It was 'wrong' in the context of our chat about DIM's, not if you planned using all Const's for every address.
Const rd_regfifo = 0x00 'ADDRESS
Const wr_regfifo = 0x80 'ADDRESS or 0x80
Const rd_regopmode = 0x01
Const wr_regopmode = 0x81
Const rd_regbitratemsb = 0x02
Const wr_regbitratemsb = 0x82

But you say OS doesn't allow Const for SPI. [ I have never tried]

E
Hi Eric,
I re-tried CONST in OSH for the addresses and now it is working, which is neater. If I run out of space, I'll switch back to DIMs.
Thanks, C.
 
Hi Eric,
I re-tried CONST in OSH for the addresses and now it is working, which is neater. If I run out of space, I'll switch back to DIMs.
Thanks, C.
Constants don't use any space in Ram
They are just replaced with their value when the program is compiled.

For example, these snippets are equivalent:
Code:
Costant one=1
Dim a as byte
a=one
End

........

Dim a as Byte
a=1
End
 
Constants don't use any space in Ram
They are just replaced with their value when the program is compiled.

For example, these snippets are equivalent:
Code:
Costant one=1
Dim a as byte
a=one
End

........

Dim a as Byte
a=1
End

Hi JJW,
Ah, that's interesting!
I think OSH failed before because I tried to load an address (CONST) with a variable value (CONST)

Now I see that the value must be set as a CONST first, e,g, CONST TX = 3

Regarding address RegOpMode (See attached) TX = 3, but when using a CONST for TX, is it necessary to include all of the byte?

EDIT:Regarding the above question: All of the byte must be sent for any changes to the ADDRESS BYTE.
EDITEDIT: Just noticed, that I should have replied to JJW, now changed:)




C.
 

Attachments

  • regopmode.jpg
    regopmode.jpg
    78.5 KB · Views: 298
Last edited:
Hi,
See changed reference program in #1. I am now trying to get a LORA program working, after finding that most likely OOK will not be suitable for MORSE, so a more useful DATA TX/RX is the next challenge.
There are some differences in the reference program e,g, Reference to RFM69, sx1276 and an Arduino shield, which I will try to convert to SX1278-18LF2520.

I'm still struggling, so if any one has better conversion skills please chip in.

C.
 
Hi,
I have just added a program in POST#1, that I have written with lots of help from other people's programs and notes, plus much more from this and other forums not forgetting the DATA sheet. (NOTE use the light blue LORA sections of it)
EDIT: Explanation moved to Post#1
Camerart.
 
Last edited:
hi C,
IMO I would suggest that modifying and adding posts to your original post will not get others interested enough to scan back and forth thru the threads and following posts.
Eric
 
hi C,
IMO I would suggest that modifying and adding posts to your original post will not get others interested enough to scan back and forth thru the threads and following posts.
Eric
Hi Eric,
I understand what you mean, but sometimes threads get long and the latest (in this case) program would get lost in the thread, so each attachment would need to be opened and studied to find the latest 'result'. (I follow a thread on a radio control forum, which is 1000s of posts long, and searching for the answer to your question takes an effort, and they do the same, I thought it was a good idea so I copied them)
Does this now seem sensible?
C.
 
hi C,
Perhaps a thread on the members forum maybe a good idea, asking this question.

The downside to editing/modifying earlier posts is that the answers posted later by other members become meaningless.

E
 
hi C,
Perhaps a thread on the members forum maybe a good idea, asking this question.

The downside to editing/modifying earlier posts is that the answers posted later by other members become meaningless.

E
Hi Eric,
In this particular case, I don't think there are many people interested, at least not until I get it going. I notice that a lot of people look at this page, but not many actually open the attachments, only the ones who can help with Oshonsoft, and looking at a working program will show anybody how each bit is done.
EDIT: I misunderstood your members lounge comment, I'll try that.
C.
 
Last edited:
Hi, OOK MODE
I've now got a circuit working :) , and program...........................POSTED in #1
I've used a program, that uses the easiest method, of simply turning ON/OFF the radio, using the default frequency.
I'm still 'translating' a more complicated program (slowly)
C
 
Last edited:
Hi, LORA MODE
Here is the program so far. I have translated it from some notes written in 'C' This program is written for LORA mode. [This program compiles, but is unfinished]

A link to the radio module SX1278 is on POST#1

I have asked questions on other threads about detailed sections of the code, but I can't test the replies, till the program has been compiled and on a PIC in the complete circuit, then the radio module can export results to a screen for me to verify.
C.
 

Attachments

  • 18lf2520 8mhz int SX1278 LORA S 220617 0800.bas
    20.9 KB · Views: 308
Last edited:
Hi,
I've updated the program using Sagor's BIT BYTE suggestion from another thread.
I'm sure there are mistakes in the program, but it compiles, so now I should be able to work through it, 'in circuit'
I now have to understand how the FIFO works to finish.
I also realised that there needs to be an INPUT and OUTPUT from an external source for the radio module to SEND/RECEIVE
C.
 

Attachments

  • 18lf2520 8mhz int SX1278 LORA S 230617 1100.txt
    18.6 KB · Views: 295
hi C,
I have been looking online for you, trying to find an SX emulator or simulator, no luck so far.

Check these links for SX info.
E

Links DELETED, Virus, clears passwords!
 
Last edited:
hi C,
I have been looking online for you, trying to find an SX emulator or simulator, no luck so far.

Check these links for SX info.
E

http://www.instructables.com/id/Introducing-LoRa-/

http://www.open-electronics.org/the...rce-arduinos-long-range-communication-module/

**broken link removed**
Hi E,
Some interesting stuff there.
I haven't quite figured out how to test it, but to see if the registers are working I can READ them and send the result to an LCD.
I use SDR# to see if there is transmission. Although I'm new to it.
Thanks, C
 
hi,
The Long Range 10k LoRa project... Don't go there!!!:arghh:

I am still trying to fix my PC!!
E
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top