Hi
I am new to PIC programming, i am using MikroC PRO, i tried simple codes for LED blinking. of cause i am in the learning process. I have few PIC16F883 with me.
But i need support to write a code for me. My son will do a project for his school and the task is to count the people when they enter a room.
I have no issue in hardware side, understanding outputs and multiplexing etc,
There will be two sensors at the entrance S1 & S2 connected to the inputs of PIC
one input PB for resetting the counter to zero
if interrupt goes in sequence, S1 first then the counter will increment by one, if S2 first then it will countdown. Max delay time 5s.
outputs
a 7 segment display 2 digits, common cathode. (roll overs after 99, but not necessarily. if pic is having enough outputs then the coding can be for 4 digits)
one out put to switch on room light if counter is non zero.
ignore all exceptional situations, such a s negative count etc.
If you are sending the code please specify the pins. C code also will be fine, i prefer a working hex file, so that i can directly download to the PIC from pickit-3.
oscillator frequency 8 Mhz.
appreciate your supports
thanks
Razeen