Hello Melanie,

Melanie >>Some of your code although it will work (errors excepted) appears to make no sense Dwayne... first a couple of hints...<<

Thanks!... This is exactly what I need.

Melanie >>Firstly. Download the Datasheet of the 12F675. Make friends with it. Look at the drawing of the Pinout at the start of Page 1. The first mistake you've made is assigned GPIO.3 as an output, when this is an INPUT ONLY pin. So this has to be assigned to a different pin.<<

I was finally able to find the chip pin schematics. I found it in a 5 meg file download that took forever on a dialup of 28.800 <g>.

Melanie >>Second. Assign names to your I/O lines... that way if you need to reassign pins (as you do now), you only need to do it in one place, and it makes it so much more readable and easier to follow... eg...<<

I tried this, but since I have no idea of the logic of the basic compiler, I couldn't get it to work.. None of my assembly code works with the MPASM. Denny helped me by telling me the way to control the pins, so I took it from there.

in assembly.... Second EQU byte. works well with Philips. not good with PICs <g>.

I have a small learning curve. I only have to figure out which commands equate to each other.

Melanie >>Battery var GPIO.3 ' (you need to change GPIO.3 to another pin) <<

Thank you so very much. I finally got the schematic and it said this pin is a Input/interupt. Philips chips, all ports on the 750 are in/out. (Another lesson I learned, Thank you!). I assumed GPIO was Port I/O off of Port 0 (since it only had port like letter of G and less than 8 pins) to be pin 3. This equated to PO.3 in the philips chips. P1.3 equates to Port2 pin 3.

Melanie >>
toggle GPIO.5
you now say...
toggle LED<<

Thank you very much... with the knowledge of assigning pin to a var, (other than using my failed attempt at equate <g>) things are much easier.

Melanie>>Thirdly. You forgot the colon at the end of Delaymin at the start of your subroutine.<<

Thanks!


Melanie>>Sixthly... scatter comments freely... they help you (and others) follow the code more easily...<<

I had comments in it, but the online compiler only allowed 900 bytes. So i had to be picky... I am sorry.

Melanie >>Now I label the end section "The Confusing Bit" because I can't see what you're trying to achieve here. You set Battey High, and only set it Low after three counts... but look... as soon as you loop back in your loop, it gets set Low anyway... kinda defeats the object...<<

Yes, it does seem like a defeat, but in actuallity, it is a safeguard check.

Melanie >>Anyway... enough of me pulling your code apart...<<

No Melanie, I want to thank you very much. I couldn't find commands of Basic, I had to find what I could, make do with what I could, and figure out how to get my program to compile within 900 bytes. My knowledge is zelch on these PIC's, and
you and Denny have helped beyond. The only thing i can say is thanks, and hope you really understand that I mean it.

Please feel free to do such things. I am a person with a open mind, and always look for easier and better ways to do things.

Dwayne