It will count at logic 1. If you put if (!input_state(pin_a5) then it will count at logic 0ok mike...
thanks
I will try that one out..
another question..what STATE(logic 1 or 0) will it count?? is "pin_a5" pulled to Vdd(w/resistor)?
EDIT:
ooopppsss it "triggers" on HIGH...![]()
Caveat: I know a fair amount of x86 assembly, but not for the 16F84.COUNT porta.0,1000,W0 ' COUNT FOR 1 SEC
COUNT porta.0,1000,W0 <-- I cant translate this to C ..the rest of the statements, I can understand BUT the one I mentioned, Im having a hard time translating it ...
Don't know what language that snippet of code is written in but assembler it most certainly ain't!!Caveat: I know a fair amount of x86 assembly, but not for the 16F84.
I looked at the data sheet for the 16F84 and learned that there are 37 instructions, none of which is a COUNT instruction. Could COUNT be some sort of macro that's defined elsewhere than in the code you showed?
Now that you mention it, it does look like BASIC. The OP threw me off when he described it as ASM (assembly) code, which caused my brain to start thinking in those terms.Don't know what language that snippet of code is written in but assembler it most certainly ain't!!
Could be one of the many flavours of BASIC.
| Thread starter | Similar threads | Forum | Replies | Date |
|---|---|---|---|---|
| S | Problem in counting pulse input | General Electronics Chat | 4 | |
| M | 40Mhz pulse counting and storing count value | Microcontrollers | 12 | |
| K | Need a pulse counting switch | General Electronics Chat | 1 | |
| S | Counting pulse | General Electronics Chat | 5 | |
| D | Low Width Pulse Counting | General Electronics Chat | 2 |