Problem with MCLR

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

RAMTEC
Posts: 18
Joined: Thu Jul 27, 2006 4:32 am
Location: Dominican Republic
Contact:

Problem with MCLR

Postby RAMTEC » Sat Jan 06, 2007 4:37 pm

Hi, I am using PIC12F675 for de following program.
In the port a i have LEDs in GP1, GP2, GP4, GP5, And GP0 is an analog imput. GP3 have a Push botton to 5v and a resistor 1k to negative.

The program work like this. When a push the botton, it put 1 in GP3 them, the program read the analog imput and storage the value in the EEPROM. The process is the same for 4 time. It is the programation of the micro. When it finish, making change in the value of the analog imput the lesd are on or of depending the value of the analog imput (GPO).

The problem:

Ever the program read 1 in the GP3 and the program are no funtioning.
I traied using the GP3 like MCLR and it funtion very good, when i press the botton the microcontroller are reseted without problem.

I maked the program in assembler with the same hardware and it work very good.

Note: I have flowcode 2.1 and 3.0, i traied.

What can i do?


[/img]

User avatar
Benj
Matrix Staff
Posts: 14312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4404 times
Been thanked: 4128 times
Contact:

Postby Benj » Mon Jan 08, 2007 10:22 am

This may have something to do with the inbuilt pull up resistors present in the PICmicros. Im not sure but I think that Flowcode may enable or disable them while your assembler program would not. If you replace your 1K resistor connected between Ground and GP3 with a 4.7K or higher resistor this may allow your switch to function again. If not then send me your program and I will have a look at it.

RAMTEC
Posts: 18
Joined: Thu Jul 27, 2006 4:32 am
Location: Dominican Republic
Contact:

Postby RAMTEC » Mon Jan 08, 2007 8:20 pm

Thak you for your response.
First, i conected a resistor of 10k, but was the same problem. Sed me your email for sending the program

User avatar
Benj
Matrix Staff
Posts: 14312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4404 times
Been thanked: 4128 times
Contact:

Postby Benj » Tue Jan 09, 2007 11:37 am