Author |
Message |
Topic: fix time for the interrupt |
viknes1985
Replies: 2
Views: 3362
|
Forum: General CCS C Discussion Posted: Wed Mar 11, 2009 2:50 pm Subject: fix time for the interrupt |
hi,
i've some problem with interrupt. This what i wanted, i enable the interrupt, after it execute for X times, i disable it. So first i used a while loop to wait till the interrupt to be finish.
... |
Topic: Timing issue |
viknes1985
Replies: 6
Views: 5120
|
Forum: General CCS C Discussion Posted: Mon Mar 09, 2009 12:37 pm Subject: enabling is seems to ok |
Hi Ttelmah,
i'm using RBIE
#byte INTCON = 0x00B
#bit RBIE = INTCON.3 //int_rb enable/disable
do i still need to enable INT_RB in main? as you may see, i enabling the interrupt only at cert ... |
Topic: Timing issue |
viknes1985
Replies: 6
Views: 5120
|
Forum: General CCS C Discussion Posted: Mon Mar 09, 2009 10:49 am Subject: read the pulse status |
Using interrupt coz alot of problem, using fast i/o solved the problem.... |
Topic: Timing issue |
viknes1985
Replies: 6
Views: 5120
|
Forum: General CCS C Discussion Posted: Mon Mar 09, 2009 9:58 am Subject: i'm using int_rb |
Hi Ttelmah,
I tried as you said, but the bit is always high.
Clarification :
I'm using int_rb to detect the changes in B4 (PIN_B4), so I used set_tris(0x10);
Basically I want to get the bi ... |
Topic: Timing issue |
viknes1985
Replies: 6
Views: 5120
|
Forum: General CCS C Discussion Posted: Thu Mar 05, 2009 4:01 am Subject: thanks |
thanks for the quick reply Ttelmah. |
Topic: Timing issue |
viknes1985
Replies: 6
Views: 5120
|
Forum: General CCS C Discussion Posted: Thu Mar 05, 2009 2:54 am Subject: Timing issue |
i wanted to read a pin's state.
1. current_bit = PORTB
read all the bits and evaluate PIN_B0 (believe this is do faster reading)
or
2. current_bit = input(PIN_B0)
i worry abou ... |
Topic: PIC16F877A programming |
viknes1985
Replies: 10
Views: 9689
|
Forum: General CCS C Discussion Posted: Thu Mar 05, 2009 2:45 am Subject: it would be clock counter |
it would return oscillator counter.
for timer 0 (rtcc) : 0 - 255 |
Topic: Manchester Code Reader |
viknes1985
Replies: 17
Views: 20821
|
Forum: General CCS C Discussion Posted: Thu Feb 26, 2009 11:33 pm Subject: my output |
I getting
FF
FF
FF
FF
FF
FF
FF
FF
apparently i guess, shift_left cannot be used at here. If it shifted to left, the MSB will lost. Am i right? I tried "rotate_left (address, bytes)& ... |
Topic: Manchester Code Reader |
viknes1985
Replies: 17
Views: 20821
|
Forum: General CCS C Discussion Posted: Wed Feb 25, 2009 10:02 pm Subject: Stuck at here |
#asm
rlf STAC+7,f
rlf STAC+6,f
rlf STAC+5,f
rlf STAC+4,f
rlf STAC+3,f
r ... |
Topic: How does this code work? |
viknes1985
Replies: 5
Views: 4320
|
Forum: General CCS C Discussion Posted: Mon Feb 16, 2009 11:02 pm Subject: read the input |
Thanks Ttelmah and FvM. You're right FvM, the posted code is to get the input from the device. What i don't understand is, whenever the rotation of the arrays takes place, how does the nearby arrays ... |
Topic: How does this code work? |
viknes1985
Replies: 5
Views: 4320
|
Forum: General CCS C Discussion Posted: Mon Feb 16, 2009 12:26 pm Subject: How does this code work? |
Can anyone tell me, how this code is run?
static byte datas;
datas = PORTB;
#define MASK_INPUT 0x10
//this code looped 64 times, on every interrupt
CARRY = (datas & MASK_I ... |
Topic: Manchester Code Reader |
viknes1985
Replies: 17
Views: 20821
|
Forum: General CCS C Discussion Posted: Fri Feb 06, 2009 9:14 am Subject: anyone |
anyone can help me to find where's my code problem. Why it's not working? |
Topic: Read Manchester.... Where's the Problem? |
viknes1985
Replies: 4
Views: 6870
|
Forum: General CCS C Discussion Posted: Sun Feb 01, 2009 10:07 am Subject: Yes it is |
Yes I aware that it won't work in CCS. It's different language. Meant to say, i extract the c code from those code. Here, i wish to start over since alot of problems.
#include <16F877a.h>
#f ... |
Topic: Read Manchester.... Where's the Problem? |
viknes1985
Replies: 4
Views: 6870
|
Forum: General CCS C Discussion Posted: Sun Feb 01, 2009 4:46 am Subject: Interrupter |
Is My reader function (#int_RB) will function only once or everytime when there's a change port B4 to B7?
program ManReceive6;
label do_sample, sync1; // a litle bit of unpopular labe ... |
Topic: Read Manchester.... Where's the Problem? |
viknes1985
Replies: 4
Views: 6870
|
Forum: General CCS C Discussion Posted: Sun Feb 01, 2009 3:33 am Subject: Read Manchester.... Where's the Problem? |
If using interrupt to read the code, it gives more problems. Since the pulses are in 90 us to 100 us... Better to use fast io |
|