![]() | ![]() | ![]() |
| |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
![]() |
| | Tools |
| | #1 |
|
Hi, I've purchased 2 pairs of RF module recently. TLP434A and RLP434 as shown in the attachment. I want to use it as the carrier of my remote control. I'm using a single remote control to control 2 devices. Basically the function is just turning on and off 2 receivers, so I need only 4 different data. I've referred to Nigel's tutorial 12.3, and I have some question here. Are the INDF and FSR register working together? It seems their contents are the same. Can I use other defined constant instead of using these? What is the usage of this: fast CRC-8 algorithm with poly x^8+x^5+x^4+1 executes in 23 cycles per update? When I bought this RF module, the technician told me that it is good to use the module with the encoder and decoder, as shown in the attachment as well. Any encoder and decoder will work. But I don't think Nigel's and Peter JAKAB's remote control have these encoder or decoder, simply the PIC with the RF module and other application components. Any idea? Thanks
__________________ bananasiong | |
| |
| | #2 |
|
The PIC does all the coding and decoding, you can send what you want in the data packets - if it's a simple remote control you just need device ID and function - you could use the SIRC's routines from my IR tutorial just as well for remote control via radio. INDF and FSR are for indirect addressing, consult the PIC datasheet. | |
| |
| | #3 |
| Code: movlw 0xAA ;set address byte to 0xAA movwf mtx_buffer . . movlw mtx_buffer ;0xAA = b'10101010' movwf FSR . . outbu0 movf INDF,W ;[0xAA]-->w call update_sum . . update_sum ; fast CRC-8 algorithm with poly x^8+x^5+x^4+1 ; executes in 23 cycles per update xorwf sum,f clrw THanks
__________________ bananasiong Last edited by bananasiong; 13th March 2007 at 09:47 AM. | |
| |
| | #4 |
|
I'm not sure whether the RF module is working or not, because I've connected everything well, Vcc and Vss, when I connect the data input pin to Vcc, the digital output at the receiver is around 2V measured, when I connect the input pin to ground, the output is also 2V. Should I test with the pulses as input signal? Thanks
__________________ bananasiong | |
| |
| | #5 |
|
RF modules aren't DC coupled, so you can't just DC switch the input - feed it a 1KHz squarewave and use a scope on the receiver.
| |
| |
| | #6 |
|
Yes, I can see the waveform from the receiver by a scope. But when I use a PIC to input to the transmitter, with 500 Hz (1 ms on and 1 ms off) to send 8 pulses, and there is also a PIC with the receiver to count the received pulses. It responses only when it receives 8 pulses. But it seems not working. Is there any easier way to check the communication between 2 PIC's before I do manchester coding? Do I need to pull up or down the input pin of the PIC via a resistor? Thanks
__________________ bananasiong | |
| |
| | #7 | |
| Quote:
| ||
| |
| | #8 |
|
Yes, the waveform into the transmitter and out from the receiver are the same. I've tried with 0.5ms, but it doesn't work as well.
__________________ bananasiong | |
| |
| | #9 |
|
My connections are okay, just according to the datasheet and I don't put any decoupling capacitor like yours. Does it cause the RF module not to work? Thanks
__________________ bananasiong | |
| |
| | #10 | |
| Quote:
It 'may' work fine without it?, and perhaps has something on the substrate?, but it's good practice to add decouplers!. | ||
| |
| | #11 |
|
Yes I have decoupling capacitor for the PIC, but not the RF module. I'll try it soon. And, is it okay if I test it on a breadboard? I think it should be fine since the modulation is done on the RF module itself.
__________________ bananasiong | |
| |
| | #12 | |
| Quote:
| ||
| |
| | #13 |
|
My program seems to be very long. According to the datasheet, PIC16F877A has 8K memory, in hex, it is 0x2000. As long as the hex file size is less than 0x2000, my program will work well? Even branch from the very begging line to the very last line has no problem? Thanks
__________________ bananasiong | |
| |
| | #14 |
|
The PIC 16F series consist of a number of 2K pages, if you goto or gosub to a different page you have to set it accordingly. As long as you stay in the first 2K of memory this isn't a concern - are you sure your program is anywhere near 2K, 2K is a LOT of assembler!.
| |
| |
| | #15 | |
| Quote:
Therefore you cannot just look at the HEX file size to determine the actual binary code size. You need to load the hex file into any PIC programming software and then you can examine/view the actual length of your program. As a rough guess, the HEX file size will be 2.5x or more the actual size of the binary codes.
__________________ L.Chung | ||
| |
|
| Tags |
| control, module, pic, remote |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| how to control a remote control toy car through printer port | shiraj | Electronic Projects Design/Ideas/Reviews | 2 | 24th August 2009 07:14 AM |
| Central Heat and Air Remote Control | ae4jm | General Electronics Chat | 4 | 6th June 2006 01:08 PM |
| Newcomers, please read! (PIC regarded) Upd. 0xD | Jay.slovak | Micro Controllers | 0 | 17th April 2005 02:05 PM |
| Motor control interface | dreamproject | Micro Controllers | 0 | 31st March 2005 04:48 AM |
| Use Handheld Computer as Remote Control? | MrMikey83 | Electronic Projects Design/Ideas/Reviews | 2 | 20th October 2003 03:29 PM |