interferences?

Thread Starter

Lem0nHead

Joined May 4, 2009
5
hello
I just started playing with a PIC12F675

The first problem I'm having is that its output pins are around 3.2V instead 5V, when I use a 5V power supply

The second problem is that it's extremely "unstable".
I mean, if I put a wire somewhere and just touch it, a LED connected turns off, or blink... sometimes even if I just come closer

I noticed this happens specially when I use a delay() function in my code (in fact, if my delay is bigger than 20000 cycles in the code below, the LED never turns on)
Any suggestions?

Rich (BB code):
#include <htc.h>
#include <pic.h>

__CONFIG(INTIO & WDTDIS & PWRTDIS & UNPROTECT & BORDIS);

#define _XTAL_FREQ 4000000

void main(void) {
    INTCON = 0;
    TRISIO = 0x00;
    ANSEL = 0b00000000;
    CMCON = 0x07;

    GPIO=0b00000000;
    _delay(10000);

    while(1) {
        GPIO=0b00000001;
    }
}
 
Top