View previous topic :: View next topic |
Author |
Message |
Regular Guy
Joined: 04 Jun 2017 Posts: 110
|
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sat Jun 26, 2021 12:40 pm |
|
|
You're asking general electronics questions. This forum is for CCS
compiler problems only. You need to find a general electronics
forum. Here is one:
https://forum.allaboutcircuits.com/ |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19503
|
|
Posted: Sat Jun 26, 2021 12:40 pm |
|
|
Yes.
Parallel interface, SPI, I2C etc. etc.. Hundreds of different capacities,
and different page sizes I would guess there are probably at least 1000
different actual formats of EEPROM on the market. Many support multiple
interfaces, so there are some that can be driven both by SPI and by I2C.
SPI also comes in different 'flavours', so there are ones that can use multiple
data bits in parallel (though generally this gains nothing on the PIC, since
this format of SPI is not available on the PIC).
The commonest form, is the 'family' that are effectively descendants of
the original 2408, so this is the 'normal' EEPROM, but there are many
others. |
|
|
Regular Guy
Joined: 04 Jun 2017 Posts: 110
|
|
Posted: Sat Jun 26, 2021 1:10 pm |
|
|
Thank you Ttelmah
Our PIC in Practice book has a serial program lesson.
It seems like before SPI and I2C modules. Or PIC's without them.
Here is explanation:
Quote: | The microcontroller generates the data and then passes the data pulses to
the transmitter. The receiver receives the data pulses and a microcontroller
decodes the information and processes it. |
It is for PIC to PIC with 418 khz radio.But can just connect them.
Can post code from it.
Here is more explanation.
Quote: | I have decided to use a start bit that is 7.5ms wide, a 5ms pulse to represent
a logic 1 and a 2.5ms pulse to represent a logic 0. All pulses are separated by
a space of 2.5ms. The pulse train for NUMA is then as shown in Figure 12.3.
In order to generate this train the software turns the output on for the 7.5ms
start pulse, off for 2.5ms, on for 5ms for the first 1, off for 2.5ms, on for
5ms for the next logic 1, off for 2.5ms, on for 5ms for the next logic 1, off
for 2.5ms, on for 2.5ms for the logic 0, etc.
To generate the data each bit in the file NUMA is tested in turn. If the bit is
0 then the output is turned on for 2.5ms, if the bit is 1 then the output
is turned on for 5ms. The code for this data would be:
BSF PORTB, |
_________________ PIC Hobbyist |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19503
|
|
Posted: Sun Jun 27, 2021 7:05 am |
|
|
You started this thread asking about EEPROM's.
Now as PCM Programmer pointed out this is really a general electronic
query, rather that something for this forum, but I answered, since it might
affect choices you would make in the best type to interface to a CCS project.
Now you seem to have switched to asking instead about generating
pulse trains for a 418KHz radio system. Nothing to do with this original
question.
Not a good way to work.
Start by actually using the forum search, rather than just asking questions.
There have been many threads in the past about codes for such radio systems.
Big critical question is whether the modules you are using are FM or AM?.
If AM, your stream may well need to have balanced 1's and 0's in the
transmission, so something like Manchester encoding will be necessary. Also
you need to look carefully at what bandwidth the actual module supports.
A 7.5mSec 'bit', corresponds to only 133Hz. Many of the modules do not
support frequencies this low. If this is something like one of the Lynx
RF modules, then you are making things much more complex than they
need to be. Just use standard serial from the PIC. This way your chip has
a UART to handle the reception. |
|
|
Regular Guy
Joined: 04 Jun 2017 Posts: 110
|
|
Posted: Sun Jun 27, 2021 10:43 am |
|
|
Thank you Ttelmah
We were asking about the code.
While the lesson in PIC In Practice shows using 418 khz radio sender and
receiver. There is a little note in it saying you can just connect the two PIC's
with jumper wires.Leaving out the radios.
We are interested in the code.
Is it pre-UART serial communication please?
Or is it really for radio transmitters and receivers?
Not hard to imagine it fit in with R/C airplane hobby.
'Build Your Own Remote Control!' _________________ PIC Hobbyist |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19503
|
|
Posted: Sun Jun 27, 2021 11:47 am |
|
|
If you are meant to be doing this 'lesson', then you are meant to
write the code. Not get other people to give it to you. |
|
|
Regular Guy
Joined: 04 Jun 2017 Posts: 110
|
|
Posted: Sun Jun 27, 2021 11:49 am |
|
|
Excuse me?
To be more productive.
Question is:
Is this type of code for radio or PIC to PIC serial communication?
That is the question.
Thanks! _________________ PIC Hobbyist |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9224 Location: Greensville,Ontario
|
|
Posted: Sun Jun 27, 2021 5:50 pm |
|
|
It's a form of serial communications NOT specifically for PICs or 'radio'.
I found what might be the original article and it's just a 'bitbanged' method of sending/receiving data between two devices.
Even though UARTs have been around for decades, I still use very slow (24 Baud) 'bitbanged' serial communications for long distance, hackproof communications. |
|
|
Regular Guy
Joined: 04 Jun 2017 Posts: 110
|
|
Posted: Sun Jun 27, 2021 6:46 pm |
|
|
Thank you temtronic
'Here,here!' Great answer.
We WILL do that experiment. _________________ PIC Hobbyist |
|
|
|