Maker Pro
Maker Pro

PICAXE questions

Hi,
I have 2 questions about PICAXE:

1) my program run executing a loop that do some operations; at the
same time I would like to detect data from infrared sensor by INFRAIN
command. I thought to do this: program run into main loop (not stand
by on IFRAIN) and interrupt is set to pin 0 high (pin enabled to
receive data from infrared sensor). When program detect high level on
pin 0 (begin trasmission) execute interrupt sobroutine (interrupt
detected); here, INFRAIN command decode data received. Otherwise I
could detect interrupt on other pin, connected, anyway, to infrared
sensor.
Do you think it will work?
2) I have to detect if button on IR remote control is held. After each
operation following valid data on infrared pin, before execute next
INFRAIN command, I call a subroutine like this: check pin 0 (infrared)
for high level continuosly (approx. 45 ms). If high level is detected
then button is held. Now execute INFRAIN command again.
Do you think it will work?

Thank you
 
C

CFoley1064

Jan 1, 1970
0
Subject: PICAXE questions
From: [email protected] ([email protected])
Date: 12/7/2004 7:30 AM Central Standard Time
Message-id: <[email protected]>

Hi,
I have 2 questions about PICAXE:

1) my program run executing a loop that do some operations; at the
same time I would like to detect data from infrared sensor by INFRAIN
command. I thought to do this: program run into main loop (not stand
by on IFRAIN) and interrupt is set to pin 0 high (pin enabled to
receive data from infrared sensor). When program detect high level on
pin 0 (begin trasmission) execute interrupt sobroutine (interrupt
detected); here, INFRAIN command decode data received. Otherwise I
could detect interrupt on other pin, connected, anyway, to infrared
sensor.
Do you think it will work?
2) I have to detect if button on IR remote control is held. After each
operation following valid data on infrared pin, before execute next
INFRAIN command, I call a subroutine like this: check pin 0 (infrared)
for high level continuosly (approx. 45 ms). If high level is detected
then button is held. Now execute INFRAIN command again.
Do you think it will work?

Thank you

You'll probably get a good response to your question at the
manufacturer-sponsored PICAXE forum:

http://www.rev-ed.co.uk/picaxe/forum/

and also, reread the software manual.

Good luck
Chris
 
Top