• 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.

ericgibbs

Well-Known Member
Most Helpful Member
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
 

camerart

Active Member
Thread starter #122
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
 

camerart

Active Member
Thread starter #124
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

Last edited:

camerart

Active Member
Thread starter #125
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.
 

camerart

Active Member
Thread starter #126
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:

ericgibbs

Well-Known Member
Most Helpful Member
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
 

camerart

Active Member
Thread starter #128
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.
 

ericgibbs

Well-Known Member
Most Helpful Member
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
 

camerart

Active Member
Thread starter #130
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:

camerart

Active Member
Thread starter #131
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:

camerart

Active Member
Thread starter #132
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

Last edited:

camerart

Active Member
Thread starter #133
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

ericgibbs

Well-Known Member
Most Helpful Member
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:

camerart

Active Member
Thread starter #135
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
 

camerart

Active Member
Thread starter #136

ericgibbs

Well-Known Member
Most Helpful Member
hi,
The Long Range 10k LoRa project... Don't go there!!!:arghh:

I am still trying to fix my PC!!
E
 

camerart

Active Member
Thread starter #140

Latest threads

EE World Online Articles

Loading

 
Top