power-up routine for an 10f222

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
MAX_the_newone
Posts: 1
Joined: Sun Jun 19, 2011 3:44 pm
Location: nürnberg

power-up routine for an 10f222

Post by MAX_the_newone »

how I made a power-up routine in the right place in the flowcode4.3 because I need the sleep mode and now I must insert on Programm Counteradress at “FF” the power-up programming
how do I make this.
The processor is 10F222 with hi-tec compiler lite version

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

Re: power-up routine for an 10f222

Post by Benj »

Hello Max,

You should be able to enter sleep mode by using the following line of C code.

sleep();

An interrupt or an external reset will bring the device back out of sleep mode.

Please can you sign up for the v4 forum topic and post your questions there as you state you are using v4.3
http://www.matrixmultimedia.com/mmforum ... =29&t=6524

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

Re: power-up routine for an 10f222

Post by Benj »

hello ben,

i have not a problem to go in sleepmode i have a problem to go out of this mode because you need a routine in the first lines because the programcounter was resetet to 1111 1111 and this is the problem how to Make a Routine the flowcode start from the beginning of the PC. the prozessor is 10F222 and he made this.
have you any ideas

Max

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

Re: power-up routine for an 10f222

Post by Benj »

Hello,

There is a software reset command that can be called using C though i'm not too sure if it will work on a 10F device.

rst_dev();

If this fails to work then could you use an output pin to control the signal going to the MCLR pin. eg you have a pull up resistor to the MCLR pin and you directly connect this to a free I/O pin. As soon as you output a 0 to the I/O pin the MCLR pin will be pulled low and this will reset the device back to the start of the program the I/O pin will then automatically switch back to its high impedance state.

Post Reply