PDA

View Full Version : Count RB0... on RB7



Leonardo
- 25th August 2005, 01:28
Hello,

Do I use a PIC16F628 and do I want to count 15 pulses in RB0 and once finished the PORTB7 on can give me a guide of as making it?.

Thank you

Jųan
- 25th August 2005, 01:48
Hola Leo, yes you can use a 16f628 to do that. Let me get this straight, do you want to flash RB0 fifteen times and then on the 15th, RB7 comes on?

Juan

mister_e
- 25th August 2005, 03:10
one way, use interrupt. once you're in the interrupt handler, increment a variable. once it reach 15, set a flag to confirm that you reach 15. In the main loop, just poll the Flag.

Another way will be to use the internal counter with TIMER0 and RA4. just poll TMR0 to see if you reach 15.

OR use TIMER0 interrupt overflow
or
or
or

Leonardo
- 25th August 2005, 15:56
Hello Juan,

If that is.

You speak spanish?.

Thanks





Hola Leo, yes you can use a 16f628 to do that. Let me get this straight, do you want to flash RB0 fifteen times and then on the 15th, RB7 comes on?

Juan

Leonardo
- 25th August 2005, 15:58
Hello Mister And,

Thanks, you can give an example me, is that not by where to begin.

Again thanks




one way, use interrupt. once you're in the interrupt handler, increment a variable. once it reach 15, set a flag to confirm that you reach 15. In the main loop, just poll the Flag.

Another way will be to use the internal counter with TIMER0 and RA4. just poll TMR0 to see if you reach 15.

OR use TIMER0 interrupt overflow
or
or
or

Jųan
- 25th August 2005, 20:14
Hi Leo, yes I do speak spanish but I dont think it would be fair for others for us to speak it in this forum :-) Im happy to speak spanish to you via email. Seems you are learning english, keep at it!

Juan

Leonardo
- 25th August 2005, 23:12
Juan,

You can please give me an idea of the code.

Thank you





Hi Leo, yes I do speak spanish but I dont think it would be fair for others for us to speak it in this forum :-) Im happy to speak spanish to you via email. Seems you are learning english, keep at it!

Juan

Leonardo
- 25th August 2005, 23:13
Juan,

My mail is [email protected]

Thanks




Hi Leo, yes I do speak spanish but I dont think it would be fair for others for us to speak it in this forum :-) Im happy to speak spanish to you via email. Seems you are learning english, keep at it!

Juan