ASKP 11916
New Member
Hi
I am a beginner at this pic programming thing but unfortunately I have to do a project on this and I would be most grateful if you could help me out here.
What I have to make is an A/d converter from the 16f877A pic. But I thought of going through first things first, specially cause this is my first time in programming a pic. So I thought of writing out this simple programme to switch an led on and off, but after realizing that a pic switching an LED on/off will happen so fast I might not be able to see a difference I thought of writing a programme with an interrupt.
So as it is, it is powered off a crystal oscillator of 2.5 MHz and is made to switch the port D on and the goto sleep. Whenever there is an input at the interrupt pin (pin 33) the pic will wake up turn the LED on / off (depending on the previous state) and go back to sleep.
But when I run, it according to the circuit in the schematic diagram attached hereto, it doesn’t work. Nothing happens to the LED.
I have attached both the schematic diagram and the code. Please have a look at it and correct it as necessary.
Thanking you for your early response.
AP
I am a beginner at this pic programming thing but unfortunately I have to do a project on this and I would be most grateful if you could help me out here.
What I have to make is an A/d converter from the 16f877A pic. But I thought of going through first things first, specially cause this is my first time in programming a pic. So I thought of writing out this simple programme to switch an led on and off, but after realizing that a pic switching an LED on/off will happen so fast I might not be able to see a difference I thought of writing a programme with an interrupt.
So as it is, it is powered off a crystal oscillator of 2.5 MHz and is made to switch the port D on and the goto sleep. Whenever there is an input at the interrupt pin (pin 33) the pic will wake up turn the LED on / off (depending on the previous state) and go back to sleep.
But when I run, it according to the circuit in the schematic diagram attached hereto, it doesn’t work. Nothing happens to the LED.
I have attached both the schematic diagram and the code. Please have a look at it and correct it as necessary.
Thanking you for your early response.
AP