Read the rfPIC Dev Kit Quick Start Quide. It has blow-by-blow instructions. The link above
will take you directly to the page where you can download this if you don't already have it.
Read the rfPIC Dev Kit Quick Start Quide. It has blow-by-blow instructions. The link above
will take you directly to the page where you can download this if you don't already have it.
yes..we finally manage to test the rfkit and it works..
now its the time for me to alter the code..the transmitter right now required no external input except from the switch to operate. we planned to replace the gp4 with input from sensor and the input is digital . however there are some part of the demo program that i dont understand the purpose which i pasted below.
under part "fill in transmission buffer" , why they purposely inserted the random number into the buffer register?and then will be ignored by receiver ? and how the receiver is going to ignore it?
and since the input for this demo is analog signal, they have used the converter and have the result stored in register ADRESH and ADRESL. so as for me who has a digital input, i should be able to read straight from the gpio port , but im not sure how is the command since im only read from one bit of register.
and this command means the input data being read and stored in temp register?
the part of demo program that im confused
;----------------------------------
; fill in transmission buffer
;----------------------------------
XMIT
bsf RFENA ; Enable Transmitter
movlw 0x73 ; send Serial number
movwf CSR0
movfw FuncBits ; send Function Bits
movwf CSR1
; send 16-bit Counter
;
; send analog value (this is modified from the fixed
; KeeLoq(r) protocol; these two fields are normally
; used for 16-bit counter value)
bsf STATUS, RP0 ; ----- Select Bank 1 -----
movfw ADRESL ; ADRESL Result
bcf STATUS, RP0 ; ----- Select Bank 0 -----
movwf CSR2
movfw ADRESH ; ADRESH Result
movwf CSR3
movlw 0x56 ; send 32-bit serial number 1 (ignored by receiver)
movwf CSR4
movlw 0x34
movwf CSR5
movlw 0x12
movwf CSR6
movlw 0x20
movwf CSR7
movlw 0x55 ; send Flags
movwf CSR8
Last edited by medusa2584; - 22nd November 2007 at 07:36.
I think I have the same problems with gavo. But currently I'm using assembly to do my programming. This rfPIC12f675 is different from other normal PICs where it has only one tris and gpio port. And the gpio reg is assigned to the pin itself.
Can you kindly explain to me about how can I read in data serially using assembly? I'm sorry that I'm not really familiar with the code you pasted before.
Can I just read in data bit by bit say into gp3 and then send it to gp2 for ASK modulation?
Or can I just put or connect my digital input to gp2?
I understand that the coding below is a Keeloq protocol
' Constants
PreAmble CON $A5 ' 10100101 preamble
Synch CON "~" ' 01111110 synch byte
N4800 CON 188 ' 4800 bps
N2400 CON 16780 ' 2400 bps
GUARD CON 5 ' 5mS guard time pause
As I'm not familiar with your coding, may I know what CON indicates and what N4800 CON 188 means?
Thanks again for your help!
in PBP, CON is used to define a software constant, in asm it should looks like
YourConstantVariable = .25
or
#DEFINE YourConstantVariable .25
Using pre-defined constant here and there, allow to have a better readable code, and also allow to do some changes without having to scroll the whole code.
For a 12F675 asm example.. well, first google hit gave me
http://www.jbgizmo.com/page29.htm
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
hi people,
has anyone ever encountered a problem of stack overflow in their program?
rite now im doing a program to transmit a stack of data which contain 16 bit + 64 bit +
and the pic that im using is a pic12f675. what should i do to reduce this error?
Hi Medusa,
I had this problem once and it turned out to be a subroutine that had a GOTO at the end of it instead of RETURN. Changed the word--solved the problem.
HTH,
BobK
thanks bobk..i tried that, put return at the end of each goto instruction i have, but still it has not succeeded. is it possible due to overflow stack?
my program is supposed to have a stack of 8 byte output excluding the preamble and header and timeguard.
does anyone ever write a program that has a subroutine as follows
read input from port GPIO
move data from GPIO to 'input' register
take only data from bit 1
store the input (bit 1)to bit 0 at another register
repeat for eight times
what i already have in mind
movfw GPIO
movwf input
movlw 0000 0000
xorwf input,f
goto rotate
rotate
rrf input,f
rrf input,f
anyone has any idea to continue?
Hi Bruce!
I have tried ur codes on RfPIC kit. i can see the data being sent by transmitter on GP2 and received on PORTC.1 on receiver side but the LED's are not blinking. what might be the problem.plz help me troubleshoot.
thanks
That's hard to say. It works perfectly on my rfRXD0420 module installed in PICkit 1 board.
Are you compiling the receiver code without any changes, and programming it into a
PIC16F676 on the PICKit 1 board with the rfRXD0420 installed per the instructions?
Hi
U have not included modedefs.bas in ur program.is that an issue?
I did that but to no avail.
maybe config fuses are causing something.they seem ok.they are as under when i read them using PICkit 1 software:
12F675
config word:0x31D4
osccal: 0x3480
bandgap: 0x3000
12F676
config word:0x31C4
osccal: 0x3440
bandgap: 0x3000
Bookmarks