I am new to programming and have run into a problem which I hope this forum can help with.
My goal is to write a program for the 12F509 that generates a pulse 7 times per second, simple. The pulses go to an interface which drives a stepper motor. The only twist is that I want the ability to adjust the delay time between each pulse via two switches and I want indicator LEDs to confirm the press of a button and to indicate that the pulses are at max or min rates. To get this done I have two switches and three LEDs connected to the 12F509.
The problem I would like to receive comment on relates to the use of the simulator in MPLAB. I have noticed that when I launch the debugger and animate the program the simulator crashes after a time, which never seem to be the same. The question is do I need to configure the simulator in a particular way for use with the 12F509?
Also, I am using the PICKIT2, purchased from Microchip. For some reason MPLAB has started not erasing the chip but states that it did. The interface which came with the programmer does erase the chip. I have tried to erase from MPLAB with and without the PICKIT2 interface active and the results are the same. This problem started when I reconfigured the location of the switches.
Comments, thank you, attached is the code.
My goal is to write a program for the 12F509 that generates a pulse 7 times per second, simple. The pulses go to an interface which drives a stepper motor. The only twist is that I want the ability to adjust the delay time between each pulse via two switches and I want indicator LEDs to confirm the press of a button and to indicate that the pulses are at max or min rates. To get this done I have two switches and three LEDs connected to the 12F509.
The problem I would like to receive comment on relates to the use of the simulator in MPLAB. I have noticed that when I launch the debugger and animate the program the simulator crashes after a time, which never seem to be the same. The question is do I need to configure the simulator in a particular way for use with the 12F509?
Also, I am using the PICKIT2, purchased from Microchip. For some reason MPLAB has started not erasing the chip but states that it did. The interface which came with the programmer does erase the chip. I have tried to erase from MPLAB with and without the PICKIT2 interface active and the results are the same. This problem started when I reconfigured the location of the switches.
Comments, thank you, attached is the code.