Just for fun, replace the tranistor driveres, buzzers, lamps with LEDs.
Could still be a hardware problem and this will tell.
Just for fun, replace the tranistor driveres, buzzers, lamps with LEDs.
Could still be a hardware problem and this will tell.
Dave
Always wear safety glasses while programming.
I can remove the buzzer and lamps by unplugging a connector and the PIC still resets as I can see what's going on with the LCD screen. I tried a different computer and the result is the same.....
I checked that also with my scope. Power is solid.Maybe you are browning out due to inadequate power supply
I am using a 2A DC/DC converter PT6212E-5 on my circuit board with plenty of bulk capacitance. I have used these parts on many of my other PIC projects without problems. I am using a 3S1P Lipoly battery pack that can supply 30A cont current for my 12V input until it can be installed. I am using PBP V2.46 with the patch installed and the latest beta programming software with my epic programmer. The epic software on CD V3.30 gives the same reset problem...
Jason
I know the following is commented out, but not sure what is going on here:You want to make sure all the analog inputs (ADC and Comparators) are set to digital. Also I think your TRIS directives are backwards (i.e. desired output are inputs and viceversa). Again this is commented out, but you should be defining these things at the beginning.Code:'ADCON0 = %11000001 'ADCON1 = %10001110 'trisa = %00001110 'trisb = %11110111
Not sure what the real problem is, but somehow I think you are having a stack overflow.
Try replacing the "GOsub warning" with "GOto warning"; and "RETURN" with "GOto monitor".
Try the attached file removing the .txt
Also as languer noted, your TRIS set up is commended out. Why? According to your variables, there is a conflict with the TRIS settings. Perhaprs an input is not biased and seen as high or low irrelevant what you really do on the pin.
Ioannis
Last edited by Ioannis; - 26th August 2009 at 10:39.
Hi Ioannis, I would also modify label light as per the attached code, because otherwise if portA.0 is zero then program will put high binlight and end.
Al.Code:light: if PORTA.0 = 0 then high binlight else alarm = 0 endif GOTO Monitor end
Last edited by aratti; - 26th August 2009 at 12:16.
All progress began with an idea
Bookmarks