annoyin_kid
Member
im making a simple programme for an led flashing and a speaker going off when something happens and to deacvitiate the ldr and led i have to press an other switch which will be detected by an interrupt. im using a 08-m pic.
this is my programme from when the interrupt is set to when the interrupt stops:
alarm: setint %00001000,%00001000
high red
tune part 1
low red
high blue
tune part 2
low blue
goto alarm
interrupt: high 3
goto sense
return
my problem is that when i try to upload the programme the syantax thing says that i can't use pin 3 as an output but i don't want pin 3 as an output, i want it as an input (and pin three is an input) and when i push a switch i want the pin 3 to detect that i pushed the switch (pin 3 goes high)and then go back to waiting for the led and speaker trigger (sense).
can you please tell me what is wrong and please give me the right programme. you don't really have to worry about the speaker and leds because its just the interrupt that doesn't work.
Edited by - annoyin_kid on 05/10/2006 22:31:17
this is my programme from when the interrupt is set to when the interrupt stops:
alarm: setint %00001000,%00001000
high red
tune part 1
low red
high blue
tune part 2
low blue
goto alarm
interrupt: high 3
goto sense
return
my problem is that when i try to upload the programme the syantax thing says that i can't use pin 3 as an output but i don't want pin 3 as an output, i want it as an input (and pin three is an input) and when i push a switch i want the pin 3 to detect that i pushed the switch (pin 3 goes high)and then go back to waiting for the led and speaker trigger (sense).
can you please tell me what is wrong and please give me the right programme. you don't really have to worry about the speaker and leds because its just the interrupt that doesn't work.
Edited by - annoyin_kid on 05/10/2006 22:31:17