Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 15, 2024, 12:21:49 00:21


Login with username, password and session length


Pages: [1]
Print
Author Topic: Reaction timer pbp project help needed  (Read 3745 times)
0 Members and 1 Guest are viewing this topic.
sphinxifm
Guest
« on: July 07, 2007, 06:40:33 06:40 »

i am building a project that consists of two buttons connected to a pic 16f877a that needs to have a time delay and at the end of the delay a light comes on and the button has to be pressed, the first to press their button is the winner and their led lights for 30 seconds and then goes off but the time delay needs to be a random time between 2 and 10 seconds each time the game is played. (ie not the same time delay every time) could anyone help with this problem as i have been searching through the forums but am unable to find any code for pbp that can help. i have built the circuit and can place the led's and buttons on any port. i will post all details of the project as soon as its completed. many thanks in advance for all/any help.
Logged
pouchito
Newbie
*
Offline Offline

Posts: 29

Thank You
-Given: 61
-Receive: 2


« Reply #1 on: July 07, 2007, 10:35:06 10:35 »

hello, i can help but i use assembly :S do u have any problem?
Logged
sphinxifm
Guest
« Reply #2 on: July 12, 2007, 03:50:52 15:50 »

Thankyou for your offer to help. I have a very limited knowlage of assembly but would appreciate any help/code you could offer. Is it possible that i could use your code and call it from a program i write in pbp? any help is greatly appreciated.
Logged
hankhill
Junior Member
**
Offline Offline

Posts: 44

Thank You
-Given: 30
-Receive: 1


« Reply #3 on: July 18, 2007, 02:38:03 02:38 »

You do not say which part that you need help with.....

hh
Logged

I don't have an anger problem. I have an IDIOT problem!
kcwcc
Guest
« Reply #4 on: July 19, 2007, 07:58:56 19:58 »

Hmmm...sounds like a class project to me...anyway, it's quite a simple program...what are you having trouble with exactly?
Logged
sphinxifm
Guest
« Reply #5 on: July 22, 2007, 02:27:30 14:27 »

i wish it was a class project but im 32! i am having problems with the random delay cycle. i have read the forums but cant seem to find anything and any help would be appreciated.
many thanks
Logged
Vague
V.I.P
Junior Member
*****
Offline Offline

Posts: 51

Thank You
-Given: 695
-Receive: 29


« Reply #6 on: July 22, 2007, 04:55:57 16:55 »

Hi
If you have a look here
http://www.piclist.com/techref/microchip/rand8bit.htm
It might be of help to you. i think that you can include assembly language within the basic.
Hope this helps
Logged
chandra2sekhar2000
Active Member
***
Offline Offline

Posts: 127

Thank You
-Given: 24
-Receive: 18


« Reply #7 on: July 23, 2007, 03:48:17 15:48 »

HELLO sphinxifm
USE INTERRUPT TO SENSE  THE BUTTON AT ANY TIME AND IN THE MAIN LOOP TAKE A COUNTER WHICH CAN COUNT IN THE STEP OF EVERY 1 SECOND. STORE IT IN A VARIABLE THEN MAKE THE INTERRUPT RUN SUB PROGRAM TO USE THE DELAY FOR LED TO BE LIT.TRY IT IF OK PLACE THE CODE OR U WANT I WILL TRY TO WRITE THE CODE FOR U IF  U PROVIDE THE SCHEMATIC ( TO DETERMINE WHICH PINS U WANT TO USE IN PIC)
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC